jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.64k stars 3.38k forks source link

latex template sets fonts before applying beamer theme #6260

Closed Drakulix closed 2 years ago

Drakulix commented 4 years ago

Using pandoc 2.5 Compiled with pandoc-types 1.17.5.4, texmath 0.11.2.2, skylighting 0.7.7 In an ubuntu/eoan container environment

metadata.yaml:

---
theme: metropolis
monofont: JetBrainsMono
...

cmdline: pandoc -s -f markdown -t beamer --pdf-engine=lualatex -V classoption=notes --fail-if-warnings --metadata-file=metadata.yaml -o slides.pdf slides.md

Results in a PDF that uses FiraMono as metropolis sets defaults for fonts (FiraSans and FiraMono), which is unexpected to say the least.

WIth a custom template I confirmed, that re-ordering the blocks that apply beamer themes and the font block fixes this problem for me. I am not very familiar with latex and therefor am not aware of any new problems this might cause for other latex-engines.

Would you accept a PR changing the default latex template?

jgm commented 4 years ago

I'd certainly consider one. Just as long as it doesn't break anything for other themes. (I seem to recall other similar issues -- have you searched closed issues and pull requests?)