Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
diff docs/_latex/my-doc-fonts.sty @ 234:b797e4c0799a
A font style option using Palatino (with Math), Inter and Source Code Pro
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 15 May 2026 22:56:20 +0200 |
| parents | 97d66960ea69 |
| children | 0d441c8a4712 |
line wrap: on
line diff
--- a/docs/_latex/my-doc-fonts.sty Fri May 15 22:29:42 2026 +0200 +++ b/docs/_latex/my-doc-fonts.sty Fri May 15 22:56:20 2026 +0200 @@ -31,6 +31,7 @@ \newif\if@mdf@WithLibertinus \newif\if@mdf@WithGaramond \newif\if@mdf@WithTufte +\newif\if@mdf@WithPalatino % A key compatible with options processing as option "fonts" but choices. \define@choicekey*{my-doc-fonts.sty}{fonts}[\val\nr]{% @@ -49,6 +50,7 @@ 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 + palatino, % Palatino, Inter and Source Code Pro }{% % Not used for now : store the normalized option value (global and expanded) \xdef\@mdf@fonts{\val}% @@ -64,6 +66,7 @@ \@mdf@WithLibertinusfalse \@mdf@WithGaramondfalse \@mdf@WithTuftefalse + \@mdf@WithPalatinofalse % Now set the needed font selection flag \ifcase\nr\relax \relax @@ -97,6 +100,8 @@ \@mdf@WithGaramondtrue \or \@mdf@WithTuftetrue + \or + \@mdf@WithPalatinotrue \fi } @@ -259,6 +264,18 @@ \@mdf@mono@dejavusansmonotrue \fi +\if@mdf@WithPalatino + \RequirePackage{unicode-math} + \linespread{1.06} + \defaultfontfeatures{Numbers={Lining,Tabular},Ligatures=TeX} + \setmainfont{TeXGyrePagellaX} + \setsansfont{Inter}[Scale=MatchLowercase] + %\setsansfont{Rosario}[Scale=MatchLowercase,ScaleAgain=1.013] + %\setmathfont{Asana Math}[Scale=MatchLowercase] + \setmathfont{TeX Gyre Pagella Math}[Scale=MatchLowercase] + \@mdf@mono@sscodetrue +\fi + \defaultfontfeatures{} \if@mdf@mono@dejavusansmono
