【发布时间】:2015-12-05 02:35:30
【问题描述】:
我是 Markdown 的新手,想在每一页上制作带有大学(和其他)标志的 pdf 文件。我尝试使用fancyheadings,但遇到了问题:
仅当我在文档中调用图像时,将图像放在标题中才有效,否则不会生成 pdf
注意:我还必须设置标题高度,否则第 2 页将无法使用 - \setlength{\headheight}{2.4 cm}。
有什么建议是问题所在? (在 Rstudio 中使用 knit,全部全新安装)
---
title: "Test"
author: "Author Name"
header-includes:
- \usepackage{fancyhdr}
- \usepackage{lipsum}
- \pagestyle{fancy}
- \rhead {\includegraphics{pictures/headers.pdf}}
- \fancyfoot[CO,CE]{}
- \setlength{\headheight}{2.4 cm}
- \fancyfoot[LE,RO]{\thepage}
geometry: top=2cm, bottom=3cm
output: pdf_document
abstract: This is a pandoc test . . .
---
\lipsum[1-20]

this line needed or it doesnot make an output ???
\cleardoublepage
This is an R Markdown document.
【问题讨论】:
-
获取这段代码而不是图片也可以使它工作:
{r, echo=FALSE} plot(cars)
标签: pdf rstudio r-markdown