惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
罗磊的独立博客
IT之家
IT之家
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
博客园 - Franky
博客园 - 聂微东
博客园_首页
爱范儿
爱范儿
量子位
博客园 - 三生石上(FineUI控件)
G
Google Developers Blog
Martin Fowler
Martin Fowler
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog
Vercel News
Vercel News
腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
Engineering at Meta
Engineering at Meta

Homepage on Yihui Xie | 谢益辉

Should I Ask for Sponsorship? - Yihui Xie | 谢益辉 A Review of **knitr** Updates from 2024 to 2026 - Yihui Xie | 谢益辉 The lt Package: Lightweight HTML Tables for R (and Beyond) - Yihui Xie | 谢益辉 Bye, Stack Overflow - Yihui Xie | 谢益辉 Converting testthat Tests to testit - Yihui Xie | 谢益辉 Reflections on AI-assisted Programming - Yihui Xie | 谢益辉 Preliminary Support for Typst in knitr - Yihui Xie | 谢益辉 R.I.P., Tomas Kalibera - Yihui Xie | 谢益辉 An Introduction to xfun - Yihui Xie | 谢益辉 tinyimg: An R Package for Compressing Images - Yihui Xie | 谢益辉 The Surprising Slowness of `textConnection()` in R - Yihui Xie | 谢益辉 A CDN-backed CTAN Mirror: `tlnet.yihui.org` - Yihui Xie | 谢益辉 Announcing TinyTeX Binaries for arm64 and musl-based Linux - Yihui Xie | 谢益辉 TinyTeX on macOS: No More Messing with `/usr/local/bin` - Yihui Xie | 谢益辉 R.I.P., John Fox - Yihui Xie | 谢益辉 R.I.P., Fritz Leisch - Yihui Xie | 谢益辉 Bye, Hex Stickers - Yihui Xie | 谢益辉 Navigating CRAN's Reverse Dependency Check Logs - Yihui Xie | 谢益辉 Viewing Nested Lists with `xfun::tabset()` - Yihui Xie | 谢益辉
A Review of **rmarkdown** Updates from 2024 to 2026 - Yih...
Yihui Xie · 2026-09-09 · via Homepage on Yihui Xie | 谢益辉

Back in 2022, I promised that R Markdown wouldn’t die. In this post, I’ll give a summary of notable updates in rmarkdown v2.26–v2.32 (2024–2026). For the full changelog, please see the release notes on GitHub.

rmarkdown 2.26 (2024-03-05)

Avoid corrupting input files

