Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
diff docs/_latex/my-doc-fonts.sty @ 232:97d66960ea69
A style variant with Tufte fonts: ETbb, GilliusADFNo2 and DejaVu Sans Mono (incl. Libertinus Math)
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 15 May 2026 22:29:11 +0200 |
| parents | 8f3a000c3be5 |
| children | b797e4c0799a |
line wrap: on
line diff
--- a/docs/_latex/my-doc-fonts.sty Fri May 15 21:49:27 2026 +0200 +++ b/docs/_latex/my-doc-fonts.sty Fri May 15 22:29:11 2026 +0200 @@ -30,6 +30,7 @@ \newif\if@mdf@WithCharter \newif\if@mdf@WithLibertinus \newif\if@mdf@WithGaramond +\newif\if@mdf@WithTufte % A key compatible with options processing as option "fonts" but choices. \define@choicekey*{my-doc-fonts.sty}{fonts}[\val\nr]{% @@ -47,6 +48,7 @@ charter, % use XCharter (with XCharter Math), Lato and Inconsolata libertinus, % use Libertinus family (incl. Math) garamond, % EB Garamond (with Math), Libre Franklin and Inconsolata + tufte, % Tufte fonts: ETbb (with Math), GilliusADFNo2, DejaVu Sans Mono }{% % Not used for now : store the normalized option value (global and expanded) \xdef\@mdf@fonts{\val}% @@ -61,6 +63,7 @@ \@mdf@WithCharterfalse \@mdf@WithLibertinusfalse \@mdf@WithGaramondfalse + \@mdf@WithTuftefalse % Now set the needed font selection flag \ifcase\nr\relax \relax @@ -92,6 +95,8 @@ \@mdf@WithLibertinustrue \or \@mdf@WithGaramondtrue + \or + \@mdf@WithTuftetrue \fi } @@ -245,6 +250,15 @@ \@mdf@mono@inconsolatatrue \fi +\if@mdf@WithTufte + \RequirePackage{unicode-math} + \defaultfontfeatures{Numbers={Lining,Tabular},Ligatures=TeX} + \setmainfont{ETbb} + \setsansfont{GilliusADFNo2}[Scale=MatchLowercase] + \setmathfont{Libertinus Math}[Scale=MatchLowercase] + \@mdf@mono@dejavusansmonotrue +\fi + \defaultfontfeatures{} \if@mdf@mono@dejavusansmono
