Learn R Programming

⚠️There's a newer version (0.1-6) of this package.Take me there.

pandocfilters (version 0.1-3)

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

306

Version

0.1-3

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Florian Schwendinger

Last Published

June 17th, 2019

Functions in pandocfilters (0.1-3)

Emph

Emphasized Text
TableCell

Table Cell
Table

Table
set_pandoc_path

Set Pandoc Path
RawInline

Raw Inline
SmallCaps

Small Caps Text
Header

Header
BulletList

Bullet List
Citation

Citation
ListAttributes

ListAttributes
Math

TeX Math
as.inline

Inline Objects
as.block

Block Objects
Cite

Citation
Code

Inline Code
Image

Image
c.block

Combine Block Objects
Space

Inter-word space
astrapply

Apply a Function on a AST
c.inline

Combine Inline Objects
document

Create a new Document
HorizontalRule

Horizontal Rule
SoftBreak

Soft Line Break
pandoc_to_json

Utility functions for testing filters
is.inline

Inline Objects
Note

Note
Para

Paragraph
Link

Hyperlink
DefinitionList

Definition List
OrderedList

Ordered List
Div

Generic Block Container with Attributes
LineBreak

Hard Line Break
get_pandoc_types_version

Get Pandoc-Types Version
get_pandoc_version

Get Pandoc Version
Subscript

Subscripted Text
Superscript

Superscripted Text
Span

Generic Inline Container with Attributes
Definition

Definition
Str

Text (String)
Null

Nothing
CodeBlock

Code Block
write.pandoc

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

Block Objects
Attr

Attributes
BlockQuote

Block Quote
Plain

Plain Text
get_pandoc_path

Get Pandoc Path
filter

Filter JSON-formatted AST.
Quoted

Quoted Text
Strikeout

Strikeout Text
Strong

Strongly Emphasized Text