| add_lua_filter {rmdfiltr} | R Documentation |
Add filter to pandoc arguments
Description
Adds a filter call to the vector of pandoc command line arguments.
Usage
add_lua_filter(args = NULL, filter_name, error = TRUE)
add_wordcount_filter(args = NULL, error = TRUE)
add_replace_ampersands_filter(args = NULL, error = TRUE)
add_citeproc_filter(args = NULL, error = TRUE)
add_custom_filter(args = NULL, filter_path, lua = FALSE,
error = TRUE)
Arguments
args |
Character. (Vector of) pandoc command line arguments. |
filter_name |
Character. Name(s) of the Lua filter to add. See details. |
error |
Logical. Whether to throw an error if (required version of)
|
filter_path |
Character. Path to filter file. |
lua |
Logical. Whether the filter(s) was written in Lua (results in
|
Details
The following Lua filters are available from rmdfiltr.
Convenience functions named after the filter are available
(e.g. add_*_filter()).
replace_ampersandsSearches for citations added by
pandoc-citeprocand replaces&withandin all in-text citations (e.g., as required by APA style). Iflangis specified in the documents YAML front matter, the corresponding translation is used, if available. Be sure to setciteproc: noin the YAML front matter of the document and callpandoc-citeprocmanually (e.g., usingadd_citeproc_filter). For details seevignette("replace_ampersands", package = "rmdfiltr").wordcountThe body of the text and reference sections are counted separately. The word count for the text body does not contain, tables or images (or their captions). The filter reports the word count in the console or the R Markdown tab in 'RStudio'. For details see
vignette("wordcount", package = "rmdfiltr").
Examples
add_lua_filter(NULL, "wordcount", error = FALSE)
add_wordcount_filter(NULL, error = FALSE)
add_replace_ampersands_filter(NULL, error = FALSE)
add_citeproc_filter(NULL, error = FALSE)
add_custom_filter(NULL, filter_path = "foo/bar", error = FALSE)