本文介绍了如何在R Markdown中指定自定义纸张尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用R Markdown制作具有特定高度和长度尺寸的小册子.有没有一种方法可以指定R Markdown以5.5"x8.5"度量生成文章.
I am using R Markdown to produce a booklet with specific height and length measures. Is there a way to specify to R Markdown to produce the article in 5.5"x8.5" measures.
我看到了有关生成A4尺寸的问题pdf 此处,但这无济于事,因为我的措施非常具体.
I saw questions asked about producing A4 size pdf here but that does not help as my measure is very specific.
推荐答案
在YAML中使用geometry选项(该选项成为LaTeX中geometry软件包的选项).例如:
Use the geometry option in the YAML (which becomes options to the geometry package in LaTeX). For example:
---
title: "Title"
author: "Me"
geometry: paperheight=8.5in,paperwidth=5.5in,margin=1in
output:
pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
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>.
这篇关于如何在R Markdown中指定自定义纸张尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!