Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Yaml 在Rmarkdown中对html文档使用before_body_Yaml_R Markdown - Fatal编程技术网

Yaml 在Rmarkdown中对html文档使用before_body

Yaml 在Rmarkdown中对html文档使用before_body,yaml,r-markdown,Yaml,R Markdown,我想在另一个html文档的顶部添加一个图像(一个名为“Logo.html”的html文件)。 为此,我使用“身体前”: 我将Logo.html保存在与Rmarkdown相同的文件中,在“编织”rmd时出现以下错误: pandoc.exe:Logo.html:openFile:不存在(没有此类文件或目录) 是否有一个特定的地方放置我的“Logo.html”?你知道我的代码中有什么不正确吗 输出: html_文件: include: before_body: Logo.html fig_ca

我想在另一个html文档的顶部添加一个图像(一个名为“Logo.html”的html文件)。 为此,我使用“身体前”:

我将Logo.html保存在与Rmarkdown相同的文件中,在“编织”rmd时出现以下错误: pandoc.exe:Logo.html:openFile:不存在(没有此类文件或目录)

是否有一个特定的地方放置我的“Logo.html”?你知道我的代码中有什么不正确吗

输出:

html_文件:

include:

  before_body: Logo.html

fig_caption: true
code_folding: hide

必须小心YAML参数的缩进和嵌套。 这对我很有用:

---
output: 
  html_document:
    includes:
      before_body: Logo.html
fig_caption: true
code_folding: hide
---

谢谢,我意识到我的文件名是“Logo.htm”。。。我还有一个问题,我想我的图像在我的文件的右边,我怎么能做到?