R bookdown-自定义标题页 [英] R bookdown - custom title page
问题描述
如何使用书本来定制标题页?
How to customize title page using bookdown?
我尝试在YAML标头中使用以下代码.
I tried using the following code in the YAML header.
includes:
in_header: preamble.tex
before_body: body.tex
body.tex文件非常简单,仅用于测试:
The body.tex file was something pretty simple, just for test:
\begin{titlepage}
Hello world
\end{titlepage}
推荐答案
我最终使用Yaml模板标签编辑_output.yml
文件以引用R项目目录中default-1.17.0.2.tex
模板的副本.
I ended up editing the _output.yml
file to reference a copy of default-1.17.0.2.tex
template in my R project directory using yaml template tag.
bookdown::gitbook:
css: style.css
config:
toc:
before: |
<li><a href="./">A Minimal Book Example</a></li>
after: |
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
edit: https://github.com/rstudio/bookdown-demo/edit/master/%s
download: ["pdf", "epub"]
bookdown::pdf_book:
fig_caption: true
number_sections: yes
includes:
in_header: preamble.tex
latex_engine: xelatex
citation_package: natbib
keep_tex: yes
template: template.tex
bookdown::epub_book: default
由于某种原因,我在编译pdf时出错(!未定义控制序列...),因此我在template.tex
中包含了乳胶命令\usepackage{graphicx}
来对其进行修复.现在应该可以自由自定义标题页了.
For some reason i had an error compiling the pdf (! Undefined control sequence...) so I included a latex command \usepackage{graphicx}
in template.tex
to fix it. Now it is supposed that I am free to customize title page and whatsoever.
这篇关于R bookdown-自定义标题页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!