rmdfiltr v0.1.0

0

Monthly downloads

0th

Percentile

'Lua' filters for R Markdown

A collection of 'Lua' filters that extend the functionality of R Markdown templates (e.g., count words or post-process 'pandoc-citeproc'- citations).

Readme

rmdfiltr

Lifecycle:
experimental Travis build
status CRAN
status [CRAN
downloads

rmdfiltr provides a collection of Lua-filters that extend the functionality of R Markdown templates.

Installation

You can install the development version from this GitHub repository with:

# install.packages("remotes")
remotes::install_github("crsh/rmdfiltr")

Example

You can add a filter to any R Markdown template that accepts additional pandoc arguments.

---
title: "Word count test"
output:
  html_document:
    pandoc_args: !expr rmdfiltr::add_wordcount_filter()
---

Of course, you can also use the filters in a custom R Markdown format by adding pandoc arguments with the preprocessor function.

wordcount_html_document = function(...) {
  format <- rmarkdown::html_document(...)
  format$pre_processor <- rmdfiltr::add_wordcount_filter
  format
}

See R Markdown: The Definitive Guide for details on how to create custom formats.

Contributions

Contributions of new filters are welcome. Pleas refer to the contributing guidelines before you start working or open a pull request. Also, please note that the rmdfiltr project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Functions in rmdfiltr

Name Description
add_lua_filter Add filter to pandoc arguments
verify_pandoc_version Verify minimum pandoc version
No Results!

Vignettes of rmdfiltr

Name
replace_ampersands.Rmd
wordcount.Rmd
No Results!

Last month downloads

Details

Type Package
URL https://github.com/crsh/rmdfiltr
BugReports https://github.com/crsh/rmdfiltr/issues
SystemRequirements pandoc (>= 2.0; https://pandoc.org)
License MIT + file LICENSE
Encoding UTF-8
LazyData true
RoxygenNote 6.1.0
Language en-US
VignetteBuilder knitr
NeedsCompilation no
Packaged 2019-05-03 19:22:17 UTC; frederikaust
Repository CRAN
Date/Publication 2019-05-05 08:10:02 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/rmdfiltr)](http://www.rdocumentation.org/packages/rmdfiltr)