# HG changeset patch # User Franz Glasner # Date 1778876951 -7200 # Node ID 97d66960ea695303a34e08d09dd6e0ccfbfea1a9 # Parent 8f3a000c3be5c10e4419a81c3fbf163729cb7275 A style variant with Tufte fonts: ETbb, GilliusADFNo2 and DejaVu Sans Mono (incl. Libertinus Math) diff -r 8f3a000c3be5 -r 97d66960ea69 docs/_latex/my-doc-fonts.sty --- 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