How to separate Title Page and Table of Content Page from knitr rmarkdown PDF?

前端 未结 1 759
渐次进展
渐次进展 2021-01-31 21:05

Anyone have any idea how to separate Title Page and Table of Content page? From this code:

---
title: \"Title Page\"
output: 
  pdf_document:
      toc: true
            


        
相关标签:
1条回答
  • 2021-01-31 21:14

    I used a trifecta of latex files in the options under includes:

    ---
    title: "Title Page"
    output: 
      pdf_document:
      toc: true
        number_sections: true
      includes:
        in_header: latex/header.tex
        before_body: latex/before_body.tex
        after_body: latex/after_body.tex
    ---
    

    The before_body file contain all of the options you would want AFTER the \begin{document} and the title options, but BEFORE you start writing the body of your document. In that file, simply place a \newline, like so:

    \newpage
    

    That's it! Nothing else in the before_body.tex file. That should work.

    Now, if only I could vertically center the title page...

    0 讨论(0)
提交回复
热议问题