Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 231:8f3a000c3be5 | 232:97d66960ea69 |
|---|---|
| 28 \newif\if@mdf@WithAdobeSourcePro | 28 \newif\if@mdf@WithAdobeSourcePro |
| 29 \newif\if@mdf@WithSpectral | 29 \newif\if@mdf@WithSpectral |
| 30 \newif\if@mdf@WithCharter | 30 \newif\if@mdf@WithCharter |
| 31 \newif\if@mdf@WithLibertinus | 31 \newif\if@mdf@WithLibertinus |
| 32 \newif\if@mdf@WithGaramond | 32 \newif\if@mdf@WithGaramond |
| 33 \newif\if@mdf@WithTufte | |
| 33 | 34 |
| 34 % A key compatible with options processing as option "fonts" but choices. | 35 % A key compatible with options processing as option "fonts" but choices. |
| 35 \define@choicekey*{my-doc-fonts.sty}{fonts}[\val\nr]{% | 36 \define@choicekey*{my-doc-fonts.sty}{fonts}[\val\nr]{% |
| 36 % do not change anything: just deactivate the default "dejavusansmono" | 37 % do not change anything: just deactivate the default "dejavusansmono" |
| 37 default, | 38 default, |
| 45 adobesourcepro, adobesource, % Use Adobe Source Serif/Sans/Mono | 46 adobesourcepro, adobesource, % Use Adobe Source Serif/Sans/Mono |
| 46 spectral, % use Spectral, Source Sans Pro and Source Code Pro | 47 spectral, % use Spectral, Source Sans Pro and Source Code Pro |
| 47 charter, % use XCharter (with XCharter Math), Lato and Inconsolata | 48 charter, % use XCharter (with XCharter Math), Lato and Inconsolata |
| 48 libertinus, % use Libertinus family (incl. Math) | 49 libertinus, % use Libertinus family (incl. Math) |
| 49 garamond, % EB Garamond (with Math), Libre Franklin and Inconsolata | 50 garamond, % EB Garamond (with Math), Libre Franklin and Inconsolata |
| 51 tufte, % Tufte fonts: ETbb (with Math), GilliusADFNo2, DejaVu Sans Mono | |
| 50 }{% | 52 }{% |
| 51 % Not used for now : store the normalized option value (global and expanded) | 53 % Not used for now : store the normalized option value (global and expanded) |
| 52 \xdef\@mdf@fonts{\val}% | 54 \xdef\@mdf@fonts{\val}% |
| 53 % Reset all option related font selection flags | 55 % Reset all option related font selection flags |
| 54 \@mdf@WithDejaVuSansMonofalse | 56 \@mdf@WithDejaVuSansMonofalse |
| 59 \@mdf@WithAdobeSourceProfalse | 61 \@mdf@WithAdobeSourceProfalse |
| 60 \@mdf@WithSpectralfalse | 62 \@mdf@WithSpectralfalse |
| 61 \@mdf@WithCharterfalse | 63 \@mdf@WithCharterfalse |
| 62 \@mdf@WithLibertinusfalse | 64 \@mdf@WithLibertinusfalse |
| 63 \@mdf@WithGaramondfalse | 65 \@mdf@WithGaramondfalse |
| 66 \@mdf@WithTuftefalse | |
| 64 % Now set the needed font selection flag | 67 % Now set the needed font selection flag |
| 65 \ifcase\nr\relax | 68 \ifcase\nr\relax |
| 66 \relax | 69 \relax |
| 67 \or | 70 \or |
| 68 \@mdf@WithDejaVuSansMonotrue | 71 \@mdf@WithDejaVuSansMonotrue |
| 90 \@mdf@WithChartertrue | 93 \@mdf@WithChartertrue |
| 91 \or | 94 \or |
| 92 \@mdf@WithLibertinustrue | 95 \@mdf@WithLibertinustrue |
| 93 \or | 96 \or |
| 94 \@mdf@WithGaramondtrue | 97 \@mdf@WithGaramondtrue |
| 98 \or | |
| 99 \@mdf@WithTuftetrue | |
| 95 \fi | 100 \fi |
| 96 } | 101 } |
| 97 | 102 |
| 98 % | 103 % |
| 99 % By default use the safe option dejavusansmono because is contains | 104 % By default use the safe option dejavusansmono because is contains |
| 243 \setmathfont{Garamond-Math}[Scale=MatchLowercase] | 248 \setmathfont{Garamond-Math}[Scale=MatchLowercase] |
| 244 \setsansfont{Libre Franklin}[Scale=MatchLowercase,Ligatures=TeX] | 249 \setsansfont{Libre Franklin}[Scale=MatchLowercase,Ligatures=TeX] |
| 245 \@mdf@mono@inconsolatatrue | 250 \@mdf@mono@inconsolatatrue |
| 246 \fi | 251 \fi |
| 247 | 252 |
| 253 \if@mdf@WithTufte | |
| 254 \RequirePackage{unicode-math} | |
| 255 \defaultfontfeatures{Numbers={Lining,Tabular},Ligatures=TeX} | |
| 256 \setmainfont{ETbb} | |
| 257 \setsansfont{GilliusADFNo2}[Scale=MatchLowercase] | |
| 258 \setmathfont{Libertinus Math}[Scale=MatchLowercase] | |
| 259 \@mdf@mono@dejavusansmonotrue | |
| 260 \fi | |
| 261 | |
| 248 \defaultfontfeatures{} | 262 \defaultfontfeatures{} |
| 249 | 263 |
| 250 \if@mdf@mono@dejavusansmono | 264 \if@mdf@mono@dejavusansmono |
| 251 % automatically applied with Scale=MatchLowercase,... | 265 % automatically applied with Scale=MatchLowercase,... |
| 252 \RequirePackage[mono=true,serif=false,sans=false,math=false]{dejavu-otf} % all symbols are available | 266 \RequirePackage[mono=true,serif=false,sans=false,math=false]{dejavu-otf} % all symbols are available |
