document: Create a new Document

Description Usage Details

View source: R/pandocfilters.R

Description

Constructs an object of type "document".

Usage

1

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 a block object or list of block objects

append_plain(x)

For more information about the arguments see Plain.

append_para(x)

For more information about the arguments see Para.

append_code_block(attr, code)

For more information about the arguments see CodeBlock.

append_block_quote(blocks)

For more information about the arguments see BlockQuote.

append_ordered_list(lattr, lblocks)

For more information about the arguments see OrderedList.

append_bullet_list(lblocks)

For more information about the arguments see BulletList.

append_definition_list(x)

For more information about the arguments see DefinitionList.

append_header(x, level=1L, attr=Attr())

For more information about the arguments see Header.

append_horizontal_rule()

For more information about the arguments see HorizontalRule.

append_table(rows, col_names=NULL, aligns=NULL, col_width=NULL, caption=list())

For more information about the arguments see Table.

append_div(blocks, attr)

For more information about the arguments see Div.

append_null()

For more information about the arguments see Null.


pandocfilters documentation built on Dec. 1, 2019, 1:18 a.m.