Mercurial > hgrepos > Python > libs > ConfigMix
comparison docs/_latex/my-doc-fonts.sty @ 776:48deafc1fd2f
Use the new implementations of my-doc-fonts.sty and my-doc-style.sty.
Changed titlepage to contain build date the VCS revision.
Needed some conf.py variable changes: today is now the
logical date (revision date) and today is the build date.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sat, 16 May 2026 01:52:49 +0200 |
| parents | 741ebfe77e55 |
| children |
comparison
equal
deleted
inserted
replaced
| 775:ac7e98fe3e14 | 776:48deafc1fd2f |
|---|---|
| 2 % | 2 % |
| 3 % Some font hacks for my Sphinx PDF documents | 3 % Some font hacks for my Sphinx PDF documents |
| 4 % | 4 % |
| 5 \NeedsTeXFormat{LaTeX2e} | 5 \NeedsTeXFormat{LaTeX2e} |
| 6 \ProvidesPackage{my-doc-fonts}[% | 6 \ProvidesPackage{my-doc-fonts}[% |
| 7 2026/05/13 v0.2 (Franz Glasner) Fonts for Sphinx generated PDFs] | 7 2026/05/16 v0.3 (Franz Glasner) Fonts for Sphinx generated PDFs] |
| 8 \RequirePackage{xkeyval} | 8 \RequirePackage{xkeyval} |
| 9 \RequirePackage{fontspec} | 9 \RequirePackage{fontspec} |
| 10 \IfFileExists{xcolor.sty}{% | 10 \IfFileExists{xcolor.sty}{% |
| 11 % Should Sphinx load xcolor with its dvipsnames and svgnames options? | 11 % Should Sphinx load xcolor with its dvipsnames and svgnames options? |
| 12 \RequirePackage{xcolor} | 12 \RequirePackage{xcolor} |
| 13 }{% | 13 }{% |
| 14 \RequirePackage{color} | 14 \RequirePackage{color} |
| 15 } | 15 } |
| 16 | 16 |
| 17 \newif\if@mdf@@sscode\@mdf@@sscodefalse | 17 \newif\if@mdf@mono@dejavusansmono\@mdf@mono@dejavusansmonofalse |
| 18 \newif\if@mdf@@inconsolata\@mdf@@inconsolatafalse | 18 \newif\if@mdf@mono@cmmono\@mdf@mono@cmmonofalse |
| 19 \newif\if@mdf@mono@robotomono\@mdf@mono@robotomonofalse | |
| 20 \newif\if@mdf@mono@sscode\@mdf@mono@sscodefalse | |
| 21 \newif\if@mdf@mono@inconsolata\@mdf@mono@inconsolatafalse | |
| 22 \newif\if@mdf@mono@libertinusmono\@mdf@mono@libertinusmonofalse | |
| 23 \newif\if@mdf@augment@libertinusmono\@mdf@augment@libertinusmonofalse | |
| 19 | 24 |
| 20 \newif\if@mdf@WithDejaVuSansMono | 25 \newif\if@mdf@WithDejaVuSansMono |
| 21 \newif\if@mdf@WithPlexMono | 26 \newif\if@mdf@WithCM |
| 22 \newif\if@mdf@WithAdobeSource | 27 \newif\if@mdf@WithRobotoMono |
| 28 \newif\if@mdf@WithIBMPlex | |
| 29 \newif\if@mdf@WithIBMPlexDejaVuSansMono | |
| 30 \newif\if@mdf@WithAdobeSourcePro | |
| 23 \newif\if@mdf@WithSpectral | 31 \newif\if@mdf@WithSpectral |
| 24 \newif\if@mdf@WithCharter | 32 \newif\if@mdf@WithCharter |
| 25 | 33 \newif\if@mdf@WithLibertinus |
| 26 \def\@mdf@reset@font@options{\@mdf@WithDejaVuSansMonofalse\@mdf@WithPlexMonofalse\@mdf@WithAdobeSourcefalse\@mdf@WithCharterfalse} | 34 \newif\if@mdf@WithGaramond |
| 27 | 35 \newif\if@mdf@WithTufte |
| 28 \DeclareOptionX{dejavusansmono}[true]{\@mdf@reset@font@options\csname @mdf@WithDejaVuSansMono#1\endcsname} | 36 \newif\if@mdf@WithPalatino |
| 29 \DeclareOptionX{plexmono}[true]{\@mdf@reset@font@options\csname @mdf@WithPlexMono#1\endcsname} | 37 \newif\if@mdf@WithCrimson |
| 30 \DeclareOptionX{adobesource}[true]{\@mdf@reset@font@options\csname @mdf@WithAdobeSource#1\endcsname} | 38 |
| 31 \DeclareOptionX{spectral}[true]{\@mdf@reset@font@options\csname @mdf@WithSpectral#1\endcsname} | 39 % A key compatible with options processing as option "fonts" but choices. |
| 32 \DeclareOptionX{charter}[true]{\@mdf@reset@font@options\csname @mdf@WithCharter#1\endcsname} | 40 \define@choicekey*{my-doc-fonts.sty}{fonts}[\val\nr]{% |
| 41 % do not change anything: just deactivate the default "dejavusansmono" | |
| 42 default, | |
| 43 % no augmentation needed: all characters available | |
| 44 dejavusansmono, % use DejaVu Sans Mono as monospaced font | |
| 45 % the fonts below are augmented for missing characters | |
| 46 cm, % assume CM fonts and just fix missing characters | |
| 47 robotomono, % use Roboto Mono as mono font | |
| 48 ibmplex, plex, % use the IBM Plex family (incl. Math) | |
| 49 plex-dejavusansmono, % use IBM Plex Serif/Sans and DejaVu Sans Mono | |
| 50 adobesourcepro, adobesource, % Use Adobe Source Serif/Sans/Mono | |
| 51 spectral, % use Spectral, Source Sans Pro and Source Code Pro | |
| 52 charter, % use XCharter (with XCharter Math), Lato and Inconsolata | |
| 53 libertinus, % use Libertinus family (incl. Math) | |
| 54 garamond, % EB Garamond (with Math), Libre Franklin and Inconsolata | |
| 55 tufte, % Tufte fonts: ETbb (with Math), GilliusADFNo2, DejaVu Sans Mono | |
| 56 palatino, % Palatino, Inter and Source Code Pro | |
| 57 crimson, % Crimson Pro, Cabin and Source Code Pro (incl. Erewhon Math) | |
| 58 }{% | |
| 59 % Not used for now : store the normalized option value (global and expanded) | |
| 60 \xdef\@mdf@fonts{\val}% | |
| 61 % Reset all option related font selection flags | |
| 62 \@mdf@WithDejaVuSansMonofalse | |
| 63 \@mdf@WithCMfalse | |
| 64 \@mdf@WithRobotoMonofalse | |
| 65 \@mdf@WithIBMPlexfalse | |
| 66 \@mdf@WithIBMPlexDejaVuSansMonofalse | |
| 67 \@mdf@WithAdobeSourceProfalse | |
| 68 \@mdf@WithSpectralfalse | |
| 69 \@mdf@WithCharterfalse | |
| 70 \@mdf@WithLibertinusfalse | |
| 71 \@mdf@WithGaramondfalse | |
| 72 \@mdf@WithTuftefalse | |
| 73 \@mdf@WithPalatinofalse | |
| 74 \@mdf@WithCrimsonfalse | |
| 75 % Now set the needed font selection flag | |
| 76 \ifcase\nr\relax | |
| 77 \relax | |
| 78 \or | |
| 79 \@mdf@WithDejaVuSansMonotrue | |
| 80 \or | |
| 81 \@mdf@WithCMtrue | |
| 82 \or | |
| 83 \@mdf@WithRobotoMonotrue | |
| 84 \or | |
| 85 \@mdf@WithIBMPlextrue | |
| 86 \or | |
| 87 \@mdf@WithIBMPlextrue | |
| 88 % Normalize the stored string | |
| 89 \gdef\@mdf@fonts{ibmplex} | |
| 90 \or | |
| 91 \@mdf@WithIBMPlexDejaVuSansMonotrue | |
| 92 \or | |
| 93 \@mdf@WithAdobeSourceProtrue | |
| 94 \or | |
| 95 \@mdf@WithAdobeSourceProtrue | |
| 96 % Normalize the stored string | |
| 97 \gdef\@mdf@fonts{adobesourcepro} | |
| 98 \or | |
| 99 \@mdf@WithSpectraltrue | |
| 100 \or | |
| 101 \@mdf@WithChartertrue | |
| 102 \or | |
| 103 \@mdf@WithLibertinustrue | |
| 104 \or | |
| 105 \@mdf@WithGaramondtrue | |
| 106 \or | |
| 107 \@mdf@WithTuftetrue | |
| 108 \or | |
| 109 \@mdf@WithPalatinotrue | |
| 110 \or | |
| 111 \@mdf@WithCrimsontrue | |
| 112 \fi | |
| 113 } | |
| 33 | 114 |
| 34 % | 115 % |
| 35 % By default use the safe option dejavusansmono because is contains | 116 % By default use the safe option dejavusansmono because is contains |
| 36 % all characters without any hacks. | 117 % all characters without any hacks. |
| 37 % | 118 % |
| 38 \ExecuteOptionsX{dejavusansmono} | 119 \ExecuteOptionsX{fonts=dejavusansmono} |
| 39 \ProcessOptionsX*\relax | 120 \ProcessOptionsX\relax |
| 40 | 121 |
| 41 \if@mdf@WithDejaVuSansMono | 122 \if@mdf@WithDejaVuSansMono |
| 42 \RequirePackage[DefaultFeatures={Scale=0.92},mono=false]{plex-otf} | 123 % default but with DejaVu Sans Mono as monospaced font |
| 43 \RequirePackage[mono=true,serif=false,sans=false,math=false]{dejavu-otf} % all symbols are available | 124 %\RequirePackage[DefaultFeatures={Scale=0.92},mono=false]{plex-otf} |
| 44 \fi | 125 %\RequirePackage[mono=true,serif=false,sans=false,math=false]{dejavu-otf} % all symbols are available |
| 45 % | 126 \@mdf@mono@dejavusansmonotrue |
| 46 % | 127 \fi |
| 47 \if@mdf@WithPlexMono | 128 \if@mdf@WithCM |
| 129 \@mdf@mono@cmmonotrue | |
| 130 \fi | |
| 131 \if@mdf@WithRobotoMono | |
| 132 \@mdf@mono@robotomonotrue | |
| 133 \fi | |
| 134 % | |
| 135 % | |
| 136 \if@mdf@WithIBMPlex | |
| 48 \RequirePackage{newunicodechar} | 137 \RequirePackage{newunicodechar} |
| 49 \RequirePackage[DefaultFeatures={Scale=0.92}]{plex-otf} | 138 \RequirePackage[DefaultFeatures={Scale=0.92}]{plex-otf} |
| 50 % Dont keep all default font features from plex-otf | 139 % Dont keep all default font features from plex-otf |
| 51 \defaultfontfeatures{} | 140 \defaultfontfeatures{} |
| 52 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% | 141 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% |
| 77 \PassOptionsToPackage{% | 166 \PassOptionsToPackage{% |
| 78 verbatimvisiblespace={\textcolor{red}{{\DejaVuSansMono^^^^2423}}},% | 167 verbatimvisiblespace={\textcolor{red}{{\DejaVuSansMono^^^^2423}}},% |
| 79 verbatimcontinued={\textcolor{red}{{\DejaVuSansMono^^^^21aa}}}}% | 168 verbatimcontinued={\textcolor{red}{{\DejaVuSansMono^^^^21aa}}}}% |
| 80 {sphinx} | 169 {sphinx} |
| 81 \fi | 170 \fi |
| 82 \if@mdf@WithAdobeSource | 171 \if@mdf@WithIBMPlexDejaVuSansMono |
| 172 \RequirePackage[DefaultFeatures={Scale=0.92},mono=false]{plex-otf} | |
| 173 \@mdf@mono@dejavusansmonotrue | |
| 174 \fi | |
| 175 \if@mdf@WithAdobeSourcePro | |
| 83 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular}} | 176 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular}} |
| 84 \setmainfont{Source Serif Pro}[ | 177 \setmainfont{Source Serif Pro}[ |
| 85 UprightFont = *, | 178 UprightFont = *, |
| 86 BoldFont = * Bold, | 179 BoldFont = * Bold, |
| 87 ItalicFont = * Italic, | 180 ItalicFont = * Italic, |
| 91 UprightFont = *, | 184 UprightFont = *, |
| 92 BoldFont = * Bold, | 185 BoldFont = * Bold, |
| 93 ItalicFont = * Italic, | 186 ItalicFont = * Italic, |
| 94 BoldItalicFont = * Bold Italic, | 187 BoldItalicFont = * Bold Italic, |
| 95 ] | 188 ] |
| 96 \@mdf@@sscodetrue | 189 \@mdf@mono@sscodetrue |
| 97 \fi | 190 \fi |
| 98 \if@mdf@WithSpectral | 191 \if@mdf@WithSpectral |
| 192 \RequirePackage{unicode-math} | |
| 99 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular}} | 193 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular}} |
| 100 \setmainfont{Spectral}[ | 194 \setmainfont{Spectral}[ |
| 101 UprightFont = * Regular, | 195 UprightFont = * Regular, |
| 102 BoldFont = * Bold, | 196 BoldFont = * Bold, |
| 103 ItalicFont = * Italic, | 197 ItalicFont = * Italic, |
| 107 UprightFont = *, | 201 UprightFont = *, |
| 108 BoldFont = * Bold, | 202 BoldFont = * Bold, |
| 109 ItalicFont = * Italic, | 203 ItalicFont = * Italic, |
| 110 BoldItalicFont = * Bold Italic, | 204 BoldItalicFont = * Bold Italic, |
| 111 ] | 205 ] |
| 112 \@mdf@@sscodetrue | 206 \setmathfont{STIX Two Math}[Scale=MatchLowercase] |
| 207 \@mdf@mono@sscodetrue | |
| 113 \fi | 208 \fi |
| 114 \if@mdf@WithCharter | 209 \if@mdf@WithCharter |
| 115 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular}} | 210 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular}} |
| 116 \setmainfont{XCharter} | 211 \RequirePackage{xcharter-otf}% loads also XCharter Math |
| 117 \setsansfont{Lato}[ | 212 \setsansfont{Lato}[ |
| 118 UprightFont = * Regular, | 213 UprightFont = * Regular, |
| 119 BoldFont = * Bold, | 214 BoldFont = * Bold, |
| 120 ItalicFont = * Italic, | 215 ItalicFont = * Italic, |
| 121 BoldItalicFont = * Bold Italic, | 216 BoldItalicFont = * Bold Italic, |
| 122 Scale = MatchLowercase, | 217 Scale = MatchLowercase, |
| 123 ] | 218 ] |
| 124 \@mdf@@inconsolatatrue | 219 \@mdf@mono@inconsolatatrue |
| 220 \fi | |
| 221 \if@mdf@WithLibertinus | |
| 222 \RequirePackage{newunicodechar} | |
| 223 \RequirePackage[lining,tabular]{libertinus-otf} | |
| 224 \@mdf@augment@libertinusmonotrue | |
| 225 \fi | |
| 226 | |
| 227 \if@mdf@WithGaramond | |
| 228 \RequirePackage[lining,tabular]{ebgaramond} | |
| 229 \RequirePackage{unicode-math} | |
| 230 \setmathfont{Garamond-Math}[Scale=MatchLowercase] | |
| 231 \setsansfont{Libre Franklin}[Scale=MatchLowercase,Ligatures=TeX] | |
| 232 \@mdf@mono@inconsolatatrue | |
| 233 \fi | |
| 234 | |
| 235 \if@mdf@WithTufte | |
| 236 \RequirePackage{unicode-math} | |
| 237 \defaultfontfeatures{Numbers={Lining,Tabular},Ligatures=TeX} | |
| 238 \setmainfont{ETbb} | |
| 239 \setsansfont{GilliusADFNo2}[Scale=MatchLowercase] | |
| 240 \setmathfont{Libertinus Math}[Scale=MatchLowercase] | |
| 241 \@mdf@mono@dejavusansmonotrue | |
| 242 \fi | |
| 243 | |
| 244 \if@mdf@WithPalatino | |
| 245 \RequirePackage{unicode-math} | |
| 246 \linespread{1.06} | |
| 247 \defaultfontfeatures{Numbers={Lining,Tabular},Ligatures=TeX} | |
| 248 \setmainfont{TeXGyrePagellaX} | |
| 249 \setsansfont{Inter}[Scale=MatchLowercase] | |
| 250 %\setsansfont{Rosario}[Scale=MatchLowercase,ScaleAgain=1.013] | |
| 251 %\setmathfont{Asana Math}[Scale=MatchLowercase] | |
| 252 \setmathfont{TeX Gyre Pagella Math}[Scale=MatchLowercase] | |
| 253 %\@mdf@mono@sscodetrue | |
| 254 \@mdf@mono@libertinusmonotrue | |
| 255 \fi | |
| 256 | |
| 257 \if@mdf@WithCrimson | |
| 258 \RequirePackage{unicode-math} | |
| 259 \defaultfontfeatures{Ligatures=TeX, Numbers={Lining,Tabular}} | |
| 260 \setmainfont{Crimson Pro} | |
| 261 \setsansfont{Cabin}[Scale=MatchLowercase] | |
| 262 \defaultfontfeatures{}% Erewhon Math needs this here! | |
| 263 \setmathfont{Erewhon Math}[Scale=MatchLowercase] | |
| 264 \@mdf@mono@sscodetrue | |
| 125 \fi | 265 \fi |
| 126 | 266 |
| 127 \defaultfontfeatures{} | 267 \defaultfontfeatures{} |
| 128 | 268 |
| 129 \if@mdf@@sscode | 269 \if@mdf@mono@dejavusansmono |
| 270 % automatically applied with Scale=MatchLowercase,... | |
| 271 \RequirePackage[mono=true,serif=false,sans=false,math=false]{dejavu-otf} % all symbols are available | |
| 272 \fi | |
| 273 | |
| 274 \if@mdf@mono@cmmono | |
| 130 \RequirePackage{newunicodechar} | 275 \RequirePackage{newunicodechar} |
| 131 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular},Scale=MatchLowercase} | 276 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular},Scale=MatchLowercase} |
| 132 \setmonofont{Source Code Pro}[ | 277 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% |
| 133 UprightFont = *, | 278 UprightFont = *, |
| 134 BoldFont = * Bold, | 279 BoldFont = * Bold, |
| 135 ItalicFont = * Italic, | 280 ItalicFont = * Oblique, |
| 136 BoldItalicFont = * Bold Italic, | 281 BoldItalicFont = * Bold Oblique, |
| 137 ] | 282 ] |
| 138 \defaultfontfeatures{} | 283 \newunicodechar{▷}{{\DejaVuSansMono ▷}}% U+25B7 |
| 139 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% | 284 \newunicodechar{∶}{{\DejaVuSansMono ∶}}% U+2236 |
| 140 UprightFont = *, | 285 \newunicodechar{◆}{{\DejaVuSansMono ◆}}% U+25C6 |
| 141 BoldFont = * Bold, | |
| 142 ItalicFont = * Oblique, | |
| 143 BoldItalicFont = * Bold Oblique, | |
| 144 ] | |
| 145 \newunicodechar{∶}{{\DejaVuSansMono ∶}}% U+2236 | |
| 146 \newunicodechar{⟵}{{\DejaVuSansMono ⟵}}% U+27F5 | 286 \newunicodechar{⟵}{{\DejaVuSansMono ⟵}}% U+27F5 |
| 147 \newunicodechar{⟶}{{\DejaVuSansMono ⟶}}% U+27F6 | 287 \newunicodechar{⟶}{{\DejaVuSansMono ⟶}}% U+27F6 |
| 148 \newunicodechar{⟷}{{\DejaVuSansMono ⟷}}% U+27F7 | 288 \newunicodechar{⟷}{{\DejaVuSansMono ⟷}}% U+27F7 |
| 149 \newunicodechar{⇒}{{\DejaVuSansMono ⇒}}% U+21D2 | 289 \newunicodechar{⇒}{{\DejaVuSansMono ⇒}}% U+21D2 |
| 150 \newunicodechar{⇔}{{\DejaVuSansMono ⇔}}% U+21D4 | 290 \newunicodechar{⇔}{{\DejaVuSansMono ⇔}}% U+21D4 |
| 151 \newunicodechar{≟}{{\DejaVuSansMono ≟}}% U+225F | 291 \newunicodechar{▪}{{\DejaVuSansMono ▪}}% U+25AA |
| 152 \newunicodechar{∈}{{\DejaVuSansMono ∈}}% U+2208 | 292 \newunicodechar{≟}{{\DejaVuSansMono ≟}}% U+225F |
| 153 \newunicodechar{∌}{{\DejaVuSansMono ∌}}% U+220C | 293 \newunicodechar{∈}{{\DejaVuSansMono ∈}}% U+2208 |
| 294 \newunicodechar{∌}{{\DejaVuSansMono ∌}}% U+220C | |
| 295 \newunicodechar{≠}{{\DejaVuSansMono ≠}}% U+2260 | |
| 296 \newunicodechar{≤}{{\DejaVuSansMono ≤}}% U+2264 | |
| 297 \newunicodechar{≥}{{\DejaVuSansMono ≥}}% U+2265 | |
| 154 \PassOptionsToPackage{% | 298 \PassOptionsToPackage{% |
| 155 verbatimvisiblespace={\textcolor{red}{{\DejaVuSansMono^^^^2423}}},% | 299 verbatimvisiblespace={\textcolor{red}{{\DejaVuSansMono^^^^2423}}},% |
| 156 verbatimcontinued={\textcolor{red}{{\DejaVuSansMono^^^^21aa}}}}% | 300 verbatimcontinued={\textcolor{red}{{\DejaVuSansMono^^^^21aa}}}}% |
| 157 {sphinx} | 301 {sphinx} |
| 158 \fi | 302 \fi |
| 159 | 303 |
| 160 \if@mdf@@inconsolata | 304 \if@mdf@mono@sscode |
| 305 \RequirePackage{newunicodechar} | |
| 306 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular},Scale=MatchLowercase} | |
| 307 \setmonofont{Source Code Pro}[ | |
| 308 UprightFont = *, | |
| 309 BoldFont = * Bold, | |
| 310 ItalicFont = * Italic, | |
| 311 BoldItalicFont = * Bold Italic, | |
| 312 ] | |
| 313 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% | |
| 314 UprightFont = *, | |
| 315 BoldFont = * Bold, | |
| 316 ItalicFont = * Oblique, | |
| 317 BoldItalicFont = * Bold Oblique, | |
| 318 ] | |
| 319 \newunicodechar{∶}{{\DejaVuSansMono ∶}}% U+2236 | |
| 320 \newunicodechar{⟵}{{\DejaVuSansMono ⟵}}% U+27F5 | |
| 321 \newunicodechar{⟶}{{\DejaVuSansMono ⟶}}% U+27F6 | |
| 322 \newunicodechar{⟷}{{\DejaVuSansMono ⟷}}% U+27F7 | |
| 323 \newunicodechar{⇒}{{\DejaVuSansMono ⇒}}% U+21D2 | |
| 324 \newunicodechar{⇔}{{\DejaVuSansMono ⇔}}% U+21D4 | |
| 325 \newunicodechar{≟}{{\DejaVuSansMono ≟}}% U+225F | |
| 326 \newunicodechar{∈}{{\DejaVuSansMono ∈}}% U+2208 | |
| 327 \newunicodechar{∌}{{\DejaVuSansMono ∌}}% U+220C | |
| 328 \PassOptionsToPackage{% | |
| 329 verbatimvisiblespace={\textcolor{red}{{\DejaVuSansMono^^^^2423}}},% | |
| 330 verbatimcontinued={\textcolor{red}{{\DejaVuSansMono^^^^21aa}}}}% | |
| 331 {sphinx} | |
| 332 \fi | |
| 333 | |
| 334 \if@mdf@mono@inconsolata | |
| 161 \RequirePackage{newunicodechar} | 335 \RequirePackage{newunicodechar} |
| 162 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular},Scale=MatchLowercase} | 336 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular},Scale=MatchLowercase} |
| 163 \setmonofont{Inconsolata LGC Nerd Font Mono}[% | 337 \setmonofont{Inconsolata LGC Nerd Font Mono}[% |
| 164 UprightFont = *, | 338 UprightFont = *, |
| 165 BoldFont = * Bold, | 339 BoldFont = * Bold, |
| 166 ItalicFont = * Italic, | 340 ItalicFont = * Italic, |
| 167 BoldItalicFont = * Bold Italic, | 341 BoldItalicFont = * Bold Italic, |
| 168 ] | 342 ] |
| 169 \defaultfontfeatures{} | 343 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% |
| 170 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% | 344 UprightFont = *, |
| 171 UprightFont = *, | 345 BoldFont = * Bold, |
| 172 BoldFont = * Bold, | 346 ItalicFont = * Oblique, |
| 173 ItalicFont = * Oblique, | 347 BoldItalicFont = * Bold Oblique, |
| 174 BoldItalicFont = * Bold Oblique, | 348 ] |
| 175 ] | 349 \newunicodechar{∶}{{\DejaVuSansMono ∶}}% U+2236 |
| 176 \newunicodechar{∶}{{\DejaVuSansMono ∶}}% U+2236 | 350 \newunicodechar{⟵}{{\DejaVuSansMono ⟵}}% U+27F5 |
| 177 \newunicodechar{⟵}{{\DejaVuSansMono ⟵}}% U+27F5 | 351 \newunicodechar{⟶}{{\DejaVuSansMono ⟶}}% U+27F6 |
| 178 \newunicodechar{⟶}{{\DejaVuSansMono ⟶}}% U+27F6 | 352 \newunicodechar{⟷}{{\DejaVuSansMono ⟷}}% U+27F7 |
| 179 \newunicodechar{⟷}{{\DejaVuSansMono ⟷}}% U+27F7 | 353 \newunicodechar{≟}{{\DejaVuSansMono ≟}}% U+225F |
| 180 \newunicodechar{≟}{{\DejaVuSansMono ≟}}% U+225F | 354 \newunicodechar{∈}{{\DejaVuSansMono ∈}}% U+2208 |
| 181 \newunicodechar{∈}{{\DejaVuSansMono ∈}}% U+2208 | 355 \newunicodechar{∌}{{\DejaVuSansMono ∌}}% U+220C |
| 182 \newunicodechar{∌}{{\DejaVuSansMono ∌}}% U+220C | 356 \fi |
| 357 | |
| 358 \if@mdf@mono@robotomono | |
| 359 \RequirePackage{newunicodechar} | |
| 360 \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular},Scale=MatchLowercase} | |
| 361 \setmonofont{Roboto Mono}[% | |
| 362 UprightFont = *, | |
| 363 BoldFont = * Bold, | |
| 364 ItalicFont = * Italic, | |
| 365 BoldItalicFont = * Bold Italic, | |
| 366 ] | |
| 367 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% | |
| 368 UprightFont = *, | |
| 369 BoldFont = * Bold, | |
| 370 ItalicFont = * Oblique, | |
| 371 BoldItalicFont = * Bold Oblique, | |
| 372 ] | |
| 373 \newunicodechar{▷}{{\DejaVuSansMono ▷}}% U+25B7 | |
| 374 \newunicodechar{∶}{{\DejaVuSansMono ∶}}% U+2236 | |
| 375 \newunicodechar{◆}{{\DejaVuSansMono ◆}}% U+25C6 | |
| 376 \newunicodechar{⟵}{{\DejaVuSansMono ⟵}}% U+27F5 | |
| 377 \newunicodechar{⟶}{{\DejaVuSansMono ⟶}}% U+27F6 | |
| 378 \newunicodechar{⟷}{{\DejaVuSansMono ⟷}}% U+27F7 | |
| 379 \newunicodechar{⇒}{{\DejaVuSansMono ⇒}}% U+21D2 | |
| 380 \newunicodechar{⇔}{{\DejaVuSansMono ⇔}}% U+21D4 | |
| 381 \newunicodechar{▪}{{\DejaVuSansMono ▪}}% U+25AA | |
| 382 \newunicodechar{≟}{{\DejaVuSansMono ≟}}% U+225F | |
| 383 \newunicodechar{∈}{{\DejaVuSansMono ∈}}% U+2208 | |
| 384 \newunicodechar{∌}{{\DejaVuSansMono ∌}}% U+220C | |
| 385 | |
| 386 \PassOptionsToPackage{% | |
| 387 verbatimvisiblespace={\textcolor{red}{{\DejaVuSansMono^^^^2423}}},% | |
| 388 verbatimcontinued={\textcolor{red}{{\DejaVuSansMono^^^^21aa}}}}% | |
| 389 {sphinx} | |
| 390 \fi | |
| 391 | |
| 392 \if@mdf@mono@libertinusmono | |
| 393 % This is stolen from libertinus-otf.sty! | |
| 394 \setmonofont{LibertinusMono}[% | |
| 395 Ligatures = TeX, | |
| 396 Numbers = {Lining, Tabular}, | |
| 397 Scale = MatchLowercase, | |
| 398 FakeStretch = 0.94, | |
| 399 UprightFont = *-Regular, | |
| 400 ItalicFont = *-Regular, | |
| 401 ItalicFeatures = {FakeSlant=0.2}, | |
| 402 SlantedFont = *-Regular, | |
| 403 SlantedFeatures= {FakeSlant=0.2}, | |
| 404 BoldFont = *-Regular, | |
| 405 BoldFeatures = {RawFeature={embolden=3}}, | |
| 406 BoldItalicFont = *-Regular, | |
| 407 BoldItalicFeatures={FakeSlant=0.2,RawFeature={embolden=3}}, | |
| 408 Extension = .otf, | |
| 409 ] | |
| 410 \@mdf@augment@libertinusmonotrue | |
| 411 \fi | |
| 412 | |
| 413 \if@mdf@augment@libertinusmono | |
| 414 \RequirePackage{newunicodechar} | |
| 415 \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% | |
| 416 UprightFont = *, | |
| 417 BoldFont = * Bold, | |
| 418 ItalicFont = * Oblique, | |
| 419 BoldItalicFont = * Bold Oblique, | |
| 420 Scale=MatchLowercase, | |
| 421 Ligatures=TeX, | |
| 422 ] | |
| 423 \newunicodechar{▷}{{\DejaVuSansMono ▷}}% U+25B7 | |
| 424 \newunicodechar{∶}{{\DejaVuSansMono ∶}}% U+2236 | |
| 425 \newunicodechar{◆}{{\DejaVuSansMono ◆}}% U+25C6 | |
| 426 \newunicodechar{▪}{{\DejaVuSansMono ▪}}% U+25AA | |
| 427 \newunicodechar{⟵}{{\DejaVuSansMono ⟵}}% U+27F5 | |
| 428 \newunicodechar{⟶}{{\DejaVuSansMono ⟶}}% U+27F6 | |
| 429 \newunicodechar{⟷}{{\DejaVuSansMono ⟷}}% U+27F7 | |
| 430 \newunicodechar{⇒}{{\DejaVuSansMono ⇒}}% U+21D2 | |
| 431 \newunicodechar{⇔}{{\DejaVuSansMono ⇔}}% U+21D4 | |
| 432 \newunicodechar{≟}{{\DejaVuSansMono ≟}}% U+225F | |
| 433 \newunicodechar{∈}{{\DejaVuSansMono ∈}}% U+2208 | |
| 434 \newunicodechar{∌}{{\DejaVuSansMono ∌}}% U+220C | |
| 435 \newunicodechar{≠}{{\DejaVuSansMono ≠}}% U+2260 | |
| 436 \newunicodechar{≤}{{\DejaVuSansMono ≤}}% U+2264 | |
| 437 \newunicodechar{≥}{{\DejaVuSansMono ≥}}% U+2265 | |
| 438 %\newunicodechar{␣}{{\DejaVuSansMono ␣}}% U+2423 Missing! | |
| 439 %\newunicodechar{^^^^2423}{{\DejaVuSansMono^^^^2423}}% U+2423 | |
| 440 %\newunicodechar{␣}{\textvisiblespace}% U+2423 | |
| 441 %\catcode`^^^^2423\active\protected\def^^^^2423{\textvisiblespace} | |
| 442 | |
| 443 \PassOptionsToPackage{% | |
| 444 verbatimvisiblespace={\textcolor{red}{{\DejaVuSansMono^^^^2423}}},% | |
| 445 verbatimcontinued={\textcolor{red}{{\DejaVuSansMono^^^^21aa}}}}% | |
| 446 {sphinx} | |
| 183 \fi | 447 \fi |
| 184 | 448 |
| 185 \defaultfontfeatures{} | 449 \defaultfontfeatures{} |
| 186 | 450 |
| 451 \def\testmdf{ | |
| 452 Normalized: \@mdf@fonts\newline | |
| 453 } | |
| 454 | |
| 187 \endinput | 455 \endinput |
