在this answer之后,我正在使用titlesec
程序包在Sans Serif中获取标题。
看起来很漂亮;但是,使用rmarkdown
的Latex titlesec软件包似乎存在问题。书签很混乱,文档中的链接也无法正常工作(即单击书签不能正确跳转到标题)。
我正在显示激活了titlesec行(左)并注释掉(右)的Acrobat Reader书签的图像:
有什么建议吗?我正在使用MiKTeX。
MWE:
---
output: pdf_document
subparagraph: yes
header-includes:
- \usepackage{lipsum} # produces dummy text
- \usepackage[sf,bf]{titlesec} # titlesec line
---
# Header1
\lipsum[1]
## Header1.1
\lipsum[1-7]
### Header1.1.1
\lipsum[1-7]
## Header1.2
\lipsum[1-7]
### Header1.2.1
\lipsum[1-7]
会话信息:
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=German_Switzerland.1252 LC_CTYPE=German_Switzerland.1252
[3] LC_MONETARY=German_Switzerland.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_0.12.19 rstudioapi_0.8 knitr_1.20 magrittr_1.5 hms_0.4.2
[6] devtools_1.13.6 munsell_0.5.0 colorspace_1.3-2 rlang_0.2.2 tools_3.5.1
[11] data.table_1.11.8 rio_0.5.10 withr_2.1.2 htmltools_0.3.6 readxl_1.1.0
[16] yaml_2.2.0 rprojroot_1.3-2 digest_0.6.18 tibble_1.4.2 crayon_1.3.4
[21] zip_1.0.0 curl_3.2 memoise_1.1.0 evaluate_0.12 haven_1.1.2
[26] rmarkdown_1.10 openxlsx_4.1.0 cellranger_1.1.0 compiler_3.5.1 pillar_1.3.0
[31] scales_1.0.0 forcats_0.3.0 backports_1.1.2 foreign_0.8-71 pkgconfig_2.0.2