在Rmarkdown中插入带有图像的标题页以呈现pdf文档
在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
---
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,没有。还没有得到这条路线的工作。检查答案是使用乳胶的解决方案