【发布时间】:2021-11-09 05:21:14
【问题描述】:
在写博文时,我经常手动编织文档来检查结果,并且输出曾经是正常的html_document。但是,在最近的更新之后,在 blogdown 目录下手动编织文档不再产生 html_document 输出。相反,它会在乳胶公式和图形无法正确显示的情况下产生如下内容(以 Rmd 文件的默认内容为例):
这是 RStudio 中“R Markdown”控制台的输出:
/usr/lib/rstudio/bin/pandoc/pandoc +RTS -K512m -RTS 1.knit.md
--to html4
--from markdown+autolink_bare_uris+tex_math_single_backslash
--output 1.html~
--lua-filter /usr/local/lib/R/site-library/bookdown/rmarkdown/lua/custom-environment.lua
--lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua
--lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua
--wrap preserve -M link-citations=true
--standalone
--section-divs
--template /usr/local/lib/R/site-library/blogdown/resources/template-minimal.html
--no-highlight
--include-in-header /tmp/RtmphBPBhs/rmarkdown-str73fd791178f2.html
--mathjax
如果我在 blogdown 目录之外编写相同的文档,则结果输出如预期:
“R Markdown”控制台的输出是:
/usr/lib/rstudio/bin/pandoc/pandoc +RTS -K512m -RTS 1.knit.md
--to html4
--from markdown+autolink_bare_uris+tex_math_single_backslash
--output 1.html
--lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua
--lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua
--self-contained
--variable bs3=TRUE
--standalone
--section-divs
--template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html
--no-highlight
--variable highlightjs=1
--variable theme=bootstrap
--include-in-header /tmp/RtmpXfya1w/rmarkdown-str724a4171c407.html
--mathjax
--variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
当我单击 RStudio 中的“编织”按钮时会发生什么?如何调整行为,以便在 blogdown 目录中编织文档时生成 html_output 文件?
【问题讨论】:
标签: r r-markdown rstudio blogdown