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

View source: R/patchmark.R

pdf_with_patchesR Documentation

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)

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.

Value

A new driver function.

Examples

pdf_with_patches(rmarkdown::latex_fragment)

patchDVI documentation built on March 31, 2023, 11:34 p.m.