Learn R Programming

patchDVI (version 1.11.3)

pdf_with_patches: Convert an R Markdown pdf driver to one that handles concordances.

Description

This function produces a new driver which matches the old one in most respects, but adds an argument sourcepos (and possibly others). If that argument is TRUE (the default) then concordances are handled by the new driver.

This is used to produce pdf_documentC in this package, and should also work on other drivers that produce PDF output using Pandoc.

Usage

pdf_with_patches(driver)

Value

A new driver function.

Arguments

driver

An R Markdown driver that produces HTML, LaTeX or PDF using Pandoc.

Details

This function makes use of the RmdConcord::pdf_with_concordance function. That function adds concordances to the output of the original driver; this function patches the PDF file so that source references in it refer to the original source file.

Examples

Run this code
pdf_with_patches(rmarkdown::latex_fragment)

Run the code above in your browser using DataLab