【发布时间】:2020-12-01 11:29:24
【问题描述】:
我正在使用 knitr 和 Rmarkdown 创建 PDF 文档,但徽标和标题远离文档顶部。
如何减少首页的上边距?非常感谢。
这是我的代码:
---
title: "Title come here (there is a logo before the title)"
output:
pdf_document:
header-includes:
- \usepackage{titling}
- \pretitle{\begin{center}
- \includegraphics[width=1.5in,height=1.5in]{logo.png}\LARGE\\}
---
【问题讨论】:
-
您是否考虑过将徽标放在页眉中?不过,这是否回答了您的问题? stackoverflow.com/questions/13515893/…
-
不要滥用\\作为换行符,也不要同时指定图像的宽度和高度,这会扭曲纵横比
标签: r pdf latex r-markdown knitr