我想知道如何自定义在RStudio中使用 bookdown 创建的pdf书籍的标题,或使其至少与 bookdown的标题一样漂亮:编写书籍... 这样
对于我的preamble.tex
文件,我使用了与 bookdown github类似的preamble.tex
,但此处删除了1行,即
\setmainfont[UprightFeatures={SmallCapsFont=AlegreyaSC-Regular}]{Alegreya}
我删除了它,因为乳胶给了我这个错误消息
! fontspec error: "font-not-found"
!
! The font "AlegreyaSC-Regular" cannot be found.
尽管我的Miktex中有Alegreya软件包
我在index.Rmd文件中写
---
title: XXXXX
author: XXXX
date: "`r Sys.Date()`"
knit: "bookdown::render_book"
documentclass: krantz
site: bookdown::bookdown_site
fontsize: 12pt
monofont: "Source Code Pro"
monofontoptions: "Scale=0.7"
lot: yes
lof: yes
bibliography: [book.bib, packages.bib]
biblio-style: apalike
link-citations: yes
description: "DrPH Multivariable Analysis."
---
\mainmatter
我在_output.yml
中写
bookdown::pdf_book:
includes:
in_header: preamble.tex
before_body: before_body.tex
after_body: after_body.tex
latex_engine: xelatex
citation_package: natbib
keep_tex: yes
pandoc_args: --top-level-division=chapter
toc_depth: 3
toc_unnumbered: no
toc_appendix: yes
我认为我的问题与R bookdown - custom title page有关。