【问题标题】:How to I vertically center the title of my rmarkdown pdf document?如何垂直居中我的 rmarkdown pdf 文档的标题?
【发布时间】:2016-05-18 21:38:01
【问题描述】:

我有以下序言:

---
title: "Luke Klein Dissertation MARKDOWN ROUGH DRAFT"
author: "Luke KLEIN"
date: "`r Sys.Date()`"
output: 
  pdf_document:
    toc: true
---

如何让我的标题在封面居中?

【问题讨论】:

    标签: r-markdown pdflatex


    【解决方案1】:

    你可能已经完成了你的论文 :-) 但是留下解决方案以供将来参考,因为我是通过 google 来到这里的。

    ---
    title: |
      | \vspace{5cm} \LARGE{Luke Klein Dissertation MARKDOWN ROUGH DRAFT}
    author: "Luke KLEIN"
    date: "`r Sys.Date()`"
    output: 
    pdf_document:
      toc: true
    ---
    

    结合使用 vspace 和 hspace,您可以将标题放在任何您想要的位置。

    可以在此处查看其他字体组合(大小和类型):

    https://www.sharelatex.com/learn/Font_sizes,_families,_and_styles?nocdn=true

    【讨论】:

      【解决方案2】:

      聚会迟到了,这对我有用:

      ---
      title: "Luke Klein Dissertation MARKDOWN ROUGH DRAFT"
      author: "Luke KLEIN"
      date: "`r Sys.Date()`"
      output: 
      pdf_document:
        toc: true
      header-includes:
      - \pretitle{\begin{center} \vspace{5cm}}
      ---
      

      【讨论】:

        猜你喜欢
        • 2021-05-16
        • 2014-03-11
        • 1970-01-01
        • 2011-03-09
        • 1970-01-01
        • 2023-03-19
        • 2013-07-06
        • 2015-02-01
        • 1970-01-01
        相关资源
        最近更新 更多