问题
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:
- Copy the default TeX template used by rmarkdown (you can find the path by running
system.file("rmd/latex/default.tex", package="rmarkdown")
) - Edit the file to remove the title, adjust margins, etc. and save as e.g.
notitle.tex
- Add
template: notitle.tex
to the settings topdf_document
.
来源:https://stackoverflow.com/questions/25513671/how-to-avoid-blank-space-for-title-in-r-markdown-v2