• R语言
  • 【求助】如何更改rmarkdown轉出的pdf中"目錄"的顯示字體

我透過tex檔案可以更改pdf內文的中文字體(綠色圈),但發現"目錄"這兩個字的字體都不會變(紅色圈),請問有什麼方法可以改嗎?

附上yaml

title: "Statistical Methods in Finance HW3"
author: You Jia Sun
date: "最近一次編輯時間 `r format(Sys.time(), '%Y年%m月%d日%H时%M分%S秒')`"
geometry: margin=1.18in
documentclass: ctexart
output: 
  bookdown::pdf_book: 
    number_sections: yes
    pandoc_args: --listings
    toc: yes
    fig_crop: no
    base_format: rmarkdown::pdf_document
    latex_engine: xelatex
    citation_package: natbib
    dev: "cairo_pdf"
    template: null
    extra_dependencies:
      sourcecodepro:
       - scale=0.85
      sourceserifpro:
       - rmdefault
      sourcesanspro:
       - sfdefault
      awesomebox:
    quote_footer: ["\\hspace*{\\fill} ", ""]
    geometry:
      - top=30mm
      - left=20mm
    includes:
      in_header: header.tex
biblio-style: plainnat
natbiboptions: "authoryear,round"
link-citations: yes
colorlinks: yes
classoption: "UTF8,a4paper,fontset=adobe,zihao=false"

附上tex檔

\usepackage{xeCJK}
\usepackage{listings}
\setCJKmainfont{微軟正黑體}
\lstset{
  breaklines=true
}
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Traditional)_Taiwan.950  LC_CTYPE=Chinese (Traditional)_Taiwan.950   
[3] LC_MONETARY=Chinese (Traditional)_Taiwan.950 LC_NUMERIC=C                                
[5] LC_TIME=Chinese (Traditional)_Taiwan.950    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] compiler_4.0.2  htmltools_0.5.0 tools_4.0.2     yaml_2.2.1      rmarkdown_2.4  
 [6] knitr_1.30      xfun_0.18       digest_0.6.25   rlang_0.4.8     evaluate_0.14