Skip to content

knitr 1.22

Compare
Choose a tag to compare
@yihui yihui released this 08 Mar 23:46
· 756 commits to master since this release

NEW FEATURES

  • Added chunk options class.error, class.warning, and class.message to customize the CSS classes for errors, warnings, and messages in R Markdown output, respectively (thanks, @gadenbuie, #1676).

  • Added a new engine sass/scss to convert Sass/SCSS to CSS using either the sass R package (LibSass) or Dart Sass executable (when R package not found, the engine option engine.opts = list(package = FALSE), or engine.path to executable is provided). After conversion, resulting CSS is treated as in the CSS engine (thanks, @emilyriederer, #1666).

  • The cat engine supports the chunk option eval = FALSE now (thanks, @HanOostdijk, #1618).

  • The chunk option out.extra can be used to include extra attributes for the <iframe> generated from knitr::include_url() or knitr::include_app() (thanks, @jvcasillas, #1648).

BUG FIXES

MAJOR CHANGES

  • knitr::knit() starts to warn against non-UTF8 encodings (Why?). In the future, we will only support UTF-8 input. If your input file is not encoded in UTF-8, we strongly recommend that you re-save it with UTF-8.

  • Removed the encoding arguments in knitr::pandoc(), knitr::knit2pdf(), knitr2wp(), and knitr::Sweave2knitr(). The input files must be encoded in UTF-8.

  • knitr::knit2html() still has the encoding argument, but it only supports UTF-8 internally.

MINOR CHANGES

  • Changed tools::texi2dvi() to tinytex::latexmk() for the tikz engine to compile TikZ graphics to other foramts (e.g., svg or png). This requires the tinytex package >= v0.10.10: https://github.com/yihui/tinytex.

  • Empty lines are no longer removed in the output of purl() (thanks, Marius Hofert).