pandoc_convert() will throw an error if Pandoc isnot available (thanks,
Use the argument--syntax-highlighting=none forPandoc >= 3.8 since--no-highlight has been deprecated(#2602).
Dropped the temporary workaround that used to support syntaxhighlighting of|> and=>. Theworkaround has no longer been necessary sincePandoc 2.18,which was released more than 3 years ago (#2290).
convert_ipynb() no longer drops raw cells with noformat in metadata (thanks,
Fixed a bug that preventsrender() from working whenconverting.md input to PDF (thanks,
find_external_resources() now correctly detectsknitr child document provided with option likechild = c("child.Rmd") (thanks,
knit_params_ask() uses aselect inputfor parameters which allow multiple selected values. Previously, aradio input was incorrectly used when the parameter had asmall number of choices.
params:primaries:choices:["red","yellow","blue"]multiple:trueWhenmultiple is not enabled, parameter configurationstill usesradio when there are fewer than fivechoices.
Theinput parameter field can still be used to force theconfiguration control.
params:grade:input: radiochoices:["A","B","C","D","F"]Add classesodd,even, andheader back to table rows for Pandoc >= 3.2.1, so tablescan be styled properly (thanks,
beamer_presentation support handling latexdependencies via the newextra_dependencies argument anddeclarations within chunks (e.g.,knitr::asis_output("", meta = list(rmarkdown::latex_dependency("longtable"))))(thanks,@cderv,
Provide a global optionrmarkdown.files.suffix toconfigure the suffix of the directory for auxiliary files (thanks,_files, which can causeHTML output files to be deleted automatically on Microsoft OneDrive orGoogle Drive. If that is the case for you, you may set a differentsuffix in your.Rprofile, e.g.,options(rmarkdown.files.suffix = "_rmdfiles").
Fix a regression in 2.26 regarding image paths post-processing inhtml_document_base(). Now absolute paths to image in theoutput directory (output_dir) are correctly made relativeto the output directory again.
rmarkdown now requiresknitr>= 1.43.
Get rid of the superfluous warning infind_pandoc()(thanks,@jszhao,#2527).
Removed thestringr dependency since it is usedonly once in the package and the equivalent base R code is simple enough(thanks,
For the output format optionfig_crop: auto, it willnow use the same logic as inknitr to decide ifcropping is possible (yihui/knitr#2246).
Avoid corrupting input files by accident (thanks,
Fixed a bug that filenames beginning with- causeincorrect invocation of Pandoc (thanks,
Documented how to mergeoutput_format_dependency()to the output format (thanks,
ioslides_presentation() now correctly works with newshiny 1.7.5 (thanks,
Added a new argumentmetadata to thepre_knit function inoutput_format() so thatusers will have access to the YAML metadata of the input document beforeknitting it (#2485). Please note that if you definepre_knit for a custom output format, you are stronglyrecommended to leave a... argument inpre_knit, so we (rmarkdown packageauthors) are free to add more arguments topre_knit withoutbreaking your code. If yourpre_knit function does not havethe... argument, you will get a warning.
Fixedfile_scope being lost when extending outputformats that considers thefile_scope usingoutput_format(). Merge behavior is to apply overlayfile_scope function onto the result ofbase_format’sfile_scope function. Thisimplies thatfile_scope gains second argument whichreceives the returned values of the basefile_scope(thanks,@atusy,#2488).
Addedoutput_format_dependency() which allowsextending output format from within chunks (thanks,
Fix an issue with shiny prerendered document where dependenciescontext were written twice leasing to parsing error (thanks,
find_external_resources() works with formatsdefining there owntheme argument, likecleanrmd::html_document_clean(), not related tobslib supports (thanks,
Fixed version number comparison problems as requested byCRAN.
Usingcss with.scss and.sass file, or with a bslib theme, now works as expectedwith a shiny runtime (thanks,
Add apandoc_metadata_file_arg() function to matchPandoc’s CLI flag--metadata-file.
Mentions thatwebshot orwebshot2 is required to take screenshot of HTML widget.When not installed, an error message mentioningalways_allow_html: true solution will be shown, but settingthis is not the solution (quarto-dev/quarto-cli#4225).
html_dependency_jqueryui() updated to 1.13.2 fromversion bundled in shiny (thanks,
Fix an issue with YAML header ending with a commented linecontaining incomplete yaml (thanks,
When code folding is enabled inhtml_document(), thetext on the button to show the content has been changed from “Code” to“Show”, because the content to show is not necessarily code, e.g.,yihui/knitr#2227.
Now HTML output formats use the Font Awesome HTML dependency fromthefontawesome package instead of shipping an outdatedversion of Font Awesome inrmarkdown (thanks,
Fixed a bug caused by a change in theis_blank()function inxfun 0.38 (thanks,
The defuncttufte_handout() has been removed fromrmarkdown. Please usetufte::tufte_handout() instead.
If an input path tormarkdown::render() is asymbolic link, it is no longer resolved to its real path (thanks,
Make sure to avoid creating invalid paths when copying resources(thanks,@mnazarov,#2429).
Make surelogo is properly embedded inioslides_presentation() whenself_contained = TRUE (thanks,
xfun::isFALSE() internally.rmarkdown::render() argumentoutput_file is now used for all output formats, if there isonly one name for multiple output formats (thanks,
Custom output formats can provide a custom function to convertMarkdown input to the desired output format now. To do so, define theoutput format viaoutput_format(pandoc = pandoc_options(convert_fun = function(...) {})).The default converting function ispandoc_convert() in thispackage. See the help page?pandoc_options for moredetails.
rmarkdown::render_site() will now also look forindex.rmd in addition toindex.Rmd for customsite generator in YAML withsite: (thanks,
Icons in tabset dropdown are now correctly shown, including whenself_contained: false (thanks,
Pandoc 2.19 has deprecated the argument--self-contained. If you have installed Pandoc 2.19+,rmarkdown will use--embed-resources --standalone as recommended by Pandoc foroutput formats that use the optionself_contained = TRUE(#2382).
pandoc_version() returns a version number of theformX.Y.Z.YYYY.MM.DD for the nightly build of Pandoc now,whereYYYY.MM.DD is its build date. Previously it wouldreturnX.Y.Z.9999 to indicate the nightly version.
Fix navbar issue with website when using Boostrap 5 withbslib (thanks,
Thetufte_handout() function insidermarkdown is defunct now. Its codebase was moved to thetufte package in 2016, and this function was marked asdeprecated in 2021. Please usetufte::tufte_handout()instead ofrmarkdown::tufte_handout(). The latter will beremoved eventually from this package.
github_document() gainsmath_method = "default" and defaults to it. No specialprocessing will be done to inline maths in$ and blockmaths in$$ as nowGithubsupports it and will render using Mathjax (thanks,
Improved highlighting themearrow regardingaccessibility.
Fixed an issue withsite_generator() detection of asite project (thanks,
Fixed an issue with Shiny prerendered documents and Pandoc notcorrectly rendering last Markdown paragraph in HTML (thanks,
Fixed a bug thatsite_generator() fails to detectthe root dir of the site and causes infinite recursion (thanks,
html_vignette() gainscode_foldingargument (thanks,
html_document() can opt-outcode_folding = "show" or"hide" for individualcode blocks by adding thefold-none class to the codeblocks (thanks,@atusy,#2348).
When using a development version of Pandoc, a.9999suffix is appended to version number so thatpandoc_available() can correctly compared version with lastrelease.
Fix an issue with older R version and vignette building(#2324).
Fix an issue with older R version andpreserve_yaml = TRUE inmd_document()(#2325).
Long title inioslides_presentation failed to workwith Pandoc 2.17.x (thanks,
html_document() andhtml_document_base() gains themath_methodargument to supportall themath rendering engines from Pandoc: “mathjax”, “katex”, “mathml”,“webtex”, and “gladtex”. For backward compatibility, themathjax argument still works and will take precedence overmath_method, but we recommend using the newmath_method argument instead of themathjaxargument, and the latter could be deprecated in the future.
You can specify a math engine viamath_method as anengine name, e.g.,
output:html_document:math_method: katexor provide both a name and a URL (formathjax,katex andwebtex):
output:html_document:math_method:engine: mathjaxurl: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.jsFormath_method = "katex", KaTeX CDN will be inserted inversion 0.15.2 by default (from jsdelivr). A custom URL toward anotherCDN can be passed asurl.
Formath_method = "webtex", it will default to inset SVGusinghttps://latex.codecogs.com/svg.image?. Usehttps://latex.codecogs.com/png.image? for PNG. Seehttps://latex.codecogs.com for supported options (dpi, background,…).
Most HTML output format usinghtml_document() orhtml_document_base() as based format should benefit fromthis new feature. See?rmarkdown::html_document() fordetails (thanks,
github_document() also gains themath_method argument set to"webtex" bydefault so that LaTeX equations can be rendered in the Github Markdowndocument as images. Previously, LaTeX equations were not rendered. Setmath_method = NULL to deactivate.
Added support forkatex Rpackage as a math engine withmath_method = "r-katex" inHTML documents. This method offers server-side rendering of all theequations, which means no JS processing is needed in the browser as withusual KaTeX or MathJaX methods. (thanks,
anchor_sections can now be easily customized usingstyle ordepth element foranchor_sections. For example:
output:html_document:anchor_sections:style: symbol # use symbol style ("hash", "symbol", "icon")depth:2 # max depth to apply anchor on (default to max which is 6)Customizing using a CSS rule is still possible. Detailed explanationand examples have been added to the help page?html_document.
Improved the highlighting mechanism in formats that supportshighlight argument:
.themeinhighlight argument for customizing thesyntaxhighlighting style used by Pandoc.highlight: arrow a themeoptimized for accessibility andcolor contrast (thanks tohighlight: rstudio to mimic the RStudio editor theme.html_document() for R syntax highlighting and autolinking.Usehighlight_downlit = TRUE to activate it (same argumentas indistill). This features require thedownlit package.Templates forhtml_document() andioslides_presentation() gained a new CSS rule to displaysingle line<summary> content inline(rstudio/rstudio#10589).
md_document() gained a newstandaloneargument, which isFALSE by default unlesstoc = TRUE. This allows to output authors, date and othermetadata per the Pandoc’s template. Due to limitation in how Pandoc ishandling metadata blocks in its extensionsyaml_metadata_block,preserve_yaml = TRUE nowdeactivate any extension to letrmarkdown directlyhandle the keeping of YAML block - this means it does not setstandalone = TRUE by default. Meanwhile,github_document() gained thepreserve_yamlargument (thanks,
Addedavailable_templates() to list all thetemplates from a specific package that can be used withrmarkdown::draft().
Following support in Pandoc 2.15,powerpoint_presentation() gained aincrementalargument as other slide formats. As a reminder, settingincremental = TRUE will make lists to displayincrementally. See more inPandoc’sMANUAL.
Added support for Pandoc’sdir variable in HTMLtemplates. This is the secondLanguageVariables afterlang.
Added a global optionrmarkdown.html_dependency.header_attr (TRUE bydefault). It can be set toFALSE to opt-out the HTMLdependencyhtml_dependency_header_attrs() in documentsbased onhtml_document_base() (thanks,
Rendering usingruntime: shiny_prerendered orruntime: shinyrmd now natively supports custom templates.Previously since 2.8, developers had to add a special comment,<!-- HEAD_CONTENT -->, conditionally toshiny-prerendered variable. (See also NEWS from 2.8 for theprevious behavior). The new behavior inserts required special comment<!-- HEAD_CONTENT --> as a last element of$header-includes$. If templates rely on the old behaviorand require some contents between$header-includes$ and<!-- HEAD_CONTENT -->, consider including them with$header-includes$ (thanks,
A shiny prerendered document with only a empty server contextdoes not error anymore. Document will be rendered with a empty serverfunction andserver.R file will be ignored. To useserver.R, no server context should be present in the Rmddocument (thanks,
Fixed a regression with renderingshiny_prerendereddocument (thanks,
Fixed an issue inbeamer_presentation() whereheader-includes would be overwritten byincludes = list(in_header =) (thanks,pdf_document() (#1359).
Fixed broken links to section headers whennumber_sections = TRUE is specified inmd_document andgithub_document (thanks,
draft() now works withdevtools::load_all() andtestthat whenused in other packages.
Lua Filters: Added two more functions inshared.luafor other package to use:
type() function backward compatible followingPandoc 2.17 changes.print_debug() for easier logging duringdebug.Add opt-intabset option to thehtml_vignette. In contrast to the similar feature fromhtml_document, this feature supports navigation from ToCand URL. Any custom formats can introduce this feature by using anexported functionhtml_dependency_tabset() (thanks,
Relative paths in parent directories in thecssargument ofhtml_document() were incorrectly normalized toabsolute paths by #2095 in v2.8. Now relative paths in parentdirectories will no longer be converted to absolute paths (thanks,
It is possible to specify the version of jQuery via a globaloption now, e.g.,options(rmarkdown.jquery.version = 2)(note that the default major version is3). This is mainlyfor advanced users and developers to test different versions ofjQuery.
pandoc_citeproc_convert() now handles correctly bibfile containing specific UTF-8 characters on non default UTF-8 systemslike Windows (thanks,
Shiny prerendered documents are now pre-rendered in a childenvironment to avoid allowing the results of static code chunks to existin the Shiny app environment (
The previously unexported functionconvert_ipynb()is exported now (thanks,
md_document() will now handle correctlypreserve_yaml value for all variants and all pandocversions (#2190).
preserve_yaml = TRUE, markdown output will keepthe YAML metadata block from the Rmd file.preserve_yaml = FALSE, markdown output will haveno YAML metadata block.This fixes a breaking change in Pandoc 2.13 regardinggfm,commonmark andcommonmark_xwhich now supportsyaml_metadata_block by default(#2118).
New supported syntax for Shiny prerendered documents: you can nowuseserver: shiny orserver: type: shiny.
Ability to inject additional functions into Shiny prerenderedserver scope using the “server-extras” context.
Fixed the syntax highlighting issue with R’s pipe operator|> (thanks,
Fix a regression in version 2.8 when a url is used incss argument (thanks,
All HTML dependencies are now correctly supported, included thosewith only anhref component but notfilecomponent in theirsrc attribute. Previously,rmarkdown would throw the error'path for html_dependency not provided' when renderingdocuments containing HTML dependencies withhref components(thanks,
Fix an error thrown with output format using afile_scope function (like inbookdown)(thanks,@rfaelens,#2149).
Fix an issue withcopy_ressource = TRUE inhtml_document_base where very long HTML documents weretruncated during post processing (thanks,
Whenrun()-ing aruntime: shinydocument, an extra temp folder will be used in the output path. With theextra temp random folder in the path, predictable output file names maybe used. (#2137)
Whenrun()-ing aruntime: shinydocument with a{bslib} theme, the global theme valuewasn’t being restored properly. (#2160)
Floating ToC inhtml_document can now hide headingswith unnumbered and unlisted classes (thanks,
Fix prefix handling in R Markdown website’s navbar forFontawesome V5 and compatibility with V4. For icon only available in V5,the full prefix + name should be use, especially with newfab prefix (e.g. fab fa-r-project). If noprefix is used (e.gfa-home instead offas fa-home), thefa prefix will be added forV4 compatibility as it has been deprecated in V5. We advice to use thefull prefix + name for icons following Fontawesome documentation.(#1994)
rmarkdown::site_generator() can hang session waitingfor input when thesite field is not found in the YAMLfrontmatter ofindex.Rmd (thanks,
Fix a issue with Pandoc 2.5 andlatex-div.lua -documents can now be rendered as expected without error (thanks,
Fix an issue with styling and code folding button behavior whendefault iscode-folding: show. The Button can now becorrectly style according to state asaria-expandedattributes is correctly updated. Also, new classes has been added on thebutton to allow styling during transition:btn-collapsingandbtn-expanding are respectively applied duringtransition Show to Hide and Hide to Show. (This followBootstrapbehavior for the collapsible block) (thanks,
Fix an issue withcitation_package having no effectwhen using.md file as input torender() withlatex and PDF output formats (thanks,
A new internal optionrmarkdown.knit.ext has beenadded to control the extension of the intermediary knit output during arendering. It defaults tomd to produce*.knit.md. Only useful for very advanced usage(#2098).
render() won’t produce any*.utf8.mdintermediary file anymore. This was a leftover from previous versions ofrmarkdown. Sinceknitr 1.24 andrmarkdown 2.0, only UTF-8 input files are allowed.(#2098).
Fix anInvalid cross-device link error whentempdir() is used forintermediates_dir inrender() (thanks,
Fix a regression in HTML default template with floating tocincorrectly placed on small size window (thanks,
Provided aruntime: shiny fix for output formatsthat pass a modifiedbslib::bs_theme() object tohtml_document_base()’stheme (thanks,
Rendering usingruntime: shiny_prerendered orruntime: shinyrmd will now produce valid HTML by notinserting anymore the full document as body in the resulting shiny apps(thanks,@dakep,#1912). Header content usually containing html dependencies will beinserted in the HTML document at the end of the head before</head>, unless the rendered HTML contains<!-- HEAD_CONTENT --> special comment (seehtmltools::renderDocument()). A new Pandoc variable is setin for shiny prerendered document to allow conditional insertion of suchcontent in the the HTML template using$if(shiny-prerendered)$. This has been done in all HTMLtemplate in this package. Users of custom template should make thischange to provide support for this runtime. Seermarkdown default template (default.html)for an example (#2064).
Addedtectonic as a supported LaTeX engine forgenerating PDF output (thanks,engine: "tectonic" to your output format inYAML, such aspdf_document.
When nooutput_format is provided in any way but anoutput_file is provided inrender(), thedefault format will be determined based on the extension:"pdf_document" for.pdf, or"word_document" for.docx. Otherwise, it willbe"html_document" as previous version (thanks,
Added a new global optionrmarkdown.render.message.When setFALSE,render() will not output themessage starting byOutput created: allowing RStudio IDE toopen a preview of the document. This is useful for package developersthat would need to emit there own output message for there customformat. See?render_site for more info on this specialmessage (#2092).
Internal changes regarding Lua filters. They have now an explicitPandoc version minimal requirement: A filter will be skipped with awarning printed by the Lua filter if this requirement is not met. Fornow, all filters work for Pandoc 2.1 and above (thanks,render() will set theRMARKDOWN_LUA_SHARED env var to the path of Lua filtershared.lua so that other filters can access functionsdefined in it usingdofile(os.getenv 'RMARKDOWN_LUA_SHARED'). This is forinternal usage only to avoid duplication (thanks,
html_document_base gains acssargument, to whichhtml_document’scssargument is now passed. This also fix an issue when.sassor.scss files are used with thiscss argumentwhenself_contained: FALSE. Moreover,sasscaching mechanism can now be used when passing.sass or.scss files to thecss argument (thanks,
Thefig_crop option of PDF document formats (such aspdf_document andbeamer_presentation) supportsthe value"auto" now, which meansfig_crop = TRUE when figure cropping toolspdfcrop andghostscript areavailable.
The default value of thefig_crop option of PDFoutput formats has been changed fromTRUE to"auto" (#2077).
rmarkdown::tufte_handout has been deprecated andwill be removed in the future from this package. It has been moved tothetufte package sincermarkdown0.9.5 (released on 2016-02-22). Please usetufte::tufte_handout instead.
html_document (andhtml_document_base)’stheme parameter nowunderstandsbslib::bs_theme() objects/arguments, meaningthat one may opt-into Bootstrap 4 and more easily create custom themes.For examples, seehttps://github.com/rstudio/rmarkdown/pull/1706, and forcontext, seehttps://rstudio.github.io/bslib/ (thanks,
Files with.scss/.sass extension (i.e.,Sass files) provided tohtml_document’scssparameter are now compiled to CSS using the{sass} package.Also, iftheme is a{bslib} object, these Sassfiles may utilize Sass code inside thetheme (thanks,
Fix an issue with line numbering in code chunks when.numberlines with Pandoc’s highlighting (thanks,
Fix an issue with shiny runtime andglobal.R(thanks,
Acceptlatex="{options}",latex=1, orlatex=true for Latex Divs.
Addoutput_format_filter function todefault_site_generator(). Enables custom site generators tocustomize or even entirely replace the output format right beforerendering of each page.
Automatically excluderenv directory forrender_site() (thanks,
Do not forceoptions(htmltools.preserve.raw = TRUE)when this option has been set, otherwise it is impossible for otherpackages to turn this option off, e.g., yihui/xaringan#293.
knitr_options_pdf() will now throw a warning whenfig_crop = TRUE but is disabled because required toolspdfcrop and/orghostscript are missing(thanks,@netique,#2016).
Eliminated the unnecessary padding in code blocks in thehtml_document output with Bootstrap 4 themes (thanks,
github_document() will produce a working TOC even ifsome headers start with number (#2039).
Fix an issue withknit_print.data.frame. The... arguments are no more passed toprint() toavoid passingknit_print() argumentsoptionsandencoding to customprint() methods(#2047).
Encoding is correctly handled now inhtml_vignettewhen checking for identical title and vignette index entry (thanks,@py-b, #1978).
clean_site() now default topreview = TRUE and will no more remove files withoutnotice. This change will affect the “Clean All” button in the “Build”pane for website project.clean_site(preview = FALSE) mustbe run to effectively remove files (#1973).
The intermediate.tex file is now correctly deletedifkeep_tex = FALSE when the R Markdown document is notrendered from the working directory (thanks,
Fix a bug causing certain resources files to be deleted asintermediate files whenintermediates_dir is the same asthe input (thanks,
Fix issues withanchor_sections = TRUE andlearnr (thanks,
Enable use ofserver.R andglobal.Ralongsideruntime: shinyrmd documents.
pkg_file_lua() now works withdevtools::load_all() andtestthat whenused in other packages.
Fixpandoc_convert(citeproc = TRUE) not supressingthe--natbib or--biblatex options (thanks,@atusy,#1932).
pandoc-citeproc is now activated if abibliography field is defined in another YAML block insteadof the first YAML block (thanks,
Specify thathtmltools::htmlPreserve() should usethe pandoc raw attribute rather than preservation tokens when pandoc>= v2.0. Note that this option will have the intended effect only forversions of htmltools >= 0.5.0.9003.
anchor_sections inhtml_documents() nowdefaults toFALSE. It was introduced in previous versionwith a default toTRUE, but it is reverted now afterhearing feedbacks from the community (thank you!). The# isstill used as the character for the anchor but you can easily changethat using CSS rules. Examples have been added to the help page?html_document.
Using Pandoc’s default for--email-obfuscation now.Previously, it was set tonone explicitly, which is thedefault for Pandoc 1.17.2+ anyway. Only users with a Pandoc versionbefore 1.17.2 may see a change in the content of the html source fileproduced if the document contains email addresses. This change allows topass the Pandoc’s command line flag if you want to set it to anothervalue (thanks,
output:html_document:pandoc_args:["--email-obfuscation","javascript"]SeePandoc’smanual for the meaning of this option.
Fix Fontawesome 5 icons in navbar by correctly handling newprefix asfa has been deprecated in favor offas orfab (#1967)
Tables without header rows (wich can be possible in Pandoc’ssimpletable) are now formatted correctly when usinghtml_document() format (thanks,
html_document() gains theanchor_sections argument, which isTRUE bydefault, so that readers can get links to section headers easily—whenyou mouse over a section header, you will see a hash symbol# at the end of the header, which contains the anchor linkto this header. You can click on this link and get the URL in the addresbar of your web browser, or right-click on it and copy the URL from thecontext menu. The hash symbol is defined by the CSS rulea.anchor-section::before {content: '#';}. You can customizeit by overriding this rule (e.g., via thecss argument ofhtml_document) and use any other symbols or icons, e.g.,content: "\02AD8;" (thanks,
pkg_file_lua() should have thrown an error if theexpected Lua file does not exist.
Providefiles_dir andintermediates_diras attributes on return fromrender() whenrun_pandoc = FALSE.
Supports new Pandoc 2.11--citeproc flags usageinstead ofpandoc-citeproc external filter.pandoc_convert() andpandoc_citeproc_convert()will now use the correct flags according to the Pandoc version used. Thelogic is exported inpandoc_citeproc_args(). SeePandoc releasenote for more information about the newciteprocprocessing (#1916).
Fixed the code highlighting when code block is hidden. Previousversion introduced a regression where non default code highlighting wasstill shown whencode_folding is activated and code blockis hidden (thanks,
The minimal required version for thexfunpackage (v0.15) has been specified for R Markdown Notebooks to workproperly (thanks,
Fixed a bug inconvert_ipynb() when the language isnot specified in the.ipynb file (thanks,
Introduceruntime: shinyrmd as a more user friendlyalias forruntime: shiny_prerendered.
Lua filters handling has been improved internally with someuser-facing changes (#1899):
pandoc_lua_filter_args() toreturn the Pandoc command-line argument to add a Lua filter.lua_filters inpandoc_options() to pass the Lua filter paths to use with aformat. This allow output format authors to add filters for a customformat using thepandoc argument ofoutput_format() and to get filters from a format usingfmt$pandoc$lua_filters.render(). By default, they are passed to Pandoc before anyother format-defined or user-defined Pandoc arguments (usually via thepandoc_args option of an output format). This ensures thatfilters of an output format are executed first. To change the default,you need to deal with it in a custom format (i.e., modify the elementsinfmt$pandoc$lua_filters, such as reordering them).pkg_file_lua() to get the fullsystem path of a Lua filter included in a package source within theinst/rmarkdown/lua folder (thanks,Fixed the path separators for thecss parameter inYAML frontmatter for HTML output files under Windows. Previously,forward slashes incss paths were converted to backslashes(thanks,
Sincermarkdown 1.16, Pandoc’s fencedDiv’s are converted to LaTeX environments when the outputformat is LaTeX, e.g.,::: {.center data-latex=""} isconverted to\begin{center}. The attributedata-latex of theDiv was mandatory, even ifit is empty. Inrmarkdown 2.2, we silently drop thisrequirement, which means::: {.center} is converted to\begin{center}. This turns out to be a bad idea, becauseusers have no control over which Div’s to be converted to LaTeXenvironments. Previously, they could opt-in by thedata-latex attribute, but withrmarkdown2.3, all Div’s are converted to LaTeX environments unconditionally.What’s more, this change led to bugs likehttps://stackoverflow.com/q/62340425/559676 andhttps://github.com/rstudio/bookdown/issues/883. Therefore thedata-latex attribute became mandatory again in thisversion. If the LaTeX environment does not need arguments, you may usedata-latex="".
The two Lua fitlerspagebreak.lua andlatex-div.lua (introduced inrmarkdown1.16) are also applied to the output formatbeamer_presentation now (thanks,
When customizing formats with theoutput_formatfunction,pre_knit,opts_hooks, andknit_hooks can now refer tormarkdown::metadata. Previously,rmarkdown::metadata returnedlist() in thesefunctions (thanks,
rmarkdown::find_external_resources() now discoversexternal template files. This in turn fixes the rendering issue ofhtml_document with theshiny runtime andintermediate_dir set (thanks,
Added thenumber_sections argument to followingformats:github_document,ioslides_presentation,md_document,odt_document,powerpoint_presentation,rtf_document,slidy_presentation,word_document. These are powered by a Lua filter andrequires Pandoc > 2.0. It will silently have no effect has beforewith previous pandoc version (thanks--number-sections for docx format, and thusword_document prefers the native feature to the Lua filter(thanks,
For the output formatpdf_document, the optionfig_crop will not be enabled unless both the programspdfcrop andghostscript are found (thanks,@dalupus,yihui/knitr#954).
Fixed a bug that a chunk with a classfold-hidehides the rest of the chunks even the output format settinghtml_document(code_folding = "show") (thanks,
Updated documentation forrender() to make itclearer how options are set for theoutput_format parameter(thanks,
Ported some CSS styles (e.g., underlines, small caps, andmulti-column layouts) from the latest Pandoc’s HTML template intormarkdowns HTML templates (thanks,
Addressed an accessibility issue in highlighted code blocks ofHTML output for screen reader users: screen readers no longer read outan unnecessary code line id values (thanks,
Addedfile_scope option to output format definition.This enables handling of duplicate numeric footnote identifiers(e.g. across bookdown chapters) via the pandoc--file-scopeoption (#1837).
Added the customizablelang attribute toioslides_presentation output (thanks,
Addedpublish_site() function for “one-button”publishing of R Markdown websites.
When thedf_print option iskable andthe output format is not HTML,<div> is no longer added to thekable() output, because recent versions of Pandoc willconvert thediv to a LaTeX environment when the outputformat is LaTeX (thanks, Laurens,https://stackoverflow.com/q/62340425/559676).
html_vignette() only warns against differences inthe vignette title and the vignette index entry for R >= 3.6.0(thanks,@krlmlr,#1832).
html_document() can applycode_foldingon any chunk engines if thefoldable class is added to asource code block via the chunk options (class.source orattr.source). You may apply this feature to all the sourcecode blocks, for example, by settingknitr::opts_chunk$set(class.source = "foldable") at thebeginning of your document (thanks,
Exported the internal functionfind_pandoc(), andalso added two arguments,dir andversion, sothat users can provide a custom directory under which this function mayfind Pandoc, as well as an expected version of Pandoc to be found(thanks,@connorp,#1785).
pandoc_metadata_arg() is a new Pandoc helperfunction to generate--metadata argument for Pandoc commandline (thanks,@cderv,#1789).
The output formathtml_vignette() now warns againstdifferences in the vignette title specified in thetitlefield in the YAML metadata and the one specified inside\VignetteIndexEntry{}. Normally they are expected to beidentical (#1789).
Fixed a bug with encoding when renderinghtml_notebook containing HTML widgets (thanks,
TOC title can now be specified forhtml_document viathe top-level optiontoc-title in the YAML frontmatter(thanks,@atusy,#1771).
Floating TOC can now distinguish upper/lower-cases (thanks,
Whencode_folding='show' for the output formathtml_document, code blocks can be individually hiddeninitially by specifying the chunk optionclass.source='fold-hide' (thanks,
For LaTeX/PDF output formatspdf_document,beamer_presentation, andcontext_document, theargumentcitation_package = 'none' was deprecated, andcitation_package = 'default' should be used instead ifcitations are to be processed bypandoc-citeproc (thanks,@njbart,rstudio/bookdown#754).
output_format() can now inheritkeep_mdandclean_supporting frombase_format whenNULL is passed to these arguments. Previously, you mustexplicitly specifykeep_md and/orclean_supporting asTRUE orFALSEinoutput_format() since they could not inherit thecorresponding options ofbase_format. This behavior was notconsisent with other arguments ofoutput_format() (thanks,@atusy,#1823).
Thesmart argument of most output formats has beenremoved, because Pandoc’ssmart extension is enabled bydefault, and settingsmart: false for an output format didnot really have any effect (which could be considered a bug, but we wantto get rid of this option since it existed only for a historical reasonfor Pandoc 1.x, and Pandoc 2.x has been released for more than twoyears). If you want to disable thesmart extension, you canuse the optionmd_extensions: -smart of the output format(thanks,@atusy,#1774).
pdf_document() should not specify thegeometry variable when thedocumentclassvariable is passed to Pandoc (thanks,
render() now respects the YAML metadata in the Rscript when rendering the script with Pandoc 2.8 or later (thanks,
Forpandoc_convert(), when the argumentto = 'pdf', it will be changed to'latex'internally (thanks,
render(run_pandoc = FALSE) no longer cleans up theMarkdown file (typically knitted from Rmd) (thanks,
Added the returned output fromshiny::runApp()withinrmarkdown::run() (thanks,
YAML header is now correctly parsed inhtml_notebook’s intermediate.knit.md file sothat features like adding bibliography works again (thanks,
ioslides_presentation template no longer generatesan empty<h2> tag whensubtitle is notspecified in YAML (thanks,
No longer center the#header element in thehtml_vignette() output (thanks,
Ensure thetempdir() exists (viatempdir(TRUE)) when writing HTML dependencies to atemporary file, because this directory might be erased by accident(thanks, Kurt Hornik, and also
Added theslide_level argument toslidy_presentation()(https://stackoverflow.com/q/59157211/559676).
Removed the jQuery dependency inhtml_document_base() (#1723). To avoid bugs like #1723,Pandoc 2.8 users have to upgrade to Pandoc 2.9+.
Forpdf_document, horizontal rules generated byPandoc (before v2.8) stopped working in recent versions of TeX Live, andthe same fix as the one to https://github.com/jgm/pandoc/issues/5801(i.e., hard-code\linethickness to0.5pt) wasapplied inrmarkdown (thanks,
For the output formatpdf_document(), we no longeradjust the vertical spacing of the title area. This means there will bea larger spacing above the document title in PDF. If you prefers the old(smaller) spacing, please downloadhttps://github.com/rstudio/rmarkdown/blob/f6961af/inst/rmd/latex/compact-title.texand include it to the preamble via theincludes option ofpdf_document. However, please note that this means youwon’t be able to have multiple authors in theauthor fieldof the YAML frontmatter, unless you use a custom LaTeX template. Withthe default LaTeX template, you will run into the error in #1716.Besides, thecompact-title option in YAML is no longersupported.
R code in theheader-includes field in the YAMLfrontmatter stopped working in the previous version ofrmarkdown. The code should be evaluated before passingto Pandoc (thanks,@mcol#1709,@cderv#1710).
Theencoding argument is no longer passed to theintermediates_generator of R Markdown output formats. Theintermediates_generator function can only accept argumentsinput_file andintermediates_dir now (see?rmarkdown::output_format). This is a breaking change todevelopers. If you are an output format developer, you have to removetheencoding argument in yourintermediates_generator if your output format uses thisfunction.
Theencoding argument is no longer passed to therender element of the site generator (see?rmarkdown::render_site).
Theencoding argument has been removed from many ofthe internal functions in thermarkdown package. Nowall input files are assumed to be encoded in UTF-8. If you see an errormessage like “Error inFUN(arg = ...): unused argument(arg = ...)”, please file an issue (with a reproducibleexample) to https://github.com/rstudio/rmarkdown.
Added a new output formatcontext_document() tosupport ConTeXT output (thanks,
render_site() can render R scripts in addition toRmd files if you setautospin: true in_site.yml (thanks,
Addedext argument tomd_document().Its default value is “.md”. This argument is intended to be usedtogether withvariant argument (e.g.,variant = "context" andext = ".pdf") (thanks,@atusy,#1715).
ioslides_presentation() stylesheet is updated forprinting. Browsers are notified that the presentation shouldpreferentially 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,
Tabsets don’t work with Pandoc 2.8 (thanks,
Thepdf_document format failed to work if theheader-includes field in YAML is an empty list (thanks,@cderv,#1728).
Forpdf_document(), now we patch Pandoc’s built-inLaTeX template to include the document subtitle (unnecessary with pandoc2.6 onwards) and reduce the vertical spacing before title using--include-in-header rather than overwriting the built-intemplate, avoiding compability problems with newer versions of Pandoc(thanks,@adunning,#1563).
find_external_resources() works now when multiplefiles are specified in theincludes option of the outputformat (thanks,
find_external_resources() can find externalresources specified in the output format’sreference_doc orreference_docx option now (thanks,
rmarkdown::run(file = NULL, dir = "foo/") failed torun Rmd files under thefoo/ directory (thanks,
Reverted the fix for #1692 since it is no longer necessary(https://github.com/yihui/tinytex/issues/152#issuecomment-552796864).
Theheader-includes field in the YAML metadata willno longer be overwritten by the command-line option--include-in-header (thanks,
Removed thexmlns attribute in the<html> tag in the default HTML template (thanks,@grady #1640,
html_vignette() passesself_containedargument value to base format (thanks,
find_external_resources() works for thehtml_vignette type again, this fixes rendering vignetteswith external resources in pkgdown (regression introduced in rmarkdown1.16, #1668).
render(..., clean = TRUE) may fail to clean the*_files directory when the output format isprettydoc::html_pretty (thanks,
Forioslides_presentation, images with atributes(e.g.,{width=80%}) can be correctlyembedded in the self-contained mode now (thanks,
Fixed the Pandoc LaTeX templates to avoid the errorFilegrffile.sty’ not found`. This is because the LaTeXgrffile is no longer available in TeX Live (thanks,@cderv #1691,
Thepandoc-citeproc binary can now be foundcorrectly on Windows. This fixes an issue withpandoc_citeproc_convert() (thanks
Addedself_contained argument tohtml_vignette to keep intermediate directory ifself_contained = FALSE (thanks,
It is now possible to add pagebreak in HTML, Word, LaTeX, and ODTdocuments using the\newpage or\pagebreakcommand in an Rmd file. This is possible thanks to thePandoc’spagebreak Lua filter. Seevignette("lua-filters", package = "rmarkdown") (thanks,@cderv,#1626).
The Pandoc extensionascii_identifiers is no longerenabled by default. If you still need it, you may use the argumentmd_extensions = "+ascii_identifiers" in the output formatfunction. However, please note that this will trigger an error in afuture version of Pandoc.
Output formats can be configured by arbitrary YAML files, whichused 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, andthe first existing one will be used. Ifoutput_yaml isspecified both forrender() and YAML front matter, thenrender() has the priority. If none are found, then_output.yml or_output.yaml will be used ifthey exist (thanks,
Added a Pandoc Lua filter to convert fenced Divs to LaTeXenvironments when the output format islatex 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 optionalarguments). For example,::: {.verbatim data-latex=""}generates averbatim environment, and::: {.minipage data-latex="{.5\textwidth}"} generates\begin{minipage}{.5\textwidth}. This Lua filter wasoriginally written by
Addedkeep_html argument togithub_document so to save a preview HTML file in a workingdirectory (thanks,
ExcludeREADME.R?md from files processed byrender_site(),
html_document withcode_folding: hidesupports showing individual source code chunks if they are assigned thefold-show class via the chunk optionclass.source="fold-show" (thanks,
Theextra_dependencies argument only works withtemplate: default inpdf_document. Now itworks with any Pandoc LaTeX templates as long as the template uses theheader-includes variable.
Fixed a regression inioslides_presentation thatbackground colors via thedata-background attribute onslides stopped working (thanks,
Fixed the bug #1577 introduced inrmarkdownv1.12: tabsets, floating TOC, and code folding in thehtml_document format no longer work with theshiny runtime (thanks,
Added thekeep_md argument topdf_document() to keep the intermediate.mdoutput file (thanks,
Forrender(), if the input filename contains specialcharacters such as spaces or question marks (as defined inrmarkdown:::.shell_chars_regex), the file will betemporarily renamed with the special characters replaced by- (dash) instead of_ (underscore, as inprevious versions ofrmarkdown). This change willaffect users who render such files with caching (cache will beinvalidated and regenerated). The change is due to the fact that- is generally a safer character than_,especially for LaTeX output (#1396).
Added apkgdown site for thermarkdown package: https://rmarkdown.rstudio.com/docs/(thanks,
Fixed the bug #1593: in HTML documents, when a MathJax URL isused with a custom template, the source code of the MathJax library isincluded in the document. This bug was first declared inbookdown (thanks,
Forpdf_document(), do not override margins to 1inch when a custom document class or geometry settings are specified inthe YAML front matter (thanks,
The default value of theencoding argument in allfunctions in this package (such asrender() andrender_site()) has been changed fromgetOption("encoding") toUTF-8. We have beenhoping to support UTF-8 only inrmarkdown,knitr, and other related packages in the future. Formore info, you may readhttps://yihui.org/en/2018/11/biggest-regret-knitr/.
The optiontoc_float: true forhtml_document now preserves the text formatting (thanks,@codetrainee,#1548).
For theoutput_file argument ofrender(), a file extension will be automatically added ifthe 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,
TOC items are not correctly indented whentoc_floatis enabled for thehtml_document format (thanks,
Fixed rstudio/shiny#2307 where the second execution of ashiny_prerendred document withhrefdependencies would cause a prerender check error (thanks,
The*_files directory is not properly cleared due tothe inappropriate fix for #1503 and #1472 in the last version (thanks,@wxli0 #1553,
Added anoutput_extensions argument topdf_document() to make it possible to enable/disable Pandocextensions for the LaTeX output format (thanks,
Fixed file extensions of output files when using non-markdownPandoc extensions such asdocx+styles (#1494,
Added a new argumentextra_lines tolatex_dependency() to allow users to add extra lines ofLaTeX code after\usepackage{}. Also added a helperfunctionlatex_dependency_tikz() based onlatex_dependency() (#1502,
Fixed #1529: when the path of an Rmd file contains Unicodecharacters that cannot be represented in the system native encoding(especially on Windows),rmarkdown::render() mayfail.
Applied a correct fix to an oldplotly issueropensci/plotly#463.
HTML widgets used to be hidden when printing ioslides to PDF inChrome. Now they will be printed correctly.
render(output_format = 'all') may delete the figuredirectories that are still needed by certain output formats when oneoutput format doesn’t need its figure directory (thanks,
The<em> tags in the subtitle, date, andauthor are removed from the default HTML template (thanks,
Fixed #1483, which prevented the triangle to be displayed inFirefox when<details><summary>...</summary></details>was used (#1485,
Providedrmarkdown.pandoc.args as aknitr package option inknitr::opts_knit(#1468,
Added the exported functionpandoc_exec(), whichreturns 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
Added the LaTeX command\passthrough in the defaultLaTeX template for the--listings flag of Pandoc(rstudio/bookdown#591).
The icons inflexdashboard::valueBox() are not ofthe full sizes due to the upgrade of FontAwesome in #1340 in theprevious version (#1388, rstudio/flexdashboard#189).
Added the ability to generate tabset dropdowns, usable by addingthe.tabset-dropdown class to a header (e.g.,# Heading {.tabset .tabset-dropdown}) (#1405). Thanks
Thedarkly theme (a darker variant of the Bootswatchflatly theme) has been added tohtml_documentandhtml_notebook (#1409, #889).
Fixed a regression that caused scrollbars on code blocks when thesyntax highlighting theme is not the default (#654, #1399).
Fixed #1407: reactive expressions can break the section headersof 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 referencedocument.
Fixed the website navbar not being able to display submenusproperly (#721, #1426).
Added checks for shiny-prerendered documents to find all htmldependencies, match all execution packages, and match the major Rversion (#1420).
Added an argumentcache = TRUE to the internalfunctionrmarkdown:::find_pandoc(), so that users caninvalidate the cached path of Pandoc viarmarkdown:::find_pandoc(cache = FALSE) (thanks,
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,
Fixed #1471: Pandoc’s (version 2.x) syntax highlighting themesdon’t work well with the Bootstrap style (thanks,
Fixed the warnings in #1224 and #1288 when callingrender() with an absoluteoutput_dir orintermediates_dir.
Fixed #1300: callingrender() withintermediates_dir may fail when the intermediate dir is ona difference device or filesystem.
Fixed #1358: callingrender() withintermediates_dir will fail if the Rmd document containsbibliography files that are dynamically generated.
Added a new argumentslide_level topowerpoint_presentation() (#1270).
Thetinytex package has become a requireddependency (to build R Markdown to PDF).
Addedcompact-title variable to the LaTeX defaulttemplates to control use of LaTeXtitling package; defaultstotrue (#1284).
pdf_document(template = NULL) does not work(#1295).
Restore ability to use any HTML format with R Markdown Websites(#1328).
Addoptions argument topaged_table()to enable explicit passing of display options.
Addpandoc_citeproc_convert() function forconversion of bibliography files (e.g. BibTeX files).
Update to Font Awesome version 5.0.13 (#1340).
Addsite_resources() function for computing resourcefiles required for a website.
Exportdefault_site_generator() function.
Thelatex_document() format should not clean up thefigure directory (thanks,
Enable post processors that change the output file to specifythat the base post processor should still be applied to the originaloutput file.
powerpoint_presentation. If you want to test it, you willneed Pandoc >= 2.1 (#1231).tinytex::latexmk(), otherwise it is generatedbyrmarkdown:::latexmk(), which has been factored out andimproved in thetinytex package, so it is recommendedthat you install thetinytex package (#1222).Temporary files created inrender() may be cleanedup 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).
Whenpreserve_yaml = TRUE inmd_document(),toc = TRUE fails to create thetable of contents (thanks,
Suppress confusing error messages fromknitr::purl()duringrmarkdown::find_external_resources() (thanks,
Fixed the obscure errorError: path for html_dependency not found:, which was dueto the HTML dependency of highlight.js (thanks,
render_site() does not work with_site.yml that does not have theoutputsetting (#1189).
The variablesinput andoutput do notwork in Shiny R Markdown documents (#1193).
ioslides_presentation fails to embed images(#1197).
With Pandoc 2.x,github_document() generates thewrong filename extension.gfm-ascii_identifiers instead of.md, and line height of code blocks in the HTML preview istoo big (#1200).
Fixed an issue withdf_print: paged where row nameswhere not printed and added support forrownames.printoption to control when they print.
Addsmart option forword_document()format.
Save render intermediates when generating beamer presentations(fixes #1106).
Fixed issues when specifying NULL/null/empty parameter values(#729 and #762).
Better error message when unable to prerender a document.(#1125)
shiny::renderText() does not work in Markdownsection headings (#133).
Thevalue argument ofpandoc_variable_arg() can be missing now (#287).
Background colors and images are supported for ioslidespresentations (#687).
HTML widgets in an Rmd document cannot be rendered if another Rmddocument is rendered viarmarkdown::render() in thisdocument (#993).
Try harder to clean up temporary files created duringrender() (#820).
Wrong environment for evaluating R code chunks in Shiny RMarkdown docs (#1162, #1124).
Do not callbibtex to create the bibliography whenthere are no citations in the document and the output format ispdf_document() withcitation_package = 'natbib' (#1113).
render() will stop if the output format is PDF butthere are any errors during building the index or bibliography(#1166).
beamer_presentation() doesn’t work whencitation_package != 'none' (#1161).
File-based inputs don’t work in parameterized documents(#919).
rmarkdown is compatible with Pandoc 2.0 now (#1120).
render() withintermediates_dir failswith R plots (#500).
Added two new output formatslatex_document() andlatex_fragment() (#626).
Relative paths of images in HTML output should not be resolved toabsolute paths (#808).
render_site() does not support multiple outputformats for a single Rmd (#793).
Unicode characters may be scrambled when downloading the Rmdsource file using the download button generated byhtml_document(code_download = TRUE) (#722).
Upgraded highlight.js from v1.1 to v9.12.0 (#988, #907).
The argumentkeep_md = TRUE actually preserves theMarkdown output file fromknitr::knit() now (asdocumented). Previously, it generates a new Markdown file byconcatenating the YAML metadata (title, author, date) with the body ofthe original Markdown output file (#450).
Formd_document(), whenvariant == 'markdown' andperserve_yaml = TRUE, the Pandoc argument--standalone should not be used (#656).
Fixed an issue where headers with non-ASCII text would not belinked to correctly in the table of contents.
Support code folding for bash, python, sql, Rcpp, and Stanchunks.
Provide rmarkdown.pandoc.id_prefix as Knit option
Fixed two issue withdf_print: paged, one wouldprevent rendering data with lists of lists and the other where thecolumn type would get cut off.
Better support forcitation_package: biblatex inpdf_document() (#1062).
On certain Windows platforms, compiling LaTeX to PDF may failbecausesystem2(stdout = FALSE) is not supported, in whichcase the defaultsystem2() will be used (#1061).
Allow paged tables to render even when page load / visibility hasa long delay
Fixed an issue where code within Shiny pre-rendered documents wasnot rendered correctly.
Addincludes parameter tohtml_fragmentformat.
Use RStudio redirection URL to replace deprecated MathJaxCDN
data.table expressions involving:= areno longer automatically printed within R Markdown documents.(#829)
Fix #910: the extra_dependencies argument of pdf_document() doesnot work when no code chunks contain LaTeX dependencies.
The extra_dependencies of pdf_document() can also take acharacter vector of LaTeX package names, or a named list of LaTeXpackage options (with names being package names), which makes it mucheasier to express LaTeX dependencies via YAML.
Automatically ignore packrat directory for render_site
Fix #943: escape end tags in shiny_prerendered codecontexts
Add support for sticky tabs in html_document via tabset-stickyclass
Process Rmd files with lowercase extension (.rmd) inrender_site
Fix stack space consumption issues with large JS payloads inchunks
Addsection_divs argument to html_document andhtml_fragment to control generation of section tags/divs.
Remove data-context=“(data|server|server-start)” chunks from HTMLserved to client in shiny_prerendered
Fix v1.2 regression in ordering of CSS forioslides_presentation.
Fix rendering of pagedtables within html_notebookformat.
Ensure that html_prerendered UI is never cached.
Addciteproc argument to YAML header; controlswhether pandoc-citeproc is used (#831)
Add support for df_print to handle additional dplyr classes:grouped_df, rowwise_df and tbl_sql.
Add newruntime: shiny_prerendered mode forinteractive documents.
Prepend “section-” to ids in runtime: shiny[_prerendered] toeliminate potential conflicts with shiny output ids
Use html_dependencies for highlight.js, pagedtables, slidy,ioslides, & navigation (improved dependency behavior for runtime:shiny[_prerendered])
Serialize runtime: shiny[_prerendered] dependencies to JSONrather than .rds
ioslides: check for null before concatenating attr[“class”](#836)
Add rmarkdown.onKnit/onKnitCompleted package hooks
Non-ASCII keys in yaml file should be marked to UTF8 as well,when read into R as the name of a list (#841)
Remove key-column special-case left alignment in pagedtables(#829)
Replace backslashes in floating TOC headings (#849)
Suggests rather than Imports for tibble (R 3.0compatibility)
Addpaged_table function for printing paged tableswithin HTML documents
Support{.active} attribute for setting initiallyactive tab (#789)
Addknit_root_dir argument torender()and YAML header, a convenience for setting knitr’s root.diroption
Improve alignment of text in sub-topics for floating TOC
Bibliography file paths in YAML containing forward slashes couldnot be rendered (#875)
Fixed an issue where attempts to render an R Notebook could failif the path contained multibyte characters.
Fixed an issue where the default Beamer template did not providevertical padding between paragraphs with certain versions of pandoc(<= 1.17.2).
Try to install latexmk automatically on Windows
Addeddf_print option to html_document format foroptionally printing data frames usingknitr::kable, thetibble package, or an arbitrary function
Fix for render_site not showing Chinese characterscorrectly
Fix for ignoring knit_meta that is explicitly passed torender
Parameter editing: don’t allow NULL to overwrite previousstate
Parameter editing: fix incorrect name for parameters withexpressions
Parameter editing: allow multiple values when the parameter isconfigured to use a “multiple” selector
Switched the order in which format dependencies are added forhtml_document so thatextra_dependencies areadded at the end, after bootstrap, etc. (#737)
pdf_document(keep_tex = TRUE) will generate the .texdocument even if PDF conversion fails (#779).
Move latex header includes to just before\begin{document}
Special ‘global’ chunk label for runtime: shiny which designatesa chunk to be run once and only once in the global environment (startupperformance improvement for multi-user shiny documents)
Ensure supporting files are writeable (#800)
Make the “show code” buttons more CSS-friendly (#795)
Excludeoutput_dir from site files (#803)
Exportnavbar_html andyaml_front_matter functions
toc_float no longer automatically setstoc = TRUE
Added an argumenterror topandoc_available() to signal an error when (iferror = TRUE) pandoc with the required version is notfound.
Addedhtml_notebook format for creating HTMLdocuments that include source code and output.
Addedresolve_output_format function (useful forfront ends that need to mirror the default format resolution logic ofrender).
Addedcode_download option tohtml_document to provide an option to embed a downloadablecopy of the Rmd source code within the document.
Addedslide_level option to ioslides_presentation toset the level of heading used for individual slides.
Addedhard_line_breaks option togithub_document to deal with change in behavior of GitHub’smarkdown renderer with respect to line breaks.
Use “markdown_strict” rather than “markdown” forpandoc_self_contained_html when pandoc >= 1.17 (pandochanging bug was fixed in this version)
Default highlighting engine forhtml_document nowhighlights bash, c++, css, ini, javascript, perl, python, r, ruby,scala, stan and xml
Addedprint sub-option totoc_float tocontrol whether the table of contents appears when user prints out theHTML page.
Addedreadme option tohtml_vignettewhich automatically creates a package level README.md (for GitHub) inaddition to rendering the vignette.
Support forkeep_md inhtml_vignetteformat.
Try to install the latexmk package automatically on Windows ifthe executable latexmk.exe exists.
Ability to setopts_hooks inknitr_options() (#672)
Addedrender_site and related functions forrendering collections of documents within a directory as awebsite.
Ability to define html_document navigation bar using simple yamlformat.
Addedpre_knit andpost_knit hooks foroutput formats.
DiscoverLaTeX dependencies and add them to the.tex preamble (#647)
Added newall_output_formats function to enumerateall output formats registered for an Rmd.
Changefig_caption default to TRUE for allformats
Changefig_retina to 2 for HTML formats (no longercontingent onfig_caption)
Ensure pandoc binary exists before binding to pandoc directory(#632)
Handle relative paths for ‘default_output_format’ (#638)
Eliminate duplicate viewport meta tag from html_document
Added biblatex biblio-style support to the LaTeX template forPandoc 1.15.2 (#643)
Allow override of header font-size in html_document custom css(#652)
Fix for horizontal scrollbars appearing w/ code folding(#654)
Specifyingtoc_float inhtml_documentnow automatically setstoc = TRUE
Enable per-header opt-out oftoc-float via{.toc-ignore} attribute
Correctly handle soft line breaks in ioslides_presentation(#661)
Don’t use text-muted for code folding btns (text visibility innon-default themes)
Fix for rendering non-HTML formats from .md files (resolveruntime before knit)
html_dependency_bootstrap now accepts theme =“default” argument
Use pandoc 1.17.0.2 compatible LaTeX template when pandoc >=1.17.0.2
Support custom template forioslides_presentation
Addedanalytics option forioslides_presentation for Google Analytics
Removed the extra tag<p></p> aroundHTML output (typically generated by htmltools) from code chunks, toavoid invalid HTML like<p><div>...</div><p>(#685)
Added odt_document format for OpenDocument Text output
Added rtf_document format for Rich Text Format output
Added github_document format for GitHub Flavored Markdownoutput
Only apply white background for themed HTML documents(#588)
Added
to the default HTML template to make it work better with mobilebrowsers. (#589)
Specify –filter pandoc-citeproc after custom pandoc args
Long lines in code blocks will be wrapped in thehtml_vignette() output (#595)
Added new argumentsrun_pandoc = TRUE andknit_meta = NULL torender(). See the helppage ofrender for details. (#594)
Thetufte_handout format now delegates to thetufte package and no longer provides a basetemplate.
Use pandoc 1.15.2 compatible LaTeX template when pandoc >=1.15.2
Fix issue with Beamer template and pandoc 1.15.2
Updated embedded JQuery to v1.11.3 and Bootstrap tov3.3.5.
Expose core HTML dependencies for use by custom R Markdownformats.
Newhtml_document themes: “lumen”, “paper”,“sandstone”, “simplex”, & “yeti”.
Ability to include bootstrap navbar for multi-pagehtml_document websites
Added support forabstract field tohtml_document format
Added support for floating table of contents (via tocify) tohtml_document
Added support for tabsets via use of {.tabset} class on top-levelheadings
Added support for folding/unfolding of R code chunks inhtml_document
Supporturl references in CSS files forruntime: shiny
Change name of common options file to_output.yml
Tweak pandoc conversion used inpandoc_self_contained_html to prevent hanging with largescript elements (use “markdown” rather than “markdown-strict” as inputformat)
The filename extension .bib will be removed before bibliographyfiles are passed to Pandoc when the output is LaTeX/PDF and the citationpackage natbib or biblatex is used on Windows. This is because bibtex inMikTeX will always add the extension .bib to bibliography files, e.g. ittreats foo.bib as foo.bib.bib. (#623)
Render Shiny documents in a clean environment; fixes issue inwhich code in Shiny documents could access internal R Markdownstate
Fix for a bug causing certain files to be deleted as intermediatefiles. (#580)
PDF/LaTeX output no longer uses natbib as the citation package bydefault. If you do want to use natbib or biblatex, you may still use theargument citation_package = ‘natbib’ or ‘biblatex’. (#577)
Fix for JS exception in slidy_presentation when served from thefilesystem (don’t call pushState for file:// urls)
Escape single quotes in file paths
Fix for missing resources when rendering a filename with shellcharacters
For PDF/LaTeX output, citations are processed via natbib orbiblatex instead of pandoc-citeproc. The ciation package natbib orbiblatex can be chosen using the argumentcitation_packageinpdf_document(),beamer_presentation(), andtufte_handout(). LaTeX is compiled to PDF via latexmk(https://www.ctan.org/pkg/latexmk/); if it is not installed, a simpleemulation will be used (run pdflatex/xelatex/lualatex, bibtex, andmakeindex a few times). You are recommended to install latexmk, andplease note latexmk requires a Perl installation (this is importantespecially for Windows users).
Always use the graphics package for PDF output
Fix for the error “cannot change value of locked binding for‘metadata’” when one call of rmarkdown::render() is nested in anotherone (#248)
Fix for an issue causing image paths to be rendered incorrectlyin Windows when rendering anhtml_document withself_contained: false and a path is passed in argumentoutput_dir. (#551)
Add always_allow_html option for preventing errors whenhtml_dependencies are rendered in non-HTML formats (e.g. pdf_document orword_document).
Fix for an issue causing resources not to be discovered in somedocuments containing an empty quoted string ("") in an Rchunk.
Support for table of contents in word_document (requires pandoc>= 1.14)
Support for opts_template in knitr options
Don’t implicitly discover directories when scanning for dependentresources
Fix for slide numbers not showing up in ioslides when served fromthe filesystem (don’t call pushState for file:// urls)
Remove inlining of bootstrap CSS (was workaround for bug nowfixed in pandoc)
Allow specifying an R file in calls tofind_all_resources
Add support for keep_md to word_document
Increase pandoc stack size to 512M (often required for base64encoding e.g. larger embedded leaflet maps). Stack size can also becontrolled by the pandoc.stack.size option.
Allow YAML front matter to be terminated with …
Automatically generate a user-interface (via a Shiny application)for user specification of values in parameterized reports.
Add tightlist macro for compatibility with pandoc >=1.14
Bugfix: Don’t merge render params recursively withknit_params
Bugfix: Handle slashes correctly on Windows forslidy_presentation when self_contained = FALSE
Add latex_engine option to beamer_presentation format
Ensure that when LANG=en_US pandoc receives en_US.UTF-8 (preventhang)
Generate MathJax compatible output when using html_fragmentformat.
Use pandoc built-in template for Beamer
Use pandoc 1.14 compatible LaTeX template when pandoc >=1.14
Inline bootstrap.min.css to workaround pandoc 1.14 base64encoding issue
Add support for discovering references to external resources whenthe document output format is PDF
Fix several issues causing pandoc errors when an intermediatesdirectory is used, including during render for Shiny documents
Support for parameterized reports. Parameter names and defaultvalues are defined in YAML and can be specified via the ‘params’argument to the render function
‘md_extensions’ option to enable/disable markdown extensions forinput files
Automatically discover and include dependent resources(e.g. images, css, etc.) for interactive documents.
Added pandoc_version function.
Use VignetteEncoding directive in html_vignette format
Fix issues related to use of non-ASCII characters inioslides_presentation
Non-ASCII characters in the YAML data are not marked with theUTF-8 encoding when they are read into R, so character strings inrmarkdown::metadata may be displayed incorrectly(#420)
Various improvements to tufte_handout format
Add ‘dev’ option to output formats to specify output device forfigures
Enable use of footnotes in titles of LaTeX documents
Various improvements related to directory detection/handling onWindows
Sync to the latest LaTeX and Beamer templates frompandoc-templates
Switched from the Bootstrap 2 web framework to Bootstrap 3. Thisis designed to work with Shiny >= 0.10.3, which has made the sameswitch
Add CSS to restore responsive image behavior from Bootstrap2
Use a more subtle treatment for inline code in Bootstrap themeddocuments
Improved support for multiple authors in ioslides
Workaround for poor rendering of ioslides multi-columns lists inSafari 8
Serve index.html as fallback default file forrmarkdown::run
Initial release to CRAN