| 1 |
%% |
| 2 |
%% This is file `utf8-2018.def', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% utf8ienc.dtx (with options: `utf8-2018') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% The source is maintained by the LaTeX Project team and bug |
| 12 |
%% reports for it can be opened at https://latex-project.org/bugs.html |
| 13 |
%% (but please observe conditions on bug reports sent to that address!) |
| 14 |
%% |
| 15 |
%% |
| 16 |
%% Copyright (C) 1993-2025 |
| 17 |
%% The LaTeX Project and any individual authors listed elsewhere |
| 18 |
%% in this file. |
| 19 |
%% |
| 20 |
%% This file was generated from file(s) of the LaTeX base system. |
| 21 |
%% -------------------------------------------------------------- |
| 22 |
%% |
| 23 |
%% It may be distributed and/or modified under the |
| 24 |
%% conditions of the LaTeX Project Public License, either version 1.3c |
| 25 |
%% of this license or (at your option) any later version. |
| 26 |
%% The latest version of this license is in |
| 27 |
%% https://www.latex-project.org/lppl.txt |
| 28 |
%% and version 1.3c or later is part of all distributions of LaTeX |
| 29 |
%% version 2008 or later. |
| 30 |
%% |
| 31 |
%% This file has the LPPL maintenance status "maintained". |
| 32 |
%% |
| 33 |
%% This file may only be distributed together with a copy of the LaTeX |
| 34 |
%% base system. You may however distribute the LaTeX base system without |
| 35 |
%% such generated files. |
| 36 |
%% |
| 37 |
%% The list of all files belonging to the LaTeX base distribution is |
| 38 |
%% given in the file `manifest.txt'. See also `legal.txt' for additional |
| 39 |
%% information. |
| 40 |
%% |
| 41 |
%% The list of derived (unpacked) files belonging to the distribution |
| 42 |
%% and covered by LPPL is defined by the unpacking scripts (with |
| 43 |
%% extension .ins) which are part of the distribution. |
| 44 |
\ProvidesFile{utf8.def} |
| 45 |
[2018/10/05 v1.2f UTF-8 support for inputenc] |
| 46 |
\makeatletter |
| 47 |
\catcode`\ \saved@space@catcode |
| 48 |
\long\def\UTFviii@two@octets#1#2{\expandafter |
| 49 |
\UTFviii@defined\csname u8:#1\string#2\endcsname} |
| 50 |
\long\def\UTFviii@three@octets#1#2#3{\expandafter |
| 51 |
\UTFviii@defined\csname u8:#1\string#2\string#3\endcsname} |
| 52 |
\long\def\UTFviii@four@octets#1#2#3#4{\expandafter |
| 53 |
\UTFviii@defined\csname u8:#1\string#2\string#3\string#4\endcsname} |
| 54 |
\def\UTFviii@defined#1{% |
| 55 |
\ifx#1\relax |
| 56 |
\if\relax\expandafter\UTFviii@checkseq\string#1\relax\relax |
| 57 |
\UTFviii@undefined@err{#1}% |
| 58 |
\else |
| 59 |
\PackageError{inputenc}{Invalid UTF-8 byte sequence}% |
| 60 |
\UTFviii@invalid@help |
| 61 |
\fi |
| 62 |
\else\expandafter |
| 63 |
#1% |
| 64 |
\fi |
| 65 |
} |
| 66 |
\def\UTFviii@invalid@err#1{% |
| 67 |
\PackageError{inputenc}{Invalid UTF-8 byte "\UTFviii@hexnumber{`#1}}% |
| 68 |
\UTFviii@invalid@help} |
| 69 |
\def\UTFviii@invalid@help{% |
| 70 |
The document does not appear to be in UTF-8 encoding.\MessageBreak |
| 71 |
Try adding \noexpand\UseRawInputEncoding as the first line of the file\MessageBreak |
| 72 |
or specify an encoding such as \noexpand\usepackage[latin1]{inputenc}\MessageBreak |
| 73 |
in the document preamble.\MessageBreak |
| 74 |
Alternatively, save the file in UTF-8 using your editor or another tool} |
| 75 |
\def\UTFviii@undefined@err#1{% |
| 76 |
\PackageError{inputenc}{Unicode character \expandafter |
| 77 |
\UTFviii@splitcsname\string#1\relax |
| 78 |
\MessageBreak |
| 79 |
not set up for use with LaTeX}% |
| 80 |
{You may provide a definition with\MessageBreak |
| 81 |
\noexpand\DeclareUnicodeCharacter}% |
| 82 |
} |
| 83 |
\def\UTFviii@checkseq#1:#2#3{% |
| 84 |
\ifnum`#2<"80 % |
| 85 |
\ifx\relax#3\else1\fi |
| 86 |
\else |
| 87 |
\ifnum`#2<"C0 % |
| 88 |
1 % |
| 89 |
\else |
| 90 |
\expandafter\expandafter\expandafter\UTFviii@check@continue |
| 91 |
\expandafter\expandafter\expandafter#3% |
| 92 |
\fi |
| 93 |
\fi} |
| 94 |
\def\UTFviii@check@continue#1{% |
| 95 |
\ifx\relax#1% |
| 96 |
\else |
| 97 |
\ifnum`#1<"80 1\else\ifnum`#1>"BF 1\fi\fi |
| 98 |
\expandafter\UTFviii@check@continue |
| 99 |
\fi |
| 100 |
} |
| 101 |
\begingroup |
| 102 |
\catcode`\~13 |
| 103 |
\catcode`\"12 |
| 104 |
\def\UTFviii@loop{% |
| 105 |
\uccode`\~\count@ |
| 106 |
\uppercase\expandafter{\UTFviii@tmp}% |
| 107 |
\advance\count@\@ne |
| 108 |
\ifnum\count@<\@tempcnta |
| 109 |
\expandafter\UTFviii@loop |
| 110 |
\fi} |
| 111 |
\def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@undefined@err{:\string~}}} |
| 112 |
\count@"1 |
| 113 |
\@tempcnta9 |
| 114 |
\UTFviii@loop |
| 115 |
\count@11 |
| 116 |
\@tempcnta12 |
| 117 |
\UTFviii@loop |
| 118 |
\count@14 |
| 119 |
\@tempcnta32 |
| 120 |
\UTFviii@loop |
| 121 |
\count@"80 |
| 122 |
\@tempcnta"C2 |
| 123 |
\def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@invalid@err\string~}} |
| 124 |
\UTFviii@loop |
| 125 |
\count@"C2 |
| 126 |
\@tempcnta"E0 |
| 127 |
\def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@two@octets\string~}} |
| 128 |
\UTFviii@loop |
| 129 |
\count@"E0 |
| 130 |
\@tempcnta"F0 |
| 131 |
\def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@three@octets\string~}} |
| 132 |
\UTFviii@loop |
| 133 |
\count@"F0 |
| 134 |
\@tempcnta"F5 |
| 135 |
\def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@four@octets\string~}} |
| 136 |
\UTFviii@loop |
| 137 |
\count@"F5 |
| 138 |
\@tempcnta"100 |
| 139 |
\def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@invalid@err\string~}} |
| 140 |
\UTFviii@loop |
| 141 |
\endgroup |
| 142 |
\@inpenc@test |
| 143 |
\ifx\@begindocumenthook\@undefined |
| 144 |
\makeatother |
| 145 |
\endinput \fi |
| 146 |
\begingroup |
| 147 |
\catcode`\"=12 |
| 148 |
\catcode`\<=12 |
| 149 |
\catcode`\.=12 |
| 150 |
\catcode`\,=12 |
| 151 |
\catcode`\;=12 |
| 152 |
\catcode`\!=12 |
| 153 |
\catcode`\~=13 |
| 154 |
\gdef\DeclareUnicodeCharacter#1#2{% |
| 155 |
\count@"#1\relax |
| 156 |
\wlog{ \space\space defining Unicode char U+#1 (decimal \the\count@)}% |
| 157 |
\begingroup |
| 158 |
\parse@XML@charref |
| 159 |
\def\UTFviii@two@octets##1##2{\csname u8:##1\string##2\endcsname}% |
| 160 |
\def\UTFviii@three@octets##1##2##3{\csname u8:##1% |
| 161 |
\string##2\string##3\endcsname}% |
| 162 |
\def\UTFviii@four@octets##1##2##3##4{\csname u8:##1% |
| 163 |
\string##2\string##3\string##4\endcsname}% |
| 164 |
\expandafter\expandafter\expandafter |
| 165 |
\expandafter\expandafter\expandafter |
| 166 |
\expandafter |
| 167 |
\gdef\UTFviii@tmp{\IeC{#2}}% |
| 168 |
\endgroup |
| 169 |
} |
| 170 |
\gdef\parse@XML@charref{% |
| 171 |
\ifnum\count@<"A0\relax |
| 172 |
\ifnum\catcode\count@=13 |
| 173 |
\uccode`\~=\count@\uppercase{\def\UTFviii@tmp{\@empty\@empty~}}% |
| 174 |
\else |
| 175 |
\PackageError{inputenc}{Cannot define non-active Unicode char value < 00A0}% |
| 176 |
\@eha |
| 177 |
\def\UTFviii@tmp{\UTFviii@tmp}% |
| 178 |
\fi |
| 179 |
\else\ifnum\count@<"800\relax |
| 180 |
\parse@UTFviii@a,% |
| 181 |
\parse@UTFviii@b C\UTFviii@two@octets.,% |
| 182 |
\else\ifnum\count@<"10000\relax |
| 183 |
\parse@UTFviii@a;% |
| 184 |
\parse@UTFviii@a,% |
| 185 |
\parse@UTFviii@b E\UTFviii@three@octets.{,;}% |
| 186 |
\else |
| 187 |
\ifnum\count@>"10FFFF\relax |
| 188 |
\PackageError{inputenc}% |
| 189 |
{\UTFviii@hexnumber\count@\space too large for Unicode}% |
| 190 |
{Values between 0 and 10FFFF are permitted}% |
| 191 |
\fi |
| 192 |
\parse@UTFviii@a;% |
| 193 |
\parse@UTFviii@a,% |
| 194 |
\parse@UTFviii@a!% |
| 195 |
\parse@UTFviii@b F\UTFviii@four@octets.{!,;}% |
| 196 |
\fi |
| 197 |
\fi |
| 198 |
\fi |
| 199 |
} |
| 200 |
\gdef\parse@UTFviii@a#1{% |
| 201 |
\@tempcnta\count@ |
| 202 |
\divide\count@ 64 |
| 203 |
\@tempcntb\count@ |
| 204 |
\multiply\count@ 64 |
| 205 |
\advance\@tempcnta-\count@ |
| 206 |
\advance\@tempcnta 128 |
| 207 |
\uccode`#1\@tempcnta |
| 208 |
\count@\@tempcntb} |
| 209 |
\gdef\parse@UTFviii@b#1#2#3#4{% |
| 210 |
\advance\count@ "#10\relax |
| 211 |
\uccode`#3\count@ |
| 212 |
\uppercase{\gdef\UTFviii@tmp{#2#3#4}}} |
| 213 |
\ifx\numexpr\@undefined |
| 214 |
\gdef\decode@UTFviii#1{0} |
| 215 |
\else |
| 216 |
\gdef\decode@UTFviii#1\relax{% |
| 217 |
\expandafter\UTFviii@cleanup |
| 218 |
\the\numexpr\dec@de@UTFviii#1\relax)))))\@empty} |
| 219 |
\gdef\UTFviii@cleanup#1)#2\@empty{#1} |
| 220 |
\gdef\dec@de@UTFviii#1{% |
| 221 |
\ifx\relax#1% |
| 222 |
\else |
| 223 |
\ifnum`#1>"EF |
| 224 |
((((`#1-"F0)% |
| 225 |
\else |
| 226 |
\ifnum`#1>"DF |
| 227 |
(((`#1-"E0)% |
| 228 |
\else |
| 229 |
\ifnum`#1>"BF |
| 230 |
((`#1-"C0)% |
| 231 |
\else |
| 232 |
\ifnum`#1>"7F |
| 233 |
)*64+(`#1-"80)% |
| 234 |
\else |
| 235 |
+`#1 % |
| 236 |
\fi |
| 237 |
\fi |
| 238 |
\fi |
| 239 |
\fi |
| 240 |
\expandafter\dec@de@UTFviii |
| 241 |
\fi} |
| 242 |
\fi |
| 243 |
\ifx\numexpr\@undefined |
| 244 |
\global\let\UTFviii@hexnumber\@firstofone |
| 245 |
\global\UTFviii@hexdigit\hexnumber@ |
| 246 |
\else |
| 247 |
\gdef\UTFviii@hexnumber#1{% |
| 248 |
\ifnum#1>15 % |
| 249 |
\expandafter\UTFviii@hexnumber\expandafter{\the\numexpr(#1-8)/16\relax}% |
| 250 |
\fi |
| 251 |
\UTFviii@hexdigit{\numexpr#1\ifnum#1>0-((#1-8)/16)*16\fi\relax}% |
| 252 |
} |
| 253 |
\gdef\UTFviii@hexdigit#1{\ifcase\numexpr#1\relax |
| 254 |
0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or |
| 255 |
A\or B\or C\or D\or E\or F\fi} |
| 256 |
\fi |
| 257 |
\gdef\UTFviii@hexcodepoint#1{U+% |
| 258 |
\ifnum#1<16 0\fi |
| 259 |
\ifnum#1<256 0\fi |
| 260 |
\ifnum#1<4096 0\fi |
| 261 |
\UTFviii@hexnumber{#1}% |
| 262 |
}% |
| 263 |
\gdef\UTFviii@splitcsname#1:#2\relax{% |
| 264 |
#2 (\expandafter\UTFviii@hexcodepoint\expandafter{% |
| 265 |
\the\numexpr\decode@UTFviii#2\relax})% |
| 266 |
} |
| 267 |
\endgroup |
| 268 |
\@onlypreamble\DeclareUnicodeCharacter |
| 269 |
\@onlypreamble\parse@XML@charref |
| 270 |
\@onlypreamble\parse@UTFviii@a |
| 271 |
\@onlypreamble\parse@UTFviii@b |
| 272 |
\begingroup |
| 273 |
\def\cdp@elt#1#2#3#4{% |
| 274 |
\wlog{Now handling font encoding #1 ...}% |
| 275 |
\lowercase{% |
| 276 |
\InputIfFileExists{#1enc.dfu}}% |
| 277 |
{\wlog{... processing UTF-8 mapping file for font % |
| 278 |
encoding #1}% |
| 279 |
\catcode`\ 9\relax}% |
| 280 |
{\wlog{... no UTF-8 mapping file for font encoding #1}}% |
| 281 |
} |
| 282 |
\cdp@list |
| 283 |
\endgroup |
| 284 |
\def\DeclareFontEncoding@#1#2#3{% |
| 285 |
\expandafter |
| 286 |
\ifx\csname T@#1\endcsname\relax |
| 287 |
\def\cdp@elt{\noexpand\cdp@elt}% |
| 288 |
\xdef\cdp@list{\cdp@list\cdp@elt{#1}% |
| 289 |
{\default@family}{\default@series}% |
| 290 |
{\default@shape}}% |
| 291 |
\expandafter\let\csname#1-cmd\endcsname\@changed@cmd |
| 292 |
\begingroup |
| 293 |
\wlog{Now handling font encoding #1 ...}% |
| 294 |
\lowercase{% |
| 295 |
\InputIfFileExists{#1enc.dfu}}% |
| 296 |
{\wlog{... processing UTF-8 mapping file for font % |
| 297 |
encoding #1}}% |
| 298 |
{\wlog{... no UTF-8 mapping file for font encoding #1}}% |
| 299 |
\endgroup |
| 300 |
\else |
| 301 |
\@font@info{Redeclaring font encoding #1}% |
| 302 |
\fi |
| 303 |
\global\@namedef{T@#1}{#2}% |
| 304 |
\global\@namedef{M@#1}{\default@M#3}% |
| 305 |
\xdef\LastDeclaredEncoding{#1}% |
| 306 |
} |
| 307 |
\DeclareUnicodeCharacter{00A9}{\textcopyright} |
| 308 |
\DeclareUnicodeCharacter{00AA}{\textordfeminine} |
| 309 |
\DeclareUnicodeCharacter{00AE}{\textregistered} |
| 310 |
\DeclareUnicodeCharacter{00BA}{\textordmasculine} |
| 311 |
\DeclareUnicodeCharacter{02C6}{\textasciicircum} |
| 312 |
\DeclareUnicodeCharacter{02DC}{\textasciitilde} |
| 313 |
\DeclareUnicodeCharacter{200C}{\textcompwordmark} |
| 314 |
\DeclareUnicodeCharacter{2026}{\textellipsis} |
| 315 |
\DeclareUnicodeCharacter{2122}{\texttrademark} |
| 316 |
\DeclareUnicodeCharacter{2423}{\textvisiblespace} |
| 317 |
\DeclareUnicodeCharacter{FEFF}{\ifhmode\nobreak\fi} |
| 318 |
\endinput |
| 319 |
%% |
| 320 |
%% End of file `utf8-2018.def'. |