# HG changeset patch # User Franz Glasner # Date 1778878580 -7200 # Node ID b797e4c0799a7014e1db31c6364bf282f5b8c3d6 # Parent d6b66d02fb866e6105f4ffa2876b266e83aaaa37 A font style option using Palatino (with Math), Inter and Source Code Pro diff -r d6b66d02fb86 -r b797e4c0799a docs/_latex/my-doc-fonts.sty --- 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