Slides with Columns in Pandoc

Current versions of pandoc (i.e., pandoc 2.0 and later) supports fenced divs. Specially named divs are transformed into columns when targeting a slides format: # This slide has columns ::: columns :::: column left :::: :::: column right :::: ::: Pandoc translates this into the following LaTeX beamer code: \begin{frame}{This slide has columns} \protect\hypertarget{this-slide-has-columns}{} \begin{columns}[T] … 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

tech