Closed knuesel closed 1 year ago
I believe this related to an issue reported in Pandoc : https://github.com/jgm/pandoc/issues/6260 Not fixed yet though
It seems it is indeed in incorrect order. Beamer metropolis doc says:
The default font for metropolis is Fira. This can be easily changed using the standard font selection commands of the fontspec package. So if you prefer, for example, the Ubuntu font family, just add the following two commands after loading the metropolis theme
@knuesel can you try setting the font using include-in-header
---
format:
beamer:
theme: metropolis
keep-tex: true
include-in-header:
text: |
\setmonofont[]{Iosevka}
---
This should but the included part after loading the theme. If this works, this is a workaround not a solution.
@dragonstyle Using our partials system, we may be able to inverse the order when format is beamer
- or just patch the template dynamically when format is beamer and theme metropolis.
What do you think ?
Ah right, this should probably be fixed in pandoc. The include-in-header
fix does work (as mentioned in the original bug description :-) )
as mentioned in the original bug description :-) )
😅 oh yes sorry - I was all in explaining 😄
Ah right, this should probably be fixed in pandoc.
Yes I think so, but I don't know if this is easy or not because there templating system does not have much conditional logic. We have that in Quarto, so probably easier to add some handling for that ourselves. 🤔
I've submitted a pandoc PR to fix the template there: https://github.com/jgm/pandoc/pull/8316
The fix has been merged in pandoc. Not sure if you want to close the issue or wait until it's released and/or integrated in quarto's version...
We will wait for it to be available in a new pandoc release so we can track, incorporate and test
@knuesel we're now using Pandoc 3 and its new templates. Can you check on your side to confirm if this fixes your problems?
The issue is still there, it seems the change to the LaTeX template in Pandoc was not carried over to the quarto templates?
We attempted to update the templates to the Pandoc 3 templates, but something appears to be amiss in how we are doing this. I will take a closer look today.
Ok I corrected the templates and the mono font appears to be behaving properly for Beam output (as of the latest pre-release of 1.3). Please let us know if you run into further issues.
Bug description
The
monofont
setting is ignored when rendering the following with quarto 1.1.251 (on Pop!_OS 22.04):The setting works when rendering to pdf (
--to pdf
) instead of Beamer slides. It also works when rendering Beamer slides withouttheme: metropolis
.I think the problem is in this part of the template:
Here the
\setmonofont[]{Iosevka}
line has no effect because the metropolis theme later calls\setmonofont
again.I can work around this problem by adding the following in the YAML header:
The meteropolis theme also calls
\setsansfont
so probably thesansfont
setting is similarly ignored.Looking at the other beamer themes in my texlive installation, I found one other that also overwrites font settings: the "Saint Petersburg" theme. This one also calls
\setmainfont
, so I guess themainfont
setting would also not work with this theme.Minor side issue: the
theme
setting is not documented on https://quarto.org/docs/reference/formats/presentations/beamer.html (it is documented on https://quarto.org/docs/presentations/beamer.html however).Checklist