Not able to use titlesec with markdown and pandoc?

This is because the default LaTeX template redefines \paragraph. To disable this behaviour, you can use the subparagraph variable in pandoc. You could supply this at the command-line: pandoc –variable subparagraph -o file.pdf file.md Or you could embed it in the document’s YAML metadata, with any non-null value: — subparagraph: yes — From man pandoc … Read more

Setting document title in Rmarkdown from parameters

Try to use a second YAML metadata block, and put the parameterized metadata in there. I got the following code to work as expected (i.e., producing a document title from the list of params): — output: html_document params: set_title: “My Title!” — — title: `r params$set_title` — The RMarkdown documentation notes that YAML metadata blocks … Read more

How to convert R Markdown to PDF?

Updated Answer (10 Feb 2013) rmarkdown package: There is now an rmarkdown package available on github that interfaces with Pandoc. It includes a render function. The documentation makes it pretty clear how to convert rmarkdown to pdf among a range of other formats. This includes including output formats in the rmarkdown file or running supplying … Read more

Set margin size when converting from Markdown to PDF with pandoc

Recent versions of rmarkdown and pandoc In more recent versions of rmarkdown, the settings of margins can be done in the YAML header via the top-level element geometry. What you specify in the geometry tag will be piped into the LaTeX template that ships with Pandoc via the following LaTeX snippet $if(geometry)$ \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} $endif$ For … Read more

pandoc version 1.12.3 or higher is required and was not found (R shiny)

Go into RStudio and find the system environment variable for RSTUDIO_PANDOC Sys.getenv(“RSTUDIO_PANDOC”) Then put that in your R script prior to calling the render command. Sys.setenv(RSTUDIO_PANDOC=”— insert directory here —“) This worked for me after I’d been struggling to find how rmarkdown finds pandoc. I had to check github to look at the source.