You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Beamer has multiple fonttheme options for specifying serif and sanserif to be used in slide headings and body. For example:
\usefonttheme[stillsansseriflarge]{serif}
will set headings to sans and body to serif.
I assume that to use such a feature, I'd have to specify both a main font for serif and a sans font for sans serif. However, I've seen that if mainfont is set, the beamer template automatically adds \usefonttheme{serif}. I don't see a spot in the format where it would process any optional argument for usefonttheme, so if I want to get sans headings and serif body, I'd have to give the whole command \usefonttheme[stillsansseriflarge]{serif} as part of header-includes:, but this causes an error because the options conflict with the built-in \usefonttheme{serif} that gets added by the format.
If I comment out the line in the /formats/pdf/pandoc/template.tex file like this:
$if(mainfont)$
%\usefonttheme{serif} % use mainfont rather than sansfont for slide text
$endif$
then I get the behavior I expect: beamer uses the mainfont for serif, the sansfont for sans serif, and it defaults to sans serif unless I set a font theme.
To me, this is a preferable result, compared with assuming that if a user sets mainfont, then user must want to only use serif font in both headings and body of the slides. I hope that makes sense. Here's a minimal (non)working example that generates an error, but works if I comment out the offending line in the template.tex file.
Or, a feature request would be a way to set the stillsansseriflarge as an option to the fonttheme within the YAML.
Thanks for all your work on Quarto--it's great!
Steps to reproduce
---mainfont: Caladea # Note: Set these to any fonts you have on your system.sansfont: Carlitomonofont: Ubuntu Monoformat:
beamer:
header-includes: | \usefonttheme[stillsansseriflarge]{serif}keep-tex: true---## Header Should be in Sans
Body should be in serif.
Expected behavior
Be able to use Beamer's fonttheme optional arguments.
Actual behavior
No good way to use optional fonttheme arguments.
Your environment
Ubuntu 22.04
R 4.3.1
Quarto 1.3.294
Not using RStudio
Quarto check output
[β] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[β] Checking versions of quarto dependencies......OK
[β] Checking Quarto installation......OK
Version: 1.3.294
Path: /opt/quarto/bin
[β] Checking basic markdown render....OK
[β] Checking Python 3 installation....OK
Version: 3.10.12
Path: /usr/bin/python3
Jupyter: 4.9.1
Kernels: python3
(/) Checking Jupyter engine render....[IPKernelApp] WARNING | debugpy_stream undefined, debugging will not be enabled
[β] Checking Jupyter engine render....OK
[β] Checking R installation...........OK
Version: 4.3.1
Path: /usr/lib/R
LibPaths:
- /home/thatcher/R/x86_64-pc-linux-gnu-library/4.3
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.42
rmarkdown: 2.21
[β] Checking Knitr engine render......OK
The text was updated successfully, but these errors were encountered:
If I comment out the line in the /formats/pdf/pandoc/template.tex file like this:
That looks to me, then, like the issue comes from the underlying pandoc template. We do a certain number of improvements on some templates, but we have to be careful about it. Let me take this with the other devs and I'll get back to you.
Bug description
Beamer has multiple fonttheme options for specifying serif and sanserif to be used in slide headings and body. For example:
\usefonttheme[stillsansseriflarge]{serif}
will set headings to sans and body to serif.
I assume that to use such a feature, I'd have to specify both a main font for serif and a sans font for sans serif. However, I've seen that if
mainfont
is set, the beamer template automatically adds\usefonttheme{serif}
. I don't see a spot in the format where it would process any optional argument forusefonttheme
, so if I want to get sans headings and serif body, I'd have to give the whole command\usefonttheme[stillsansseriflarge]{serif}
as part ofheader-includes:
, but this causes an error because the options conflict with the built-in\usefonttheme{serif}
that gets added by the format.If I comment out the line in the
/formats/pdf/pandoc/template.tex
file like this:then I get the behavior I expect: beamer uses the mainfont for serif, the sansfont for sans serif, and it defaults to sans serif unless I set a font theme.
To me, this is a preferable result, compared with assuming that if a user sets mainfont, then user must want to only use serif font in both headings and body of the slides. I hope that makes sense. Here's a minimal (non)working example that generates an error, but works if I comment out the offending line in the
template.tex
file.Or, a feature request would be a way to set the
stillsansseriflarge
as an option to the fonttheme within the YAML.Thanks for all your work on Quarto--it's great!
Steps to reproduce
Expected behavior
Be able to use Beamer's
fonttheme
optional arguments.Actual behavior
No good way to use optional
fonttheme
arguments.Your environment
Quarto check output
The text was updated successfully, but these errors were encountered: