Search code examples
rlatexbookdowntufte

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?


Solution

  • You can adjust the fonts like this:

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

    enter image description here