因此,有一些关于 SO 的问题,但似乎没有一个问题可以解决这个特定问题。
我正在寻找使用自定义 CSS 模板自定义从 RStudio 创建的 RMarkdown/Slidy 演示文稿。
- RStudio 已经允许使用内置的 Bootswatch 主题进行最少的定制,因此可以访问
output: slidy presentation / theme: readable
- 还有其他未内置的 Bootswatch 主题;特别是我可能想使用
Cyborg
orSlate
,它有一个漂亮的深色背景(而不是白色)
以下是使用自定义文件覆盖 Slidy CSS 的直观解决方案:
```{css}
<link href="bootstrap-slate.css" rel="stylesheet">
```
但是,它失败了:
pandoc.exe: Could not fetch .\../fonts/glyphicons-halflings-regular.eot
.\../fonts/glyphicons-halflings-regular.eot: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 67
In addition: Warning message:
running command '"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS segmentations.utf8.md --to slidy --from
markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --
output segmentations.html --smart --email-obfuscation none --self-contained --template "C:\Users\ME\Documents\R\R-3.3.3\library\rmarkdown\rmd\slidy\default.html" --include-in-header
"C:\Users\ME\AppData\Local\Temp\RtmpGYLCFf\rmarkdown-str378022cf50b0.html" --mathjax --variable "mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --highlight-style pygments' had status 67
Execution halted
欢迎大家提出意见。请注意,文档 rMarkdown 文档中的解决方案不起作用。解决方案复制到这里以供参考:
---
output:
slidy_presentation:
css: styles.css ##
---
Error in yaml::yaml.load(string, ...) :
Scanner error: mapping values are not allowed in this context at line 5, column 21
Calls: <Anonymous> ... parse_yaml_front_matter -> yaml_load_utf8 -> <Anonymous> -> .Call
Execution halted