Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
comparison docs/_latex/my-doc-fonts.sty @ 196:d57cf1bb96d6
A new PDF style using "Spectral" with Source Sans/Code
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 13 May 2026 12:08:21 +0200 |
| parents | c10b2092c48f |
| children | ede8b44f6faf |
comparison
equal
deleted
inserted
replaced
| 195:959ed927b5fa | 196:d57cf1bb96d6 |
|---|---|
| 12 \RequirePackage{xcolor} | 12 \RequirePackage{xcolor} |
| 13 }{% | 13 }{% |
| 14 \RequirePackage{color} | 14 \RequirePackage{color} |
| 15 } | 15 } |
| 16 | 16 |
| 17 \newif\if@mdf@@sspro\@mdf@@ssprofalse | |
| 18 | |
| 17 \newif\if@mdf@WithDejaVuSansMono | 19 \newif\if@mdf@WithDejaVuSansMono |
| 18 \newif\if@mdf@WithPlexMono | 20 \newif\if@mdf@WithPlexMono |
| 19 \newif\if@mdf@WithAdobeSource | 21 \newif\if@mdf@WithAdobeSource |
| 22 \newif\if@mdf@WithSpectral | |
| 20 | 23 |
| 21 \def\@mdf@reset@font@options{\@mdf@WithDejaVuSansMonofalse\@mdf@WithPlexMonofalse\@mdf@WithAdobeSourcefalse} | 24 \def\@mdf@reset@font@options{\@mdf@WithDejaVuSansMonofalse\@mdf@WithPlexMonofalse\@mdf@WithAdobeSourcefalse} |
| 22 | 25 |
| 23 \DeclareOptionX{dejavusansmono}[true]{\@mdf@reset@font@options\csname @mdf@WithDejaVuSansMono#1\endcsname} | 26 \DeclareOptionX{dejavusansmono}[true]{\@mdf@reset@font@options\csname @mdf@WithDejaVuSansMono#1\endcsname} |
| 24 \DeclareOptionX{plexmono}[true]{\@mdf@reset@font@options\csname @mdf@WithPlexMono#1\endcsname} | 27 \DeclareOptionX{plexmono}[true]{\@mdf@reset@font@options\csname @mdf@WithPlexMono#1\endcsname} |
| 25 \DeclareOptionX{adobesource}[true]{\@mdf@reset@font@options\csname @mdf@WithAdobeSource#1\endcsname} | 28 \DeclareOptionX{adobesource}[true]{\@mdf@reset@font@options\csname @mdf@WithAdobeSource#1\endcsname} |
| 29 \DeclareOptionX{spectral}[true]{\@mdf@reset@font@options\csname @mdf@WithSpectral#1\endcsname} | |
| 26 | 30 |
| 27 % | 31 % |
| 28 % By default use the safe option dejavusansmono because is contains | 32 % By default use the safe option dejavusansmono because is contains |
| 29 % all characters without any hacks. | 33 % all characters without any hacks. |
| 30 % | 34 % |
| 71 verbatimvisiblespace={\textcolor{red}{{\DejaVuSansMono^^^^2423}}},% | 75 verbatimvisiblespace={\textcolor{red}{{\DejaVuSansMono^^^^2423}}},% |
| 72 verbatimcontinued={\textcolor{red}{{\DejaVuSansMono^^^^21aa}}}}% | 76 verbatimcontinued={\textcolor{red}{{\DejaVuSansMono^^^^21aa}}}}% |
| 73 {sphinx} | 77 {sphinx} |
| 74 \fi | 78 \fi |
| 75 \if@mdf@WithAdobeSource | 79 \if@mdf@WithAdobeSource |
| 76 \RequirePackage{newunicodechar} | |
| 77 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular}} | 80 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular}} |
| 78 \setmainfont{Source Serif Pro}[ | 81 \setmainfont{Source Serif Pro}[ |
| 79 UprightFont = *, | 82 UprightFont = *, |
| 80 BoldFont = * Bold, | 83 BoldFont = * Bold, |
| 81 ItalicFont = * Italic, | 84 ItalicFont = * Italic, |
| 82 BoldItalicFont = * Bold Italic, | 85 BoldItalicFont = * Bold Italic, |
| 83 ] | 86 ] |
| 87 \@mdf@@ssprotrue | |
| 88 \fi | |
| 89 \if@mdf@WithSpectral | |
| 90 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular}} | |
| 91 \setmainfont{Spectral}[ | |
| 92 UprightFont = * Regular, | |
| 93 BoldFont = * Bold, | |
| 94 ItalicFont = * Italic, | |
| 95 BoldItalicFont = * Bold Italic, | |
| 96 ] | |
| 97 \@mdf@@ssprotrue | |
| 98 \fi | |
| 99 | |
| 100 \defaultfontfeatures{} | |
| 101 | |
| 102 \if@mdf@@sspro | |
| 103 \RequirePackage{newunicodechar} | |
| 104 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular},Scale=MatchLowercase} | |
| 84 \setsansfont{Source Sans Pro}[ | 105 \setsansfont{Source Sans Pro}[ |
| 85 UprightFont = *, | 106 UprightFont = *, |
| 86 BoldFont = * Bold, | 107 BoldFont = * Bold, |
| 87 ItalicFont = * Italic, | 108 ItalicFont = * Italic, |
| 88 BoldItalicFont = * Bold Italic, | 109 BoldItalicFont = * Bold Italic, |
| 90 \setmonofont{Source Code Pro}[ | 111 \setmonofont{Source Code Pro}[ |
| 91 UprightFont = *, | 112 UprightFont = *, |
| 92 BoldFont = * Bold, | 113 BoldFont = * Bold, |
| 93 ItalicFont = * Italic, | 114 ItalicFont = * Italic, |
| 94 BoldItalicFont = * Bold Italic, | 115 BoldItalicFont = * Bold Italic, |
| 95 Scale = MatchLowercase, | |
| 96 ] | 116 ] |
| 97 \defaultfontfeatures{} | 117 \defaultfontfeatures{} |
| 98 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% | 118 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% |
| 99 UprightFont = *, | 119 UprightFont = *, |
| 100 BoldFont = * Bold, | 120 BoldFont = * Bold, |
| 101 ItalicFont = * Oblique, | 121 ItalicFont = * Oblique, |
| 102 BoldItalicFont = * Bold Oblique, | 122 BoldItalicFont = * Bold Oblique, |
| 103 Scale=MatchLowercase, | |
| 104 Ligatures=TeX, | |
| 105 ] | 123 ] |
| 106 \newunicodechar{∶}{{\DejaVuSansMono ∶}}% U+2236 | 124 \newunicodechar{∶}{{\DejaVuSansMono ∶}}% U+2236 |
| 107 \newunicodechar{⟵}{{\DejaVuSansMono ⟵}}% U+27F5 | 125 \newunicodechar{⟵}{{\DejaVuSansMono ⟵}}% U+27F5 |
| 108 \newunicodechar{⟶}{{\DejaVuSansMono ⟶}}% U+27F6 | 126 \newunicodechar{⟶}{{\DejaVuSansMono ⟶}}% U+27F6 |
| 109 \newunicodechar{⟷}{{\DejaVuSansMono ⟷}}% U+27F7 | 127 \newunicodechar{⟷}{{\DejaVuSansMono ⟷}}% U+27F7 |
| 110 \newunicodechar{⇒}{{\DejaVuSansMono ⇒}}% U+21D2 | 128 \newunicodechar{⇒}{{\DejaVuSansMono ⇒}}% U+21D2 |
| 111 \newunicodechar{⇔}{{\DejaVuSansMono ⇔}}% U+21D4 | 129 \newunicodechar{⇔}{{\DejaVuSansMono ⇔}}% U+21D4 |
| 112 \newunicodechar{≟}{{\DejaVuSansMono ≟}}% U+225F | 130 \newunicodechar{≟}{{\DejaVuSansMono ≟}}% U+225F |
| 113 \newunicodechar{∈}{{\DejaVuSansMono ∈}}% U+2208 | 131 \newunicodechar{∈}{{\DejaVuSansMono ∈}}% U+2208 |
| 114 \newunicodechar{∌}{{\DejaVuSansMono ∌}}% U+220C | 132 \newunicodechar{∌}{{\DejaVuSansMono ∌}}% U+220C |
| 115 \PassOptionsToPackage{% | 133 \PassOptionsToPackage{% |
| 116 verbatimvisiblespace={\textcolor{red}{{\DejaVuSansMono^^^^2423}}},% | 134 verbatimvisiblespace={\textcolor{red}{{\DejaVuSansMono^^^^2423}}},% |
| 117 verbatimcontinued={\textcolor{red}{{\DejaVuSansMono^^^^21aa}}}}% | 135 verbatimcontinued={\textcolor{red}{{\DejaVuSansMono^^^^21aa}}}}% |
| 118 {sphinx} | 136 {sphinx} |
| 119 \fi | 137 \fi |
| 138 | |
| 139 \defaultfontfeatures{} | |
| 140 | |
| 120 \endinput | 141 \endinput |
