pandoc
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
How to convert HTML with mathjax into Latex using Pandoc?
With the latest version of pandoc (1.12.2), you can do this: pandoc -f html+tex_math_dollars+tex_math_single_backslash -t latex Much nicer! If you don’t want to convert math delimited by \( and \), just do pandoc -f html+tex_math_dollars -t latex
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.
Docker : Can a container A call an executable located on an other container B?
There are multiple solutions to your problem, I’ll let you choose the one that suits you best. They are presented below, from the cleanest to the ugliest (in my opinion and regarding the best practices generally followed). 1. Make it a service If you end up calling it often, it may be worth exposing pandoc … Read more
How to set size for local image using knitr for markdown?
The question is old, but still receives a lot of attention. As the existing answers are outdated, here a more up-to-date solution: Resizing local images As of knitr 1.12, there is the function include_graphics. From ?include_graphics (emphasis mine): The major advantage of using this function is that it is portable in the sense that it … Read more