How to avoid blank space for title in R markdown v

2020-07-18 07:40发布

问题:

I would not like to have blank space in my pdf output, that surely stands for no title method in R markdown while knitting pdf.

I would like not to have title and have text starting from the begging of the page. Can anyone can tell me how to do that?

My code, so far, looks like this:

---
output: 
   pdf_document:
      highlight: pygments
      toc: false
      number_sections: true
---
text

Thanks for any advice !

回答1:

For this level of customization you'll want to change the TeX template Pandoc uses:

  1. Copy the default TeX template used by rmarkdown (you can find the path by running system.file("rmd/latex/default.tex", package="rmarkdown"))
  2. Edit the file to remove the title, adjust margins, etc. and save as e.g. notitle.tex
  3. Add template: notitle.tex to the settings to pdf_document.


标签: r r-markdown