ReporteRs (version 0.8.2)

addCodeBlock.bsdoc: Add a code block into a bsdoc object

Description

Add a code block into a bsdoc object.

Usage

# S3 method for bsdoc
addCodeBlock(doc, file, text,
  par.properties = parProperties(), text.properties = textProperties(color =
  "#A7947D"), ...)

Arguments

doc

bsdoc object where expressions have to be added

file

file. Not used if text is provided.

text

character vector. The text to parse. Not used if file is provided.

par.properties

code block paragraph properties. An object of class parProperties

text.properties

code block text properties. An object of class textProperties

...

further arguments, not used.

Value

an object of class bsdoc.

See Also

bsdoc, addCodeBlock

Examples

Run this code
# NOT RUN {
#START_TAG_TEST
doc.filename = "addCodeBlock/example.html"

# set default font size to 11
options( "ReporteRs-fontsize" = 11 )

doc = bsdoc( )
doc = addCodeBlock( doc, text = "ls -a\nwhich -a ls" )

# Write the object
writeDoc( doc, file = doc.filename )
#STOP_TAG_TEST
# }

Run the code above in your browser using DataLab