Learn R Programming

pandocfilters (version 0.1-6)

document: Create a new Document

Description

Constructs an object of type "document".

Usage

document()

Arguments

<code>to_json()</code>

Description
Returns the JSON representation of the document.

<code>write(con, format = "markdown", writer = write.pandoc)</code>

Description
Write the JSON-formatted AST to a connection.
Arguments

cona connection object or a character string to which the document is written.
formata character string giving the format (e.g. "latex", "html").
writeran optional writer function, see write.pandoc.

Note
Any function with the three arguments x, con and format can be used as writer function.

<code>append(x)</code>

Description
Append a new block to the document.
Arguments

xblock object or list of block objects.

<code>append_plain(x)</code>

Description
For more information about the arguments see Plain.

<code>append_para(x)</code>

Description
For more information about the arguments see Para.

<code>append_code_block(attr, code)</code>

Description
For more information about the arguments see CodeBlock.

<code>append_block_quote(blocks)</code>

Description
For more information about the arguments see BlockQuote.

<code>append_ordered_list(lattr, lblocks)</code>

Description
For more information about the arguments see OrderedList.

<code>append_bullet_list(lblocks)</code>

Description
For more information about the arguments see BulletList.

<code>append_definition_list(x)</code>

Description
For more information about the arguments see DefinitionList.

<code>append_header(x, level=1L, attr=Attr())</code>

Description
For more information about the arguments see Header.

<code>append_horizontal_rule()</code>

Description
For more information about the arguments see HorizontalRule.

<code>append_table(rows, col_names=NULL, aligns=NULL, col_width=NULL, caption=list())</code>

Description
For more information about the arguments see Table.

<code>append_div(blocks, attr)</code>

Description
For more information about the arguments see Div.

<code>append_null()</code>

Description
For more information about the arguments see Null.

Details

Each document has the following methods: