我正在尝试创建一个rmarkdown文档.我终于找到了解决这个问题的方法,尽管已经花了很长时间.我希望能做的最后一件事是将图像添加到我的pdf文档的标题页.
我遇到的麻烦是我的标题页是由YAML的顶部定义的.以下是我的example.Rmd
文件的内容.我使用RStudio中的Knit PDF按钮将其转换为PDF.
---
title: "This is a my document"
author: "Prepared by: Dan Wilson"
date: '`r paste("Date:",Sys.Date())`'
mainfont: Roboto Light
fontsize: 12pt
documentclass: report
output:
pdf_document:
latex_engine: xelatex
highlight: tango
---
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well …
Run Code Online (Sandbox Code Playgroud) 我试图在我的 RMarkdown 文档(pdf 输出)的标题页和目录之间插入空白页。我遵循了这里描述的建议。我的问题是空白页没有出现。这是我的代码:
\pagenumbering{gobble}
\centering
\centerline{\includegraphics[height=2in]{glasgowuni.png}}
\large{UNIVERSITY OF GLASGOW}
\normalsize{COLLEGE OF SCIENCE AND ENGINEERING}
\normalsize{SCHOOL OF MATHEMATICS AND STATISTICS}\linebreak
\raggedright
\clearpage
\pagenumbering{arabic}
\tableofcontents
\newpage
Run Code Online (Sandbox Code Playgroud)
谁能发现为什么空白页没有出现?
我想知道是否有办法从第二页开始页码编号和/或在R Markdown
创建pdf输出时从第二页开始打印页码?
将标题页添加到文档时,这将非常有用.
谢谢!