Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/69.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
在Rmarkdown中插入带有图像的标题页以呈现pdf文档_R_Pdf_Markdown_R Markdown - Fatal编程技术网

在Rmarkdown中插入带有图像的标题页以呈现pdf文档

在Rmarkdown中插入带有图像的标题页以呈现pdf文档,r,pdf,markdown,r-markdown,R,Pdf,Markdown,R Markdown,在Rmarkdown中,以下内容设置生成pdf文档的上下文: --- title: "My Report" author: NDE output: pdf_document: fig_caption: true toc: true highlight: kate --- 我想在目录打印之前插入一个带有图像的标题页。有什么方法可以实现它吗?对我来说,它使用LaTeX命令\clearpage和\tableofcontents: --- title: "image before to

在Rmarkdown中,以下内容设置生成pdf文档的上下文:

---
title: "My Report"
author: NDE
output:
  pdf_document:
  fig_caption: true
  toc: true
  highlight: kate
---

我想在目录打印之前插入一个带有图像的标题页。有什么方法可以实现它吗?

对我来说,它使用LaTeX命令
\clearpage
\tableofcontents

---
title: "image before toc"
output: pdf_document
---

\centering

![Caption](folder/image.png)

\raggedright
\clearpage
\tableofcontents

# header 1
lore ipsum

## header 2
lore ipsum 

## header 3
lore ipsum 

# header 4
如果您想在标题页上显示目录,只需退出
\clearpage
命令即可

我包括了
\centering
\raggedright
命令,以使标题页上的图像居中,而不是文本居中


希望这对你有用。

@隔壁工程师:你能弄明白吗?@Anna,没有。还没有得到这条路线的工作。检查答案是使用乳胶的解决方案