调整PDF输出中的R Markdown标题位置 [英] Adjusting R Markdown Title Position in PDF output

查看:221
本文介绍了调整PDF输出中的R Markdown标题位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建R Markdown报告,但是找不到将我的标题下移到页面上的方法.

I am creating an R Markdown report and can´t find a way to move my title down the page.

这是一个最小的示例,我想将标题下移5cm:

Here is a minimal example, where I would like to move the title down 5cm:

---
title: "This is my title to display at 5cm below the top"
output:
  pdf_document:
    includes:
      in_header: header.tex
---

\thispagestyle{titlepage}

header.tex文件包含一些自定义样式:

The header.tex file include some custom styling:

\usepackage{fancyhdr}
\fancypagestyle{titlepage}{
    \fancyfoot[LE,RO]{\thepage\ of \pageref{LastPage}}
    \fancyfoot[LE,LO]{Project}
    \fancyhead[L]{\includegraphics[width=4cm]{logo.png}} 
    }

输出:

请注意,我并不是在谈论页边距,只是想移动标题,以使其不总是位于页面顶部.

Note that I´m not talking about the margins, just want to move the title so that it is not always at the top of the page.

推荐答案

这可以解决问题:

\setlength{\headsep}{5cm}
\thispagestyle{title page} 

这篇关于调整PDF输出中的R Markdown标题位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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