Debian Codegraph @

texmf-dist/tex/latex/base/inputenc.sty

raw
1 %%
2 %% This is file `inputenc.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% inputenc.dtx (with options: `package')
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
45 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
46 \ProvidesPackage{inputenc}
47 [2024/02/08 v1.3d Input encoding file]
48 \def\DeclareInputMath#1{%
49 \@inpenc@test
50 \bgroup
51 \uccode`\~#1%
52 \uppercase{%
53 \egroup
54 \def~%
55 }%
56 }
57 \def\DeclareInputText#1#2{%
58 \def\reserved@a##1 ${}%
59 \def\reserved@b{#2}%
60 \ifcat_\expandafter\reserved@a\meaning\reserved@b$ $_%
61 \DeclareInputMath{#1}{#2}%
62 \else
63 \DeclareInputMath{#1}{\IeC{#2}}%
64 \fi
65 }
66 \def\IeC{%
67 \ifx\protect\@typeset@protect
68 \expandafter\@firstofone
69 \else
70 \noexpand\IeC
71 \fi
72 }
73 \ifx\Umathcode\@undefined
74 \def\inputencoding#1{%
75 \edef\reserved@a{#1}%
76 \ifx\reserved@a\inputencodingname
77 \else
78 \the\inpenc@prehook
79 \gdef\@inpenc@test{\global\let\@inpenc@test\relax}%
80 \edef\@inpenc@undefined{\noexpand\protect\noexpand\@inpenc@undefined@{#1}}%
81 \edef\inputencodingname{#1}%
82 \@inpenc@loop\^^A\^^H%
83 \@inpenc@loop\^^K\^^K%
84 \@inpenc@loop\^^N\^^_%
85 \@inpenc@loop\^^?\^^ff%
86 \xdef\saved@endlinechar@code{\the\endlinechar}%
87 \endlinechar\m@ne
88 \xdef\saved@space@catcode{\the\catcode`\ }%
89 \catcode`\ 9\relax
90 \xdef\saved@at@catcode{\the\catcode`\@}%
91 \makeatletter
92 \xdef\saved@percent@catcode{\the\catcode`\%}%
93 \catcode`\%14\relax
94 \input{#1.def}%
95 \endlinechar\saved@endlinechar@code\relax
96 \catcode`\ \saved@space@catcode\relax
97 \catcode`\@\saved@at@catcode\relax
98 \catcode`\%\saved@percent@catcode\relax
99 \ifx\@inpenc@test\relax\else
100 \PackageWarning{inputenc}%
101 {No characters defined\MessageBreak
102 by input encoding change to `#1'\MessageBreak}%
103 \fi
104 \the\inpenc@posthook
105 \fi
106 }
107 \else
108 \def\inputencoding#1{%
109 \edef\reserved@a{#1}%
110 \def\reserved@b{utf8x}%
111 \ifx\reserved@a\reserved@b\def\reserved@a{utf8}\fi
112 \def\reserved@b{utf8}%
113 \ifx\reserved@a\reserved@b
114 \PackageWarningNoLine
115 {inputenc}%
116 {inputenc package ignored with utf8 based engines}%
117 \else
118 \def\reserved@b{x-ascii}%
119 \ifx\reserved@a\reserved@b\def\reserved@a{ascii}\fi
120 \def\reserved@b{ascii}%
121 \ifx\reserved@a\reserved@b
122 \PackageWarningNoLine
123 {inputenc}%
124 {inputenc can't be used to ensure 7bit clean source\MessageBreak
125 with a utf engine: Package ignored: utf8 assumed}%
126 \else
127 \PackageError
128 {inputenc}%
129 {inputenc is not designed for xetex or luatex.\MessageBreak
130 only UTF-8 supported}%
131 {For xelatex or lualatex save the document in UTF-8 encoding\MessageBreak
132 and do not use inputenc, or use the [utf8] option.}
133 \fi
134 \fi
135 }
136 \fi
137 \ifx\inpenc@prehook\@undefined\newtoks\inpenc@prehook\fi
138 \ifx\inpenc@posthook\@undefined\newtoks\inpenc@posthook\fi
139 \def\@inpenc@undefined@#1{\PackageError{inputenc}%
140 {Keyboard character used is undefined\MessageBreak
141 in inputencoding `#1'}%
142 {You need to provide a definition with
143 \noexpand\DeclareInputText\MessageBreak or
144 \noexpand\DeclareInputMath before using this key.}}%
145 \def\@inpenc@loop#1#2{%
146 \@tempcnta`#1\relax
147 \loop
148 \catcode\@tempcnta\active
149 \bgroup
150 \uccode`\~\@tempcnta
151 \uppercase{%
152 \egroup
153 \let~\@inpenc@undefined
154 }%
155 \ifnum\@tempcnta<`#2\relax
156 \advance\@tempcnta\@ne
157 \repeat}
158 \DeclareOption{utf8x}{\ifdefined\UseRawInputEncoding
159 \UseRawInputEncoding
160 \fi
161 \inputencoding{\CurrentOption}}
162 \DeclareOption*{\inputencoding{\CurrentOption}}
163 \ProcessOptions
164 \endinput
165 %%
166 %% End of file `inputenc.sty'.