Releases: rstudio/rmarkdown
rmarkdown 1.18
-
For
pdf_document()
, now we patch Pandoc's built-in LaTeX template to include the document subtitle (unnecessary with pandoc 2.6 onwards) and reduce the vertical spacing before title using--include-in-header
rather than overwriting the built-in template, avoiding compability problems with newer versions of Pandoc (thanks, @adunning, #1563). -
find_external_resources()
works now when multiple files are specified in theincludes
option of the output format (thanks, @andrie, #1677). -
find_external_resources()
can find external resources specified in the output format'sreference_doc
orreference_docx
option now (thanks, @jmcphers, #1696). -
rmarkdown::run(file = NULL, dir = "foo/")
failed to run Rmd files under thefoo/
directory (thanks, @jenzopr, #1703). -
Reverted the fix for #1692 since it is no longer necessary (rstudio/tinytex#152 (comment)).
-
The
header-includes
field in the YAML metadata will no longer be overwritten by the command-line option--include-in-header
(thanks, @crsh @mnazarov, #1359). -
Removed the
xmlns
attribute in the<html>
tag in the default HTML template (thanks, @grady #1640, @spgarbet #995).
rmarkdown 1.17
-
html_vignette()
passesself_contained
argument value to base format (thanks, @cderv, #1668). -
find_external_resources()
works for thehtml_vignette
type again, this fixes rendering vignettes with external resources in pkgdown (regression introduced in rmarkdown 1.16, #1668). -
render(..., clean = TRUE)
may fail to clean the*_files
directory when the output format isprettydoc::html_pretty
(thanks, @yixuan, #1664). -
For
ioslides_presentation
, images with atributes (e.g.,![](sample.png){width=80%}
) can be correctly embedded in the self-contained mode now (thanks, @hadley, #1687). -
Fixed the Pandoc LaTeX templates to avoid the error
File
grffile.sty' not found`. This is because the LaTeX grffile is no longer available in TeX Live (thanks, @cderv #1691, @smmurphy #1692, @JacobD05 rstudio/tinytex#152).
rmarkdown 1.16
-
The
pandoc-citeproc
binary can now be found correctly on Windows. This fixes an issue withpandoc_citeproc_convert()
(thanks @cderv, #1651). -
Added
self_contained
argument tohtml_vignette
to keep intermediate directory ifself_contained = FALSE
(thanks, @cderv, #1641). -
It is now possible to add pagebreak in HTML, Word, LaTeX, and ODT documents using the
\newpage
or\pagebreak
command in an Rmd file. This is possible thanks to the Pandoc's pagebreak lua filter. Seevignette("lua-filters", package = "rmarkdown")
(thanks, @cderv, #1626). -
The Pandoc extension
ascii_identifiers
is no longer enabled by default. If you still need it, you may use the argumentmd_extensions = "+ascii_identifiers"
in the output format function. However, please note that this will trigger an error in a future version of Pandoc. -
Output formats can be configured by arbitrary YAML files, which used to be restricted to
_output.yml
or_output.yaml
. They can be specified via theoutput_yaml
argument ofrender()
or theoutput_yaml
top-level parameter of YAML front matter, and the first existing one will be used. Ifoutput_yaml
is specified both forrender()
and YAML front matter, thenrender()
has the priority. If none are found, then_output.yml
or_output.yaml
will be used if they exist (thanks, @atusy, #1634). -
Added a Pandoc lua filter to convert fenced Divs to LaTeX environments when the output format is
latex
orbeamer
. Basically a fenced Div::: {.NAME data-latex="[OPTIONS]"}
is converted to\begin{NAME}[OPTIONS] \end{NAME}
in LaTeX. The attributedata-latex
must be provided, even if it is an empty string (meaning that the LaTeX environment does not have any optional arguments). For example,::: {.verbatim data-latex=""}
generates averbatim
environment, and::: {.minipage data-latex="{.5\textwidth}"}
generates\begin{minipage}{.5\textwidth}
. This lua filter was originally written by @RLesur at yihui/bookdown-crc#1. It will allow users to create custom blocks that work for both HTML and LaTeX output (e.g., info boxes or warning boxes). -
Added
keep_html
argument togithub_document
so to save a preview HTML file in a working directory (thanks, @atusy, #1650).
rmarkdown 1.15
-
Exclude
README.R?md
from files processed byrender_site()
, -
html_document
withcode_folding: hide
supports showing individual source code chunks if they are assigned thefold-show
class via the chunk optionclass.source="fold-show"
(thanks, @atusy, #1602). -
The
extra_dependencies
argument only works withtemplate: default
inpdf_document
. Now it works with any Pandoc LaTeX templates as long as the template uses theheader-includes
variable.
rmarkdown 1.14
-
Fixed a regression in
ioslides_presentation
that background colors via thedata-background
attribute on slides stopped working (thanks, @ShKlinkenberg, #1265). -
Fixed the bug #1577 introduced in rmarkdown v1.12: tabsets, floating TOC, and code folding in the
html_document
format no longer work with theshiny
runtime (thanks, @RLesur for the fix #1587, and @fawda123 @ColinChisholm @JasonAizkalns for the bug report). -
Added the
keep_md
argument topdf_document()
to keep the intermediate.md
output file (thanks, @broomej, #1001). -
For
render()
, if the input filename contains special characters such as spaces or question marks (as defined inrmarkdown:::.shell_chars_regex
), the file will be temporarily renamed with the special characters replaced by-
(dash) instead of_
(underscore, as in previous versions of rmarkdown). This change will affect users who render such files with caching (cache will be invalidated and regenerated). The change is due to the fact that-
is generally a safer character than_
, especially for LaTeX output (#1396). -
Added a pkgdown site for the rmarkdown package: https://rmarkdown.rstudio.com/docs/ (thanks, @apreshill, #1574).
-
Fixed the bug #1593: in HTML documents, when a MathJax URL is used with a custom template, the source code of the MathJax library is included in the document. This bug was first declared in bookdown (thanks, @topepo for the bug report rstudio/bookdown#683, and @RLesur for the fix #1594).
rmarkdown 1.13
-
For
pdf_document()
, do not override margins to 1 inch when a custom document class or geometry settings are specified in the YAML front matter (thanks, @adunning, #1550) -
The default value of the
encoding
argument in all functions in this package (such asrender()
andrender_site()
) has been changed fromgetOption("encoding")
toUTF-8
. We have been hoping to support UTF-8 only in rmarkdown, knitr, and other related packages in the future. For more info, you may read https://yihui.name/en/2018/11/biggest-regret-knitr/. -
The option
toc_float: true
forhtml_document
now preserves the text formatting (thanks, @codetrainee, #1548). -
For the
output_file
argument ofrender()
, a file extension will be automatically added if the filename does not contain an extension (e.g.,render('foo.Rmd', 'html_document', output_file = 'bar')
will generatebar.html
); see the help page?rmarkdown::render
for details (thanks, @apreshill, #1551). -
TOC items are not correctly indented when
toc_float
is enabled for thehtml_document
format (thanks, @carolynwclayton #1235 and @RLesur #1243). -
Fixed rstudio/shiny#2307 where the second execution of a
shiny_prerendred
document withhref
dependencies would cause a prerender check error (thanks, @schloerke, #1562). -
The
*_files
directory is not properly cleared due to the inappropriate fix for #1503 and #1472 in the last version (thanks, @wxli0 #1553, @cderv #1566). -
Added an
output_extensions
argument topdf_document()
to make it possible to enable/disable Pandoc extensions for the LaTeX output format (thanks, @hongyuanjia, rstudio/bookdown#687).
rmarkdown 1.12
-
Fixed file extensions of output files when using non-markdown Pandoc extensions such as
docx+styles
(#1494, @noamross). -
Added a new argument
extra_lines
tolatex_dependency()
to allow users to add extra lines of LaTeX code after\usepackage{}
. Also added a helper functionlatex_dependency_tikz()
based onlatex_dependency()
(#1502, @malcolmbarrett). -
Fixed #1529: when the path of an Rmd file contains Unicode characters that cannot be represented in the system native encoding (especially on Windows),
rmarkdown::render()
may fail. -
Applied a correct fix to an old plotly issue plotly/plotly.R#463.
-
HTML widgets used to be hidden when printing ioslides to PDF in Chrome. Now they will be printed correctly.
-
render(output_format = 'all')
may delete the figure directories that are still needed by certain output formats when one output format doesn't need its figure directory (thanks, @rmcd1024 #1472, @cderv #1503). -
The
<em>
tags in the subtitle, date, and author are removed from the default HTML template (thanks, @royfrancis, #1544).
rmarkdown 1.11
-
Fixed #1483, which prevented the triangle to be displayed in Firefox when
<details><summary>...</summary></details>
was used (#1485, @Bisaloo) -
Provided
rmarkdown.pandoc.args
as a knitr package option inknitr::opts_knit
(#1468, @noamross). -
Added the exported function
pandoc_exec()
, which returns the path of the pandoc binary used by the package (#1465, #1466 @noamross). -
new_session: true
in_site.yml
causesrender_site()
to render each file in a new R session, eliminating some cross-file difficulties, such as function masking (#1326, #1443 @jennybc). -
Added the LaTeX command
\passthrough
in the default LaTeX template for the--listings
flag of Pandoc (rstudio/bookdown#591). -
The icons in
flexdashboard::valueBox()
are not of the full sizes due to the upgrade of FontAwesome in #1340 in the previous version (#1388, rstudio/flexdashboard#189). -
Added the ability to generate tabset dropdowns, usable by adding the
.tabset-dropdown
class to a header (e.g.,# Heading {.tabset .tabset-dropdown}
) (#1405). Thanks @stefanfritsch for contributing the necessary code for this (#1116). -
The
darkly
theme (a darker variant of the Bootswatchflatly
theme) has been added tohtml_document
andhtml_notebook
(#1409, #889). -
Fixed a regression that caused scrollbars on code blocks when the syntax highlighting theme is not the default (#654, #1399).
-
Fixed #1407: reactive expressions can break the section headers of Shiny R Markdown documents.
-
Fixed #1431:
render()
with theintermediates_dir
argument when the output format ispowerpoint_presentation
with a customreference_doc
fails to find the reference document. -
Fixed the website navbar not being able to display submenus properly (#721, #1426).
-
Added checks for shiny-prerendered documents to find all html dependencies, match all execution packages, and match the major R version (#1420).
-
Added an argument
cache = TRUE
to the internal functionrmarkdown:::find_pandoc()
, so that users can invalidate the cached path of Pandoc viarmarkdown:::find_pandoc(cache = FALSE)
(thanks, @hammer, #1482). -
Added an RStudio project template for simple R Markdown websites, so that users can create such websites from RStudio:
New Project -> New Directory -> Simple R Markdown Website
(thanks, @kevinushey, #1470). -
Fixed #1471: Pandoc's (version 2.x) syntax highlighting themes don't work well with the Bootstrap style (thanks, @gponce-ars #1471, @cderv #1489).
-
Fixed the warnings in #1224 and #1288 when calling
render()
with an absoluteoutput_dir
orintermediates_dir
. -
Fixed #1300: calling
render()
withintermediates_dir
may fail when the intermediate dir is on a difference device or filesystem. -
Fixed #1358: calling
render()
withintermediates_dir
will fail if the Rmd document contains bibliography files that are dynamically generated.
rmarkdown 1.10
-
Added a new argument
slide_level
topowerpoint_presentation()
(#1270). -
The tinytex package has become a required dependency (to build R Markdown to PDF).
-
Added
compact-title
variable to the LaTeX default templates to control use of LaTeXtitling
package; defaults totrue
(#1284). -
pdf_document(template = NULL)
does not work (#1295). -
Restore ability to use any HTML format with R Markdown Websites (#1328).
-
Add
options
argument topaged_table()
to enable explicit passing of display options. -
Add
pandoc_citeproc_convert()
function for conversion of bibliography files (e.g. BibTeX files). -
Update to Font Awesome version 5.0.13 (#1340).
-
Add
site_resources()
function for computing resource files required for a website. -
Export
default_site_generator()
function -
The
latex_document()
format should not clean up the figure directory (thanks, @emiltb, rstudio/bookdown#582). -
Enable post processors that change the output file to specify that the base post processor should still be applied to the original output file.
rmarkdown 1.9
NEW FEATURES
- Added a new (experimental) output format
powerpoint_presentation
. If you want to test it, you will need Pandoc >= 2.1 (#1231).
MAJOR CHANGES
- If the tinytex package is installed, PDF output is built through
tinytex::latexmk()
, otherwise it is generated byrmarkdown:::latexmk()
, which has been factored out and improved in the tinytex package, so it is recommended that you install the tinytex package (#1222).
BUG FIXES
-
Temporary files created in
render()
may be cleaned up prematurely, which can cause problems with Shiny R Markdown documents (#1184). -
Further improvements regarding compatibility with Pandoc 2.0, e.g. tabbed sections don't work (https://community.rstudio.com/t/3019).
-
When
preserve_yaml = TRUE
inmd_document()
,toc = TRUE
fails to create the table of contents (thanks, @stla, #1216). -
Suppress confusing error messages from
knitr::purl()
duringrmarkdown::find_external_resources()
(thanks, @aronatkins #1247, and @paulobrecht #1154). -
Fixed the obscure error
Error: path for html_dependency not found:
, which was due to the HTML dependency of highlight.js (thanks, @bborgesr, #1213).