如果我在RStudio中开始一个新的.Rmd
演示文稿
---
title: "Unbetitled"
author: "Unbeknown"
date: "Tuesday, July 01, 2014"
output: ioslides_presentation
---
## Slide 1
Custom text
## Slide 2
Lorem ipsum
```{r}
hist(rnorm(100))
```
将其保存为编码UTF-8并点击“编织HTML”,我得到所需的输出(弹出预览窗口的幻灯片)。但是,如果我添加(例如在幻灯片上)本地化的字符,例如š,č,ć和ž,我会收到一个错误(我已经用...审查直接路径):
.../Pandoc/pandoc encoding_issues_pandoc.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output encoding_issues_pandoc.html --smart --email-obfuscation none --self-contained --variable transition=0.4 --template ...\3.1\rmarkdown\rmd\ioslides\default.html --mathjax --variable mathjax-url:https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML --variable ioslides-url=...\3.1\rmarkdown\rmd\ioslides\ioslides-13.5.1
output file: encoding_issues_pandoc.knit.md
.../Pandoc/pandoc encoding_issues_pandoc.utf8.md --to ioslides_presentation.lua --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output ...\Temp\RtmpMDfdFm\ioslides-output2298674c3f51.html --data-dir .
pandoc.exe: Cannot decode byte '\xc4': Data.Text.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream
Error: pandoc document conversion failed with error 1
In addition: Warning message:
running command '.../Pandoc/pandoc encoding_issues_pandoc.utf8.md --to ioslides_presentation.lua --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output ...\Temp\RtmpMDfdFm\ioslides-output2298674c3f51.html --data-dir .' had status 1
Execution halted
如果删除有问题的字符,文档会被正确转换。有人可以了解这里发生的事情吗?
更新1
如果我使用RStudio使用
命令手工编织文档pandoc encoding_issues_pandoc.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output encoding_issues_pandoc.html --smart --email-obfuscation none --self-contained --variable transition=0.4 --template ..\Documents\R\win-library\3.1\rmarkdown\rmd\ioslides\default.html --mathjax --variable mathjax-url:https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML --variable ioslides-url=..\Documents\R\win-library\3.1\rmarkdown\rmd\ioslides\ioslides-13.5.1
它很顺利。当我执行第二部分时,调用.lua
文件时会出现问题。
pandoc encoding_issues_pandoc.md --to ..\Documents\R\win-library\3.1\rmarkdown\rmd\ioslides\ioslides_presentation.lua --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output test --data-dir .
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smaller'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smaller'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'fig_caption'
WARNING: Undefined function 'base64_images'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smaller'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
WARNING: Undefined function 'smart'
pandoc: Cannot decode byte '\xc4': Data.Text.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream