Skip to content

rmarkdown 2.0

Compare
Choose a tag to compare
@yihui yihui released this 12 Dec 21:43
  • For the output format pdf_document(), we no longer adjust the vertical spacing of the title area. This means there will be a larger spacing above the document title in PDF. If you prefers the old (smaller) spacing, please download https://github.com/rstudio/rmarkdown/blob/f6961af/inst/rmd/latex/compact-title.tex and include it to the preamble via the includes option of pdf_document. However, please note that this means you won't be able to have multiple authors in the author field of the YAML frontmatter, unless you use a custom LaTeX template. With the default LaTeX template, you will run into the error in #1716. Besides, the compact-title option in YAML is no longer supported.

  • R code in the header-includes field in the YAML frontmatter stopped working in the previous version of rmarkdown. The code should be evaluated before passing to Pandoc (thanks, @mcol #1709, @cderv #1710).

  • The encoding argument is no longer passed to the intermediates_generator of R Markdown output formats. The intermediates_generator function can only accept arguments input_file and intermediates_dir now (see ?rmarkdown::output_format). This is a breaking change to developers. If you are an output format developer, you have to remove the encoding argument in your intermediates_generator if your output format uses this function.

  • The encoding argument is no longer passed to the render element of the site generator (see ?rmarkdown::render_site).

  • The encoding argument has been removed from many of the internal functions in the rmarkdown package. Now all input files are assumed to be encoded in UTF-8. If you see an error message like "Error in FUN(arg = ...): unused argument (arg = ...)", please file an issue (with a reproducible example) to https://github.com/rstudio/rmarkdown.

  • Added a new output format context_document() to support ConTeXT output (thanks, @RLesur #1725, @jooyoungseo #1713).

  • render_site() can render R scripts in addition to Rmd files if you set autospin: true in _site.yml (thanks, @zeehio, #1564).

  • Added ext argument to md_document(). Its default value is ".md". This argument is intended to be used together with variant argument (e.g., variant = "context" and ext = ".pdf") (thanks, @atusy, #1715).

  • ioslides_presentation() stylesheet is updated for printing. Browsers are notified that the presentation should preferentially be printed in landscape orientation and without margin (thanks, @RLesur, #1718).

  • Reverted the fix #1703 and applied an alternative fix to #1700, because the original fix brought a new bug #1714 (thanks, @pablobernabeu @cderv @everron @aronatkins).

  • Tabsets don't work with Pandoc 2.8 (thanks, @mnazarov, #1723).

  • The pdf_document format failed to work if the header-includes field in YAML is an empty list (thanks, @cderv, #1728).