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:
---
font: MySansSerifFontName
...
I'm using TexLive on Linux (Ubuntu), with pandoc
, of course.
Get the default tex template from pandoc by running pandoc -D latex and then add the font definitions you want to the document. save as my-font. latex . Then run pandoc with the switch --template=my-font .
You can use the program pandoc on the SCF Linux and Mac machines (via the terminal window) to convert from formats such as HTML, LaTeX and Markdown to formats such as HTML, LaTeX, Word, OpenOffice, and PDF, among others.
To transform your markdown file into an HTML, PDF, or Word document, click the “Knit” icon that appears above your file in the scripts editor. A drop down menu will let you select the type of output that you want. When you click the button, rmarkdown will duplicate your text in the new file format.
This should do the trick:
---
fontfamily: arev
---
From Pandoc's README:
fontfamily: font package to use for LaTeX documents (with pdflatex): TeXLive has
bookman
(Bookman),utopia
orfourier
(Utopia),fouriernc
(New Century Schoolbook),times
ortxfonts
(Times),mathpazo
orpxfonts
ormathpple
(Palatino),libertine
(Linux Libertine),arev
(Arev Sans), and the defaultlmodern
, among others.
When you use xelatex or lualatex to render the PDF you must use:
---
mainfont: Arial
---
Official documentation: Variables for LaTeX
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With