A subtle bug could cause rmarkdown to silently overwrite the input .Rmd file if certain conditions were met during rendering. This has been fixed (#2534).

fig_crop: auto aligned with knitr

The output format option fig_crop: auto now uses the same logic as knitr to decide whether PDF figure cropping is possible (checking for the pdfcrop tool). Previously rmarkdown had its own, slightly different check that could give inconsistent results (yihui/knitr#2246).

Removed stringr dependency

stringr was used in only one place and the equivalent base R code is simple, so it was removed. One fewer transitive dependency for all rmarkdown users (#2530).

rmarkdown 2.27 (2024-05-20)

Configurable auxiliary-files suffix

By default, rmarkdown writes HTML dependencies into a <name>_files/ directory. On Microsoft OneDrive and Google Drive this suffix can sometimes cause the folder to be randomly deleted. You can now configure a different suffix in your .Rprofile, e.g.,

options(rmarkdown.files.suffix = "_rmdfiles")

and the directory will be <name>_rmdfiles/ instead (#2550).

Image path regression fixed

A regression in 2.26 broke absolute image paths when output_dir is set. Absolute paths pointing inside the output directory are now correctly made relative to output_dir again.

rmarkdown 2.28 (2024-08-17)

beamer_presentation supports LaTeX dependencies

You can now declare LaTeX dependencies for Beamer slides either via the new extra_dependencies argument or from within a chunk, e.g.,

---
output:
  beamer_presentation:
    extra_dependencies: ["booktabs", "longtable"]
---

or inline:

knitr::asis_output("", meta = list(
  rmarkdown::latex_dependency("longtable")
))

This makes it easier to include packages like longtable or booktabs without patching the LaTeX template (#2478).

Table row classes for Pandoc ≥ 3.2.1

Pandoc 3.2.1 changed how it names table row classes, dropping odd, even, and header. rmarkdown now adds them back so existing CSS that styles table rows continues to work (#2567).

rmarkdown 2.29 (2024-11-04)

knit_params_ask() uses select for multi-value parameters

When a parameter declared in YAML allows multiple values, the interactive parameter dialog now shows a select (multi-choice) input instead of a radio button, e.g.,

params:
  primaries:
    choices: ["red", "yellow", "blue"]
    multiple: true

Previously a radio input was incorrectly used, making it impossible to select more than one value at a time. Single-value parameters with fewer than five choices still use radio by default (which is configurable) (#2576).

rmarkdown 2.30 (2025-09-29)

Pandoc compatibility updates

The deprecated --no-highlight Pandoc argument was replaced with --syntax-highlighting=none for Pandoc ≥ 3.8, and the long-obsolete |> / => syntax-highlighting workaround (unnecessary since Pandoc 2.18, over three years ago) was removed (#2602, #2290).

convert_ipynb() preserves raw cells without format

Raw notebook cells that have no format field in their metadata are no longer silently dropped during conversion. For example, a cell like

{
  "cell_type": "raw",
  "source": ["some raw content"]
}

was previously lost; it is now passed through to the output (#2587).

render() fixed for .md → PDF

A bug prevented render() from working when converting a plain .md file directly to PDF. Fixed (#2599).

pandoc_convert() errors when Pandoc is absent

Previously pandoc_convert() would fail silently or with a confusing message when Pandoc was not available. It now throws an informative error immediately, making the root cause obvious (#2600).

rmarkdown 2.31 (2026-03-26)

Base64 images work in non-HTML output

Previously, base64-encoded images only worked correctly in HTML output. They now work in non-HTML formats (such as PDF) as well (#2604).

rmarkdown 2.32 (2026-09-07)

LaTeX auxiliary files written to output directory

When rendering to PDF, LaTeX auxiliary files (.aux, .log, etc.) are now written to output_dir rather than the input file’s directory. Previously latexmk() ran in the input directory, so rendering failed when that directory was read-only—common in production deployments or when the document lives in a shared read-only location, e.g.,

rmarkdown::render("report.Rmd", output_dir = "docs/")
# Now works even if the directory containing report.Rmd is read-only

(#1975, #1615)

intermediates_dir PDF rendering fixed

Two related bugs with the intermediates_dir argument were fixed:

  1. A cannot open file '<name>.tex' error when Pandoc wrote the intermediate .tex into intermediates_dir but rmarkdown looked for it in the input directory. The .tex is now resolved to its actual location.
  2. With keep_tex: true, the retained .tex is now moved next to the output instead of being left behind in intermediates_dir (#2183).

lib_dir outside the output directory

HTML output no longer errors when lib_dir points outside output_dir, e.g.,

rmarkdown::render("a/report.Rmd",
  output_dir = "a/",
  lib_dir     = "../shared-libs/")

Dependencies are now referenced with an up-tree relative path instead of failing with "The path <file> does not appear to be a descendant of <dir>". This lets documents in sibling subdirectories share a single library directory (#146, #1859, #2199).

Minimum Pandoc version raised to 2.8

Support for Pandoc 1.x and early 2.x was dropped, removing several internal version guards. Pandoc 2.8 was released in 2019, so this should affect very few users in practice (#2623).

Relicensed to MIT

rmarkdown is now licensed under MIT (previously GPL-3) (#2615).

Parallel render() via fork clusters fixed

When calling render() in parallel via parallel::mclapply() or a fork cluster, processes could accidentally delete each other’s temp files because all processes shared the same tempdir(). Temp files are now tracked per process, so sibling renders no longer interfere (#1632).

ioslides captions fixed for Pandoc 3

Captioned figures disappeared from ioslides_presentation() output when using Pandoc 3, which represents standalone captioned images as Figure elements not handled by the custom writer. rmarkdown now handles them correctly (#2607).

Acknowledgements

I want to thank all contributors who filed issues or submitted pull requests for these releases: André Veríssimo (@averissimo), @atusy, Sebastian Meyer (@bastistician), Michal Burda (@beerda), @BerndGit, Brian Perdomo (@brianperdomo), @certara-tzweers, Christophe Dervieux (@cderv), Etienne Bacher (@etiennebacher), Gábor Csárdi (@gaborcsardi), Jiri Novotny (@gorgitko), Jonathan Guerra (@jonathan-g), @jsinnett, @jszhao, Jiří Moravec (@J-Moravec), Karan (@karangattu), @katrinabrock, Leonidas Zhak (@LeonidasZhak), Miriam Rainers (@mrainers), Rémi Thériault (@rempsyc), Siddhartha Bagaria (@siddharthab), Tomasz Kalinowski (@t-kalinowski), @therealgenna, Ruiyang Wu (@ywwry66).

In particular, I want to highlight Jonathan Guerra for his perseverance on the PR #2199 for five whole years. “Who speaks of victory? To endure (70+ times of git merge) is all.” Finally, I have had the time and courage to look at his PR and fix the problem (apologies for the delay!), which has removed an unreasonable requirement in rmarkdown’s lib_dir argument, and the original request goes all the way back to 2014 with many upvotes on related issues! I’m really glad that this problem is gone at last. Similarly, there have been some other long-lasting annoying bugs like #1975 and #1632, which were also upvoted by many users and are now gone.

If you still use R Markdown (cool as a cucumber), I hope you will enjoy the new releases. As usual, please feel free to file issues or send pull requests on GitHub if you need anything. Thanks!

Donate

As a freelancer (currently working as a contractor) and a dad of three kids, I truly appreciate your donation to support my writing and open-source software development! Your contribution helps me cope with financial uncertainty better, so I can spend more time on producing high-quality content and software. You can make a donation through methods below.

  • Venmo: @yihui_xie, or Zelle: [email protected]

  • Paypal

    • If you have a Paypal account, you can follow the link https://paypal.me/YihuiXie or find me on Paypal via my email [email protected]. Please choose the payment type as “Family and Friends” (instead of “Goods and Services”) to avoid extra fees.

    • If you don’t have Paypal, you may donate through this link via your debit or credit card. Paypal will charge a fee on my side.

  • Other ways:

    WeChat Pay (微信支付:谢益辉) Alipay (支付宝:谢益辉)
    WeChat Pay QR code Alipay QR code

When sending money, please be sure to add a note “gift” or “donation” if possible, so it won’t be treated as my taxable income but a genuine gift. Needless to say, donation is completely voluntary and I appreciate any amount you can give.

Please feel free to email me if you prefer a different way to give. Thank you very much!

I’ll give back a significant portion of the donations to the open-source community and charities. For the record, I received about $30,000 in total (before tax) in 2024-25, and gave back about $15,000 (after tax).