Closed microraptor closed 4 years ago
i got this working by setting sansfont
for the headings
Thank you, it works when you pair mainfont
and sansfont
.
To summarize the behavior:
When using this template with --pdf-engine xelatex
the body font can be set with the mainfont
metadata variable and the heading font with sansfont
. For monofont
sections like the code blocks the font can be changed with monofont
. Presumably it works similar with mathfont
. Setting only mainfont
will reset the heading font to the default "LM Sans" and setting only sansfont
seems to have no effect.
Changing the font with Xelatex and the "mainfont" variable in the metadata works only for the body font, the title and section headings are turned into "LM Sans", which is a default font I guess. Even when setting "Source Sans Pro" using "mainfont", "LM Sans" is used except for the body text. The same issues occurs also when I replace sourcesanspro with a different font package in the template without setting anything in the metadata and using pdflatex as an engine. What makes "Source Sans Pro" so special that it is the only font I can use for the title and headings and is this a common issue or just me?
Here are some examples I tried without success with multiple different sans and serif fonts like "EB Garamond" and Roboto:
And switching
\usepackage[default]{sourcesanspro}
with\usepackage[default]{sourceserifpro}
on both counts in the template.This is the only way to set the title font, but only works with sourcesanspro, so its not helpful at all:
I am running Ubuntu 18.04 and with texlive-fonts-recommended texlive-fonts-extra installed and the relevant Latex font packages installed.