I have some documents in markdown that I'm trying to convert to PDF using the default latex-engine, pdflatex. This is on a CentOS 7.9.
In the markdown minimal example file, I have a yaml header which is as follows
---
title: First Last
fontfamily: sans
...
Heading
=======
For converting, I'm using
pandoc --latex-engine=pdflatex README.md -o README.pdf
The above command works without producing any errors, however, the resulting PDF has the default serif font used by Pandoc's LaTeX (Latin Modern). I'm in no way able to change from Latin Modern Roman to Computer Modern Sans Serif. I'm a bit confused as to what settings I need in the yaml header to get the desired results.
Any help would be highly appreciated
\sffamily
, not\rmfamily
in LaTeX. But I am not sure what the configuration for Pandoc should be.fontfamily: sans
you're telling it to set the text in sans serif. I imagine if you take that line out, you'll get the desired results.fontfamily: sans
you are asking Pandoc to loadsans.sty
to setup the fontfamily, but that package does not exist, afaik. In fact, I don't know why it does not throw an error.