The main goal of patchDVI is to support previewer forward and reverse search between Sweave, knitr or R Markdown source and .dvi, .pdf or .html output.

It also contains project management functions, to make it more convenient to build large documents from multiple source files, and supports editing of Sweave, knitr or R Markdown source in TeXworks, TeXShop and other editors.

This project was originally hosted on R-forge; see

for older versions.


This version of patchDVI optionally makes use of RmdConcord, a package to support concordances in R Markdown documents. You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("dmurdoch/patchDVI", dependencies = TRUE)

The CRAN version is installed with

install.packages("patchDVI", dependencies = TRUE)


See the patchDVI vignette for usage details.