mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-20 22:46:06 +00:00
- Split fonts.latex partial into two parts: fonts.latex and font-settings.latex. - In beamer template, load beamer theme between fonts.latex and font-settings.latex. This allows a theme (such as metropolis) to set its own default font, while still allowing the user to override it. This fixes a regression in pandoc 3.5. Users who have custom templates based on pandoc 3.5 templates will need to add `font-settings.latex()` after `fonts.latex()` in the latex template. In a beamer template, the beamer theme-setting code needs to be moved between these two partials. Closes #10297.
24 lines
687 B
Plaintext
24 lines
687 B
Plaintext
\usepackage{iftex}
|
|
\ifPDFTeX
|
|
\usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
|
|
\usepackage[utf8]{inputenc}
|
|
\usepackage{textcomp} % provide euro and other symbols
|
|
\else % if luatex or xetex
|
|
$if(mathspec)$
|
|
\ifXeTeX
|
|
\usepackage{mathspec} % this also loads fontspec
|
|
\else
|
|
\usepackage{unicode-math} % this also loads fontspec
|
|
\fi
|
|
$else$
|
|
\usepackage{unicode-math} % this also loads fontspec
|
|
$endif$
|
|
\defaultfontfeatures{Scale=MatchLowercase}$-- must come before Beamer theme
|
|
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
|
|
\fi
|
|
$if(fontfamily)$
|
|
$else$
|
|
$-- Set default font before Beamer theme so the theme can override it
|
|
\usepackage{lmodern}
|
|
$endif$
|