Rstudio rmarkdown: both portrait and landscape layout in a single PDF

So, pandoc does not parse the content of latex environments, but you can fool it by redefining the commands in your header.tex file: \usepackage{lscape} \newcommand{\blandscape}{\begin{landscape}} \newcommand{\elandscape}{\end{landscape}} Thus, here \begin{landscape} is redefined to \blandscape, and \end{landscape} to \elandscape. Using those newly defined command in the .Rmd file seems to work: — title: “Mixing portrait and landscape” … Read more

How to combine two RMarkdown (.Rmd) files into a single output?

August, 2018 update: This answer was written before the advent of bookdown, which is a more powerful approach to writing Rmarkdown based books. Check out the minimal bookdown example in @Mikey-Harper’s answer! When I want to break a large report into separate Rmd, I usually create a parent Rmd and include the chapters as children. … 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

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)