【发布时间】:2019-04-10 20:09:38
【问题描述】:
虽然用 html 渲染很好,但 Rmd 没有渲染!有一个similar question,但没有得到答复。 jpg 也位于本地目录中,因为乳胶无法处理 http// 路径
这里是一个可复现的例子(图片存在,html模式下可以渲染):
---
title: 'Title'
author: "SQC"
date: "30 march 2019"
output:
pdf_document:
toc: yes
toc_depth: '2'
html_document:
keep_md: yes
number_sections: yes
toc: yes
toc_depth: 2
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Some text.
{width=500px}
more text...
评论:按照链接答案中的建议,我添加了
```{r}
getwd()
list.files("C:/path2/", full.names=TRUE)
```
那么错误就是
"C:/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to 乳胶——来自 markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output test.tex --table-of-contents --toc-depth 2 --template "C:\R\R-3.5.1\library\rmarkdown\rmd\latex\default-1.17.0.2.tex" --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable "geometry:margin=1in" --variable "compact-title:yes" 输出文件:test.knit.md
! LaTeX 错误:找不到文件“fancyvrb.sty”。
!紧急停止。
Fehler:无法编译 test.tex。有关更多信息,请参阅 test.log。 安然无恙
再次,我通过重新编写 html 知道一切正常:路径存在,文件存在并被列出。
【问题讨论】:
-
见这里:github.com/rstudio/rmarkdown/issues/359 你必须安装一些额外的乳胶包。
-
@J_F 我现在不想改变我正在运行的 miktex。但可能还有另一种解决方案here。不幸的是,这现在不起作用:
parse error - unexpected end of input; expected '}'
标签: windows r-markdown jpeg