document {pandocfilters} | R Documentation |
Create a new Document
Description
Constructs an object of type "document"
.
Usage
document()
Details
Each document has the following methods:
to_json()
Description
Returns the JSON
representation of the document.
write(con, format = "markdown", writer = write.pandoc)
Description
Write the JSON-formatted AST to a connection.
Arguments
con | a connection object or a character string to which the document is written. |
format | a character string giving the format (e.g. "latex" , "html" ). |
writer | an optional writer function, see write.pandoc. |
Note
Any function with the three arguments x
, con
and format
can be used as writer function.
append(x)
Description
Append a new block to the document.
Arguments
x | block object or list of block objects. |
append_plain(x)
Description
For more information about the arguments see Plain.
append_para(x)
Description
For more information about the arguments see Para.
append_code_block(attr, code)
Description
For more information about the arguments see CodeBlock.
append_block_quote(blocks)
Description
For more information about the arguments see BlockQuote.
append_ordered_list(lattr, lblocks)
Description
For more information about the arguments see OrderedList.
append_bullet_list(lblocks)
Description
For more information about the arguments see BulletList.
append_definition_list(x)
Description
For more information about the arguments see DefinitionList.
append_header(x, level=1L, attr=Attr())
Description
For more information about the arguments see Header.
append_horizontal_rule()
Description
For more information about the arguments see HorizontalRule.
append_table(rows, col_names=NULL, aligns=NULL, col_width=NULL, caption=list())
Description
For more information about the arguments see Table.
append_div(blocks, attr)
Description
For more information about the arguments see Div.
append_null()
Description
For more information about the arguments see Null.