How can I change PDF output font from within the YAML header when using Pandoc on Markdown?

前端 未结 2 1270
失恋的感觉
失恋的感觉 2021-02-07 12:04

Is there a (built-in) way to set a different font (or fonts) to use in the Pandoc YAML header? Ideally, I would do something like this in the YAML header of my Markdown file:

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-07 12:48

    When you use xelatex or lualatex to render the PDF you must use:

    ---
    mainfont: Arial
    ---
    

    Official documentation: Variables for LaTeX

提交回复
热议问题