Skip to contents

Pandoc can record concordance information in \datapos macros when converting Commonmark documents to LaTeX. This retrieves that information, and rewrites it as standard R concordance data.

Usage

processLatexConcordance(filename,
                        newfilename = filename,
                        rename = NULL,
                        followConcordance = NULL,
                        defineSconcordance = TRUE)

Arguments

filename

The filename of the LaTeX file produced by Pandoc.

newfilename

A filename in which to write the changed data.

rename

A named character vector. Names are the names in the datapos attributes; values are the names that should be included in the concordance instead. This might be used since knitr produces a Markdown file and renames it later.

followConcordance

If filename already contains concordance data, assume that the Rmd file was produced automatically, and chain the concordances.

defineSconcordance

Whether to insert the definition of the \Sconcordance macro.

Value

Called for the side effect of rewriting the concordance, it returns newfilename invisibly.

Author

Duncan Murdoch