# HG changeset patch # User Franz Glasner # Date 1778886808 -7200 # Node ID 0737faace8085fcb10900cb53934dd7418b28920 # Parent 7df1fd3bab876f1bae03e79d6eccf950e4a75104 A style variant with "Crimson Pro", "Cabin", "Source Code Pro" and "Erewhon Math" diff -r 7df1fd3bab87 -r 0737faace808 docs/_latex/my-doc-fonts.sty --- a/docs/_latex/my-doc-fonts.sty Sat May 16 00:35:51 2026 +0200 +++ b/docs/_latex/my-doc-fonts.sty Sat May 16 01:13:28 2026 +0200 @@ -34,6 +34,7 @@ \newif\if@mdf@WithGaramond \newif\if@mdf@WithTufte \newif\if@mdf@WithPalatino +\newif\if@mdf@WithCrimson % A key compatible with options processing as option "fonts" but choices. \define@choicekey*{my-doc-fonts.sty}{fonts}[\val\nr]{% @@ -53,6 +54,7 @@ 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 + crimson, % Crimson Pro, Cabin and Source Code Pro (incl. Erewhon Math) }{% % Not used for now : store the normalized option value (global and expanded) \xdef\@mdf@fonts{\val}% @@ -69,6 +71,7 @@ \@mdf@WithGaramondfalse \@mdf@WithTuftefalse \@mdf@WithPalatinofalse + \@mdf@WithCrimsonfalse % Now set the needed font selection flag \ifcase\nr\relax \relax @@ -104,6 +107,8 @@ \@mdf@WithTuftetrue \or \@mdf@WithPalatinotrue + \or + \@mdf@WithCrimsontrue \fi } @@ -249,6 +254,16 @@ \@mdf@mono@libertinusmonotrue \fi +\if@mdf@WithCrimson + \RequirePackage{unicode-math} + \defaultfontfeatures{Ligatures=TeX, Numbers={Lining,Tabular}} + \setmainfont{Crimson Pro} + \setsansfont{Cabin}[Scale=MatchLowercase] + \defaultfontfeatures{}% Erewhon Math needs this here! + \setmathfont{Erewhon Math}[Scale=MatchLowercase] + \@mdf@mono@sscodetrue +\fi + \defaultfontfeatures{} \if@mdf@mono@dejavusansmono @@ -377,7 +392,7 @@ \if@mdf@mono@libertinusmono % This is stolen from libertinus-otf.sty! \setmonofont{LibertinusMono}[% - Ligatures = TeX, + Ligatures = TeX, Numbers = {Lining, Tabular}, Scale = MatchLowercase, FakeStretch = 0.94,