【问题标题】:How to avoid blank space for title in R markdown v2如何避免 R markdown v2 中的标题空格
【发布时间】:2014-10-20 05:48:50
【问题描述】:

我不想在我的 pdf 输出中有空格,这肯定代表在编织 pdf 时 R markdown 中没有标题方法。

我不希望有标题并且有从页面开始的文本。谁能告诉我该怎么做?

到目前为止,我的代码如下所示:

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

感谢您的建议!

【问题讨论】:

    标签: r r-markdown


    【解决方案1】:

    对于此级别的自定义,您需要更改 Pandoc 使用的 TeX 模板:

    1. 复制rmarkdown使用的默认TeX模板(运行system.file("rmd/latex/default.tex", package="rmarkdown")可以找到路径)
    2. 编辑文件以删除标题、调整边距等并保存为例如notitle.tex
    3. template: notitle.tex 添加到pdf_document 的设置中。

    【讨论】:

    • 我已按照此说明进行操作,但收到错误消息:pandoc.exe: Could not find data file templates\notitle.tex
    猜你喜欢
    • 2021-09-09
    • 1970-01-01
    • 2021-12-31
    • 2014-08-12
    • 1970-01-01
    • 1970-01-01
    • 2017-10-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多