# HG changeset patch # User Franz Glasner # Date 1778874567 -7200 # Node ID 8f3a000c3be5c10e4419a81c3fbf163729cb7275 # Parent c54b5ffd41d7dd731e4588f9c678bad2e89b3ec1 Allow the use of Garamond: EB Garamond, Libre Franklin and Inconsolata (with Garamond Math) diff -r c54b5ffd41d7 -r 8f3a000c3be5 docs/_latex/my-doc-fonts.sty --- a/docs/_latex/my-doc-fonts.sty Fri May 15 20:35:43 2026 +0200 +++ b/docs/_latex/my-doc-fonts.sty Fri May 15 21:49:27 2026 +0200 @@ -29,6 +29,7 @@ \newif\if@mdf@WithSpectral \newif\if@mdf@WithCharter \newif\if@mdf@WithLibertinus +\newif\if@mdf@WithGaramond % A key compatible with options processing as option "fonts" but choices. \define@choicekey*{my-doc-fonts.sty}{fonts}[\val\nr]{% @@ -44,7 +45,8 @@ adobesourcepro, adobesource, % Use Adobe Source Serif/Sans/Mono spectral, % use Spectral, Source Sans Pro and Source Code Pro charter, % use XCharter (with XCharter Math), Lato and Inconsolata - libertinus % use Libertinus family (incl. Math) + libertinus, % use Libertinus family (incl. Math) + garamond, % EB Garamond (with Math), Libre Franklin and Inconsolata }{% % Not used for now : store the normalized option value (global and expanded) \xdef\@mdf@fonts{\val}% @@ -58,6 +60,7 @@ \@mdf@WithSpectralfalse \@mdf@WithCharterfalse \@mdf@WithLibertinusfalse + \@mdf@WithGaramondfalse % Now set the needed font selection flag \ifcase\nr\relax \relax @@ -87,6 +90,8 @@ \@mdf@WithChartertrue \or \@mdf@WithLibertinustrue + \or + \@mdf@WithGaramondtrue \fi } @@ -232,6 +237,14 @@ {sphinx} \fi +\if@mdf@WithGaramond + \RequirePackage[lining,tabular]{ebgaramond} + \RequirePackage{unicode-math} + \setmathfont{Garamond-Math}[Scale=MatchLowercase] + \setsansfont{Libre Franklin}[Scale=MatchLowercase,Ligatures=TeX] + \@mdf@mono@inconsolatatrue +\fi + \defaultfontfeatures{} \if@mdf@mono@dejavusansmono