首页 > 解决方案 > set different fonts for the body and margin notes for tufte bookdown pdf

问题描述

I'd like to set different fonts for the body and margin notes of a bookdown::pdf_book with base_format: tufte::tufte_book. This answer shows how to change the overall styling by adding to header-includes: in the YAML.

Is there a similar latex approach for setting different fonts/sizes to control the main vs margin note text?

标签: rlatexbookdowntufte

解决方案


您可以像这样调整字体:

\setmainfont{Arial} % font of the main body
\setsidenotefont{\fontspec{Zapfino}} 
\setcaptionfont{\fontspec{Zapfino}} 
\setmarginnotefont{\fontspec{Zapfino}} 
\setcitationfont{\fontspec{Zapfino}}

在此处输入图像描述


推荐阅读