I submitted some code to support concordances to R-devel, and wrote this blog article about it:


(Concordances are links from a source file to pre-processed output from Sweave or knitr.)

In the article I said "as far as I know, Pandoc doesn’t support any way to relate input lines to output lines", and asked to be corrected if that was wrong. I was corrected! Heather Turner pointed me in the direction of this:


She also worked out the initial details of how to make use of it. Thanks Heather!

I have now put together a package called RmdConcord (see https://github.com/dmurdoch/RmdConcord) which exports R Markdown drivers that incorporate concordances. This means that previewers like TeXworks that support Synctex will now synchronize the output with the true input, which makes editing a lot easier. If you have complaints from HTML Tidy about your vignettes, they should also refer to the original source now.

The package requires changes to the knitr package to support concordances in R Markdown documents, and to the backports package to support the R-devel concordance additions in earlier versions of R. I've submitted pull requests to both packages to include these changes, but in the meantime, you will need to install my devel versions of them:


If anyone is interested in testing this, I'd appreciate bug reports and suggestions.

Duncan Murdoch

R-devel@r-project.org mailing list

Reply via email to