Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 233:d6b66d02fb86 | 234:b797e4c0799a |
|---|---|
| 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 \newif\if@mdf@WithTufte |
| 34 \newif\if@mdf@WithPalatino | |
| 34 | 35 |
| 35 % A key compatible with options processing as option "fonts" but choices. | 36 % A key compatible with options processing as option "fonts" but choices. |
| 36 \define@choicekey*{my-doc-fonts.sty}{fonts}[\val\nr]{% | 37 \define@choicekey*{my-doc-fonts.sty}{fonts}[\val\nr]{% |
| 37 % do not change anything: just deactivate the default "dejavusansmono" | 38 % do not change anything: just deactivate the default "dejavusansmono" |
| 38 default, | 39 default, |
| 47 spectral, % use Spectral, Source Sans Pro and Source Code Pro | 48 spectral, % use Spectral, Source Sans Pro and Source Code Pro |
| 48 charter, % use XCharter (with XCharter Math), Lato and Inconsolata | 49 charter, % use XCharter (with XCharter Math), Lato and Inconsolata |
| 49 libertinus, % use Libertinus family (incl. Math) | 50 libertinus, % use Libertinus family (incl. Math) |
| 50 garamond, % EB Garamond (with Math), Libre Franklin and Inconsolata | 51 garamond, % EB Garamond (with Math), Libre Franklin and Inconsolata |
| 51 tufte, % Tufte fonts: ETbb (with Math), GilliusADFNo2, DejaVu Sans Mono | 52 tufte, % Tufte fonts: ETbb (with Math), GilliusADFNo2, DejaVu Sans Mono |
| 53 palatino, % Palatino, Inter and Source Code Pro | |
| 52 }{% | 54 }{% |
| 53 % Not used for now : store the normalized option value (global and expanded) | 55 % Not used for now : store the normalized option value (global and expanded) |
| 54 \xdef\@mdf@fonts{\val}% | 56 \xdef\@mdf@fonts{\val}% |
| 55 % Reset all option related font selection flags | 57 % Reset all option related font selection flags |
| 56 \@mdf@WithDejaVuSansMonofalse | 58 \@mdf@WithDejaVuSansMonofalse |
| 62 \@mdf@WithSpectralfalse | 64 \@mdf@WithSpectralfalse |
| 63 \@mdf@WithCharterfalse | 65 \@mdf@WithCharterfalse |
| 64 \@mdf@WithLibertinusfalse | 66 \@mdf@WithLibertinusfalse |
| 65 \@mdf@WithGaramondfalse | 67 \@mdf@WithGaramondfalse |
| 66 \@mdf@WithTuftefalse | 68 \@mdf@WithTuftefalse |
| 69 \@mdf@WithPalatinofalse | |
| 67 % Now set the needed font selection flag | 70 % Now set the needed font selection flag |
| 68 \ifcase\nr\relax | 71 \ifcase\nr\relax |
| 69 \relax | 72 \relax |
| 70 \or | 73 \or |
| 71 \@mdf@WithDejaVuSansMonotrue | 74 \@mdf@WithDejaVuSansMonotrue |
| 95 \@mdf@WithLibertinustrue | 98 \@mdf@WithLibertinustrue |
| 96 \or | 99 \or |
| 97 \@mdf@WithGaramondtrue | 100 \@mdf@WithGaramondtrue |
| 98 \or | 101 \or |
| 99 \@mdf@WithTuftetrue | 102 \@mdf@WithTuftetrue |
| 103 \or | |
| 104 \@mdf@WithPalatinotrue | |
| 100 \fi | 105 \fi |
| 101 } | 106 } |
| 102 | 107 |
| 103 % | 108 % |
| 104 % By default use the safe option dejavusansmono because is contains | 109 % By default use the safe option dejavusansmono because is contains |
| 257 \setsansfont{GilliusADFNo2}[Scale=MatchLowercase] | 262 \setsansfont{GilliusADFNo2}[Scale=MatchLowercase] |
| 258 \setmathfont{Libertinus Math}[Scale=MatchLowercase] | 263 \setmathfont{Libertinus Math}[Scale=MatchLowercase] |
| 259 \@mdf@mono@dejavusansmonotrue | 264 \@mdf@mono@dejavusansmonotrue |
| 260 \fi | 265 \fi |
| 261 | 266 |
| 267 \if@mdf@WithPalatino | |
| 268 \RequirePackage{unicode-math} | |
| 269 \linespread{1.06} | |
| 270 \defaultfontfeatures{Numbers={Lining,Tabular},Ligatures=TeX} | |
| 271 \setmainfont{TeXGyrePagellaX} | |
| 272 \setsansfont{Inter}[Scale=MatchLowercase] | |
| 273 %\setsansfont{Rosario}[Scale=MatchLowercase,ScaleAgain=1.013] | |
| 274 %\setmathfont{Asana Math}[Scale=MatchLowercase] | |
| 275 \setmathfont{TeX Gyre Pagella Math}[Scale=MatchLowercase] | |
| 276 \@mdf@mono@sscodetrue | |
| 277 \fi | |
| 278 | |
| 262 \defaultfontfeatures{} | 279 \defaultfontfeatures{} |
| 263 | 280 |
| 264 \if@mdf@mono@dejavusansmono | 281 \if@mdf@mono@dejavusansmono |
| 265 % automatically applied with Scale=MatchLowercase,... | 282 % automatically applied with Scale=MatchLowercase,... |
| 266 \RequirePackage[mono=true,serif=false,sans=false,math=false]{dejavu-otf} % all symbols are available | 283 \RequirePackage[mono=true,serif=false,sans=false,math=false]{dejavu-otf} % all symbols are available |
