R 避免通过几何图形设置边距
使用时R 避免通过几何图形设置边距,r,r-markdown,pandoc,bookdown,R,R Markdown,Pandoc,Bookdown,使用时 render_book("index.Rmd", "bookdown::pdf_book") 它看起来像是一条设置边距的线插入到tex文件中 \usepackage[margin=1in]{geometry} bookdown演示repro可用于重现此功能 在index.Rmd中,我使用 --- date: "`r Sys.Date()`" knit: "bookdown::render_book" documentclass: krantz classoption: number
render_book("index.Rmd", "bookdown::pdf_book")
它看起来像是一条设置边距的线插入到tex文件中
\usepackage[margin=1in]{geometry}
bookdown演示
repro可用于重现此功能
在index.Rmd
中,我使用
---
date: "`r Sys.Date()`"
knit: "bookdown::render_book"
documentclass: krantz
classoption: numberinsequence,krantz1
bibliography: [book.bib]
biblio-style: apalike
link-citations: yes
colorlinks: yes
---
这是在搞乱样式文件设置的边距。我知道我可以,但是我可以避免生成这行吗
谢谢
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.4
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] bookdown_0.4
loaded via a namespace (and not attached):
[1] backports_1.0.5 magrittr_1.5 rprojroot_1.2 htmltools_0.3.6
[5] tools_3.3.3 rstudioapi_0.6 yaml_2.1.14 Rcpp_0.12.11
[9] stringi_1.1.5 rmarkdown_1.5 knitr_1.16 stringr_1.2.0
[13] digest_0.6.12 evaluate_0.10
documentclass:krantz
表示您正在为Chapman&Hall撰写一本书,我已经为使用bookdown的作者提供了相关信息(回购协议不是您的最佳选择)。您的问题不存在于本回购协议中,因为。原因是我想使用Pandoc的默认模板,它不会将默认的margin=1in
添加到YAML中的geometry
选项中(而rmarkdown则是罪魁祸首)
如果确实要使用rmarkdown的LaTeX模板(该模板根据Pandoc的修改),可以设置
geometry: false
在您的index.Rmd
的YAML元数据中
作为参考,我在bookdown一书中专门为Chapman&Hall的作者开设了一节:索引文件顶部的YAML是什么样子的?我已经在上面添加了这一部分,谢谢;我将在这个新的repo-Max上模拟我的设置