Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
comparison docs/_latex/my-doc-fonts.sty @ 219:a7a6a75cd4b8
Normalize the stored "fonts" option when aliases are given
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 15 May 2026 17:24:45 +0200 |
| parents | 5114d49a8eab |
| children | 2af9ad8230c7 |
comparison
equal
deleted
inserted
replaced
| 218:5114d49a8eab | 219:a7a6a75cd4b8 |
|---|---|
| 26 \newif\if@mdf@WithCharter | 26 \newif\if@mdf@WithCharter |
| 27 | 27 |
| 28 % A key compatible with options processing as option "fonts" but choices. | 28 % A key compatible with options processing as option "fonts" but choices. |
| 29 \define@choicekey*{my-doc-fonts.sty}{fonts}[\val\nr]{% | 29 \define@choicekey*{my-doc-fonts.sty}{fonts}[\val\nr]{% |
| 30 dejavusansmono, | 30 dejavusansmono, |
| 31 plex, ibmplex, | 31 ibmplex, plex, |
| 32 plex-dejavusansmono, | 32 plex-dejavusansmono, |
| 33 adobesource, adobesourcepro, | 33 adobesourcepro, adobesource, |
| 34 spectral, | 34 spectral, |
| 35 charter}{% | 35 charter}{% |
| 36 % Not used for now : store the normalized option value (global and expanded) | |
| 37 \xdef\@mdf@fonts{\val}% | |
| 38 % Reset all option related font selection flags | |
| 36 \@mdf@WithDejaVuSansMonofalse | 39 \@mdf@WithDejaVuSansMonofalse |
| 37 \@mdf@WithIBMPlexfalse | 40 \@mdf@WithIBMPlexfalse |
| 38 \@mdf@WithIBMPlexDejaVuSansMonofalse | 41 \@mdf@WithIBMPlexDejaVuSansMonofalse |
| 39 \@mdf@WithAdobeSourceProfalse | 42 \@mdf@WithAdobeSourceProfalse |
| 40 \@mdf@WithSpectralfalse | 43 \@mdf@WithSpectralfalse |
| 41 \@mdf@WithCharterfalse | 44 \@mdf@WithCharterfalse |
| 45 % Now set the needed font selection flag | |
| 42 \ifcase\nr\relax | 46 \ifcase\nr\relax |
| 43 \@mdf@WithDejaVuSansMonotrue | 47 \@mdf@WithDejaVuSansMonotrue |
| 44 \or | 48 \or |
| 45 \@mdf@WithIBMPlextrue | 49 \@mdf@WithIBMPlextrue |
| 46 \or | 50 \or |
| 47 \@mdf@WithIBMPlextrue | 51 \@mdf@WithIBMPlextrue |
| 52 % Normalize the stored string | |
| 53 \gdef\@mdf@fonts{ibmplex} | |
| 48 \or | 54 \or |
| 49 \@mdf@WithIBMPlexDejaVuSansMonotrue | 55 \@mdf@WithIBMPlexDejaVuSansMonotrue |
| 50 \or | 56 \or |
| 51 \@mdf@WithAdobeSourceProtrue | 57 \@mdf@WithAdobeSourceProtrue |
| 52 \or | 58 \or |
| 53 \@mdf@WithAdobeSourceProtrue | 59 \@mdf@WithAdobeSourceProtrue |
| 60 % Normalize the stored string | |
| 61 \gdef\@mdf@fonts{adobesourcepro} | |
| 54 \or | 62 \or |
| 55 \@mdf@WithSpectraltrue | 63 \@mdf@WithSpectraltrue |
| 56 \or | 64 \or |
| 57 \@mdf@WithChartertrue | 65 \@mdf@WithChartertrue |
| 58 \fi | 66 \fi |
| 59 % Not used for now : store the normalized option value (global and expanded) | |
| 60 \xdef\@mdf@fonts{\val} | |
| 61 } | 67 } |
| 62 | 68 |
| 63 % | 69 % |
| 64 % By default use the safe option dejavusansmono because is contains | 70 % By default use the safe option dejavusansmono because is contains |
| 65 % all characters without any hacks. | 71 % all characters without any hacks. |
