如何在 r markdown 中指定自定义的纸张尺寸 [英] How to specify a customized paper size in r markdown

查看:19
本文介绍了如何在 r markdown 中指定自定义的纸张尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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.

I saw questions asked about producing A4 size pdf here but that does not help as my measure is very specific.

解决方案

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 中指定自定义的纸张尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