Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
comparison docs/_latex/my-doc-fonts.sty @ 222:be0cca3df1eb
Allow the font style "Roboto Mono"
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 15 May 2026 18:32:07 +0200 |
| parents | 38e2d8ab4965 |
| children | b902b1360991 |
comparison
equal
deleted
inserted
replaced
| 221:38e2d8ab4965 | 222:be0cca3df1eb |
|---|---|
| 13 }{% | 13 }{% |
| 14 \RequirePackage{color} | 14 \RequirePackage{color} |
| 15 } | 15 } |
| 16 | 16 |
| 17 \newif\if@mdf@mono@dejavusansmono\@mdf@mono@dejavusansmonofalse | 17 \newif\if@mdf@mono@dejavusansmono\@mdf@mono@dejavusansmonofalse |
| 18 \newif\if@mdf@mono@robotomono\@mdf@mono@robotomonofalse | |
| 18 \newif\if@mdf@mono@sscode\@mdf@mono@sscodefalse | 19 \newif\if@mdf@mono@sscode\@mdf@mono@sscodefalse |
| 19 \newif\if@mdf@mono@inconsolata\@mdf@mono@inconsolatafalse | 20 \newif\if@mdf@mono@inconsolata\@mdf@mono@inconsolatafalse |
| 20 | 21 |
| 21 \newif\if@mdf@WithDejaVuSansMono | 22 \newif\if@mdf@WithDejaVuSansMono |
| 23 \newif\if@mdf@WithRobotoMono | |
| 22 \newif\if@mdf@WithIBMPlex | 24 \newif\if@mdf@WithIBMPlex |
| 23 \newif\if@mdf@WithIBMPlexDejaVuSansMono | 25 \newif\if@mdf@WithIBMPlexDejaVuSansMono |
| 24 \newif\if@mdf@WithAdobeSourcePro | 26 \newif\if@mdf@WithAdobeSourcePro |
| 25 \newif\if@mdf@WithSpectral | 27 \newif\if@mdf@WithSpectral |
| 26 \newif\if@mdf@WithCharter | 28 \newif\if@mdf@WithCharter |
| 27 \newif\if@mdf@WithLibertinus | 29 \newif\if@mdf@WithLibertinus |
| 28 | 30 |
| 29 % A key compatible with options processing as option "fonts" but choices. | 31 % A key compatible with options processing as option "fonts" but choices. |
| 30 \define@choicekey*{my-doc-fonts.sty}{fonts}[\val\nr]{% | 32 \define@choicekey*{my-doc-fonts.sty}{fonts}[\val\nr]{% |
| 31 dejavusansmono, | 33 dejavusansmono, |
| 34 robotomono, | |
| 32 ibmplex, plex, | 35 ibmplex, plex, |
| 33 plex-dejavusansmono, | 36 plex-dejavusansmono, |
| 34 adobesourcepro, adobesource, | 37 adobesourcepro, adobesource, |
| 35 spectral, | 38 spectral, |
| 36 charter, | 39 charter, |
| 37 libertinus}{% | 40 libertinus}{% |
| 38 % Not used for now : store the normalized option value (global and expanded) | 41 % Not used for now : store the normalized option value (global and expanded) |
| 39 \xdef\@mdf@fonts{\val}% | 42 \xdef\@mdf@fonts{\val}% |
| 40 % Reset all option related font selection flags | 43 % Reset all option related font selection flags |
| 41 \@mdf@WithDejaVuSansMonofalse | 44 \@mdf@WithDejaVuSansMonofalse |
| 45 \@mdf@WithRobotoMonofalse | |
| 42 \@mdf@WithIBMPlexfalse | 46 \@mdf@WithIBMPlexfalse |
| 43 \@mdf@WithIBMPlexDejaVuSansMonofalse | 47 \@mdf@WithIBMPlexDejaVuSansMonofalse |
| 44 \@mdf@WithAdobeSourceProfalse | 48 \@mdf@WithAdobeSourceProfalse |
| 45 \@mdf@WithSpectralfalse | 49 \@mdf@WithSpectralfalse |
| 46 \@mdf@WithCharterfalse | 50 \@mdf@WithCharterfalse |
| 47 \@mdf@WithLibertinusfalse | 51 \@mdf@WithLibertinusfalse |
| 48 % Now set the needed font selection flag | 52 % Now set the needed font selection flag |
| 49 \ifcase\nr\relax | 53 \ifcase\nr\relax |
| 50 \@mdf@WithDejaVuSansMonotrue | 54 \@mdf@WithDejaVuSansMonotrue |
| 51 \or | 55 \or |
| 56 \@mdf@WithRobotoMonotrue | |
| 57 \or | |
| 52 \@mdf@WithIBMPlextrue | 58 \@mdf@WithIBMPlextrue |
| 53 \or | 59 \or |
| 54 \@mdf@WithIBMPlextrue | 60 \@mdf@WithIBMPlextrue |
| 55 % Normalize the stored string | 61 % Normalize the stored string |
| 56 \gdef\@mdf@fonts{ibmplex} | 62 \gdef\@mdf@fonts{ibmplex} |
| 81 \if@mdf@WithDejaVuSansMono | 87 \if@mdf@WithDejaVuSansMono |
| 82 % default but with DejaVu Sans Mono as monospaced font | 88 % default but with DejaVu Sans Mono as monospaced font |
| 83 %\RequirePackage[DefaultFeatures={Scale=0.92},mono=false]{plex-otf} | 89 %\RequirePackage[DefaultFeatures={Scale=0.92},mono=false]{plex-otf} |
| 84 %\RequirePackage[mono=true,serif=false,sans=false,math=false]{dejavu-otf} % all symbols are available | 90 %\RequirePackage[mono=true,serif=false,sans=false,math=false]{dejavu-otf} % all symbols are available |
| 85 \@mdf@mono@dejavusansmonotrue | 91 \@mdf@mono@dejavusansmonotrue |
| 92 \fi | |
| 93 \if@mdf@WithRobotoMono | |
| 94 \@mdf@mono@robotomonotrue | |
| 86 \fi | 95 \fi |
| 87 % | 96 % |
| 88 % | 97 % |
| 89 \if@mdf@WithIBMPlex | 98 \if@mdf@WithIBMPlex |
| 90 \RequirePackage{newunicodechar} | 99 \RequirePackage{newunicodechar} |
| 221 UprightFont = *, | 230 UprightFont = *, |
| 222 BoldFont = * Bold, | 231 BoldFont = * Bold, |
| 223 ItalicFont = * Italic, | 232 ItalicFont = * Italic, |
| 224 BoldItalicFont = * Bold Italic, | 233 BoldItalicFont = * Bold Italic, |
| 225 ] | 234 ] |
| 226 \defaultfontfeatures{} | |
| 227 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% | 235 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% |
| 228 UprightFont = *, | 236 UprightFont = *, |
| 229 BoldFont = * Bold, | 237 BoldFont = * Bold, |
| 230 ItalicFont = * Oblique, | 238 ItalicFont = * Oblique, |
| 231 BoldItalicFont = * Bold Oblique, | 239 BoldItalicFont = * Bold Oblique, |
| 252 UprightFont = *, | 260 UprightFont = *, |
| 253 BoldFont = * Bold, | 261 BoldFont = * Bold, |
| 254 ItalicFont = * Italic, | 262 ItalicFont = * Italic, |
| 255 BoldItalicFont = * Bold Italic, | 263 BoldItalicFont = * Bold Italic, |
| 256 ] | 264 ] |
| 257 \defaultfontfeatures{} | 265 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% |
| 258 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% | 266 UprightFont = *, |
| 259 UprightFont = *, | 267 BoldFont = * Bold, |
| 260 BoldFont = * Bold, | 268 ItalicFont = * Oblique, |
| 261 ItalicFont = * Oblique, | 269 BoldItalicFont = * Bold Oblique, |
| 262 BoldItalicFont = * Bold Oblique, | 270 ] |
| 263 ] | 271 \newunicodechar{∶}{{\DejaVuSansMono ∶}}% U+2236 |
| 264 \newunicodechar{∶}{{\DejaVuSansMono ∶}}% U+2236 | 272 \newunicodechar{⟵}{{\DejaVuSansMono ⟵}}% U+27F5 |
| 265 \newunicodechar{⟵}{{\DejaVuSansMono ⟵}}% U+27F5 | 273 \newunicodechar{⟶}{{\DejaVuSansMono ⟶}}% U+27F6 |
| 266 \newunicodechar{⟶}{{\DejaVuSansMono ⟶}}% U+27F6 | 274 \newunicodechar{⟷}{{\DejaVuSansMono ⟷}}% U+27F7 |
| 267 \newunicodechar{⟷}{{\DejaVuSansMono ⟷}}% U+27F7 | 275 \newunicodechar{≟}{{\DejaVuSansMono ≟}}% U+225F |
| 268 \newunicodechar{≟}{{\DejaVuSansMono ≟}}% U+225F | 276 \newunicodechar{∈}{{\DejaVuSansMono ∈}}% U+2208 |
| 269 \newunicodechar{∈}{{\DejaVuSansMono ∈}}% U+2208 | 277 \newunicodechar{∌}{{\DejaVuSansMono ∌}}% U+220C |
| 270 \newunicodechar{∌}{{\DejaVuSansMono ∌}}% U+220C | 278 \fi |
| 279 | |
| 280 \if@mdf@mono@robotomono | |
| 281 \RequirePackage{newunicodechar} | |
| 282 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular},Scale=MatchLowercase} | |
| 283 \setmonofont{Roboto Mono}[% | |
| 284 UprightFont = *, | |
| 285 BoldFont = * Bold, | |
| 286 ItalicFont = * Italic, | |
| 287 BoldItalicFont = * Bold Italic, | |
| 288 ] | |
| 289 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% | |
| 290 UprightFont = *, | |
| 291 BoldFont = * Bold, | |
| 292 ItalicFont = * Oblique, | |
| 293 BoldItalicFont = * Bold Oblique, | |
| 294 ] | |
| 295 \newunicodechar{▷}{{\DejaVuSansMono ▷}}% U+25B7 | |
| 296 \newunicodechar{∶}{{\DejaVuSansMono ∶}}% U+2236 | |
| 297 \newunicodechar{◆}{{\DejaVuSansMono ◆}}% U+25C6 | |
| 298 \newunicodechar{⟵}{{\DejaVuSansMono ⟵}}% U+27F5 | |
| 299 \newunicodechar{⟶}{{\DejaVuSansMono ⟶}}% U+27F6 | |
| 300 \newunicodechar{⟷}{{\DejaVuSansMono ⟷}}% U+27F7 | |
| 301 \newunicodechar{⇒}{{\DejaVuSansMono ⇒}}% U+21D2 | |
| 302 \newunicodechar{⇔}{{\DejaVuSansMono ⇔}}% U+21D4 | |
| 303 \newunicodechar{▪}{{\DejaVuSansMono ▪}}% U+25AA | |
| 304 \newunicodechar{≟}{{\DejaVuSansMono ≟}}% U+225F | |
| 305 \newunicodechar{∈}{{\DejaVuSansMono ∈}}% U+2208 | |
| 306 \newunicodechar{∌}{{\DejaVuSansMono ∌}}% U+220C | |
| 307 | |
| 308 \PassOptionsToPackage{% | |
| 309 verbatimvisiblespace={\textcolor{red}{{\DejaVuSansMono^^^^2423}}},% | |
| 310 verbatimcontinued={\textcolor{red}{{\DejaVuSansMono^^^^21aa}}}}% | |
| 311 {sphinx} | |
| 271 \fi | 312 \fi |
| 272 | 313 |
| 273 \defaultfontfeatures{} | 314 \defaultfontfeatures{} |
| 274 | 315 |
| 275 \def\testmdf{ | 316 \def\testmdf{ |
