Learn R Programming

pandocfilters (version 0.1-6)

Pandoc Filters for R

Description

The document converter 'pandoc' is widely used in the R community. One feature of 'pandoc' is that it can produce and consume JSON-formatted abstract syntax trees (AST). This allows to transform a given source document into JSON-formatted AST, alter it by so called filters and pass the altered JSON-formatted AST back to 'pandoc'. This package provides functions which allow to write such filters in native R code. Although this package is inspired by the Python package 'pandocfilters' , it provides additional convenience functions which make it simple to use the 'pandocfilters' package as a report generator. Since 'pandocfilters' inherits most of it's functionality from 'pandoc' it can create documents in many formats (for more information see ) but is also bound to the same limitations as 'pandoc'.

Copy Link

Version

Install

install.packages('pandocfilters')

Monthly Downloads

255

Version

0.1-6

License

GPL-3

Issues

Pull Requests

Stars

Forks

Last Published

August 11th, 2022

Functions in pandocfilters (0.1-6)

LineBreak

Hard Line Break
CodeBlock

Code Block
Image

Image
HorizontalRule

Horizontal Rule
Definition

Definition
RawInline

Raw Inline
Link

Hyperlink
OrderedList

Ordered List
Note

Note
BulletList

Bullet List
Citation

Citation
Cite

Citation
Code

Inline Code
Plain

Plain Text
Quoted

Quoted Text
ListAttributes

ListAttributes
Math

TeX Math
DefinitionList

Definition List
Div

Generic Block Container with Attributes
Para

Paragraph
Strikeout

Strikeout Text
Strong

Strongly Emphasized Text
set_pandoc_path

Set Pandoc Path
pandoc_to_json

Utility functions for testing filters
Table

Table
get_pandoc_path

Get Pandoc Path
TableCell

Table Cell
Span

Generic Inline Container with Attributes
Str

Text (String)
filter

Filter JSON-formatted AST.
SoftBreak

Soft Line Break
Null

Nothing
SmallCaps

Small Caps Text
Emph

Emphasized Text
Header

Header
Superscript

Superscripted Text
Subscript

Subscripted Text
is.block

Block Objects
Space

Inter-word space
c.inline

Combine Inline Objects
document

Create a new Document
get_pandoc_types_version

Get Pandoc-Types Version
as.inline

Inline Objects
get_pandoc_version

Get Pandoc Version
as.block

Block Objects
astrapply

Apply a Function on a AST
is.inline

Inline Objects
write.pandoc

Write the JSON-formatted AST to a connection
c.block

Combine Block Objects
BlockQuote

Block Quote
Attr

Attributes