Debian Codegraph @

texmf-dist/source/latex/babel/babel.ins

raw
1 %%
2 %% This file will generate fast loadable files and documentation
3 %% driver files from the doc files in this package when run through
4 %% LaTeX or TeX.
5 %%
6 %% Copyright 2012-2026 Javier Bezos and Johannes L. Braams.
7 %% Copyright 1989-2008 Johannes L. Braams and any individual authors
8 %% listed elsewhere in this file. All rights reserved.
9 %%
10 %% This file is part of the Babel system.
11 %% --------------------------------------
12 %%
13 %% It may be distributed and/or modified under the
14 %% conditions of the LaTeX Project Public License, either version 1.3
15 %% of this license or (at your option) any later version.
16 %% The latest version of this license is in
17 %% http://www.latex-project.org/lppl.txt
18 %% and version 1.3 or later is part of all distributions of LaTeX
19 %% version 2003/12/01 or later.
20 %%
21 %% This work has the LPPL maintenance status "maintained".
22 %%
23 %% The Current Maintainer of this work is Javier Bezos.
24 %%
25 %% The list of derived (unpacked) files belonging to the distribution
26 %% and covered by LPPL is defined by the unpacking scripts (with
27 %% extension .ins) which are part of the distribution.
28 %%
29 \def\filedate{2026/05/20}
30 \def\batchfile{babel.ins}
31 \input docstrip.tex
32
33 {\ifx\generate\undefined
34 \Msg{**********************************************}
35 \Msg{*}
36 \Msg{* This installation requires docstrip}
37 \Msg{* version 2.3c or later.}
38 \Msg{*}
39 \Msg{* An older version of docstrip has been input}
40 \Msg{*}
41 \Msg{**********************************************}
42 \errhelp{Move or rename old docstrip.tex.}
43 \errmessage{Old docstrip in input path}
44 \batchmode
45 \csname @@end\endcsname
46 \fi}
47
48 % Modify docstrip. A pseudo-guard is defined to set variables:
49 % <<name=value>>. These variables are used with <@name@> Two further
50 % pseudo-guards define "block" variables: <<*name>> and <</name>>
51 % delimite the lines to be retrieved with <@name@>. Note the verbatim
52 % guard is overridden, but it's not used here. This is done in two
53 % passes: 1) with saving true, there is a dummy pass, generating
54 % nothing, but blocks are read and saved; 2) with saving false, blocks
55 % are always ignored, but replacing <@name@>. While <@name@> can be
56 % used freely outside <<>>, it's only allowed inside <<>> if
57 % previously defined. Deeper nesting is not allowed.
58
59 \def\replaceVar#1<@#2{%
60 #1%
61 \ifx\endLine#2\else
62 \expandafter\replaceVarX\expandafter#2%
63 \fi}
64
65 \def\replaceVarX#1@>{\csname #1Var\endcsname\replaceVar}
66
67 \def\normalLine#1\endLine{%
68 \advance\codeLinesPassed\@ne
69 \maybeMsg{.}%
70 \edef\inLine{\replaceVar#1<@\endLine}%
71 \let\do\putline@do
72 \ifcollect
73 \xdef\varCollect{\varCollect^^J\inLine}%
74 \else
75 \activefiles
76 \fi}
77
78 \newif\ifcollect
79 \newif\ifsaving
80
81 \def\verbOption<#1#2>>#3{%
82 \ifx#1*%
83 \maybeMsg{<<*#2>>}%
84 \global\collecttrue
85 \gdef\varCollect##1{}%
86 \else\ifx#1/%
87 \global\collectfalse
88 \ifsaving
89 \expandafter\ifx\csname #2Var\endcsname\relax
90 \global\expandafter\let\csname #2Var\endcsname\varCollect
91 \else
92 \toks@\expandafter\expandafter\expandafter{%
93 \csname #2Var\expandafter\endcsname\expandafter^^J%
94 \varCollect}%
95 \expandafter\xdef\csname #2Var\endcsname{\the\toks@}%
96 \fi
97 \fi
98 \else
99 \varOptionI#1#2>%
100 \fi\fi}
101
102 \def\varOptionI#1=#2>{%
103 \maybeMsg{<<#1=#2>>}%
104 \ifsaving
105 \expandafter\gdef\csname #1Var\endcsname{#2}%
106 \fi}
107
108 % Preambles
109
110 \declarepreamble\mainpreamble
111 \endpreamble
112
113 \def\MetaPrefix{--}
114 \declarepreamble\luapreamble
115 \endpreamble
116 \let\MetaPrefix\DoubleperCent
117
118 \keepsilent
119 \askonceonly
120
121 \usedir{tex/generic/babel}
122
123 \usepreamble\mainpreamble
124
125 % Dummy, it just read "modules" to be used when generating
126 % the actual file. There must be a better way.
127 \savingtrue
128 \generate{\usepreamble\empty
129 \usepostamble\empty
130 \file{dummy.log}{\from{babel.dtx}{dummy}}}
131 \savingfalse
132
133 \generate{\file{babel.sty}{\from{babel.dtx}{package}}
134 \file{babel.def}{\from{babel.dtx}{core}}
135 \file{switch.def}{\from{babel.dtx}{kernel}}
136 \file{hyphen.cfg}{\from{babel.dtx}{patterns}}
137 \file{nil.ldf}{\from{babel.dtx}{nil}}
138 \file{errbabel.def}{\from{babel.dtx}{errors}}
139 \file{babel-ca-buddhist.tex}{\from{babel.dtx}{ca-buddhist}}
140 \file{babel-ca-coptic.tex}{\from{babel.dtx}{ca-coptic}}
141 \file{babel-ca-ethiopic.tex}{\from{babel.dtx}{ca-ethiopic}}
142 \file{babel-ca-hebrew.tex}{\from{babel.dtx}{ca-hebrew}}
143 \file{babel-ca-islamic.tex}{\from{babel.dtx}{ca-islamic}}
144 \file{babel-ca-julian.tex}{\from{babel.dtx}{ca-julian}}
145 \file{babel-ca-persian.tex}{\from{babel.dtx}{ca-persian}}
146 \file{babel-ca-chinese.tex}{\from{babel.dtx}{ca-chinese}}
147 \file{xebabel.def}{\from{babel.dtx}{xetex}}
148 \file{luababel.def}{\from{babel.dtx}{luatex}}
149 \file{txtbabel.def}{\from{babel.dtx}{texxet}}
150 }
151
152 % Support for plain users
153 \generate{\file{plain.def}{\from{babel.dtx}{plain}}
154 \file{bplain.tex}{\from{babel.dtx}{bplain}}
155 \file{blplain.tex}{\from{babel.dtx}{blplain}}
156 }
157
158 \generate{\file{cyrl2uni.def}{\from{licr2uni.dtx}{cyrl}}
159 }
160
161 % MakeIndex style files
162
163 \usedir{makeindex/babel}
164
165 \generate{\file{bbind.ist}{\from{bbidxglo.dtx}{idx}}
166 \file{bbglo.ist}{\from{bbidxglo.dtx}{glo}}}
167
168 % lua code
169
170 \def\MetaPrefix{--}
171 \usepreamble\luapreamble
172 \nopostamble
173 \generate{\file{babel-transforms.lua}{\from{babel.dtx}{transforms}}}
174 \generate{\file{babel-data-bidi.lua}{\from{babel.dtx}{bididata}}}
175 \generate{\file{babel-data-cjk.lua}{\from{babel.dtx}{cjkdata}}}
176 \generate{\file{babel-bidi-basic-r.lua}{\from{babel.dtx}{basic-r}}}
177 \generate{\file{babel-bidi-basic.lua}{\from{babel.dtx}{basic}}}
178
179 % Compatibility files
180
181 \def\compatfile#1{\file{#1.sty}{\from{bbcompat.dtx}{styfile,#1}}}
182
183 \generate{%
184 \compatfile{esperanto}
185 \compatfile{afrikaans}
186 \compatfile{dutch}
187 \compatfile{american}
188 \compatfile{british}
189 \compatfile{english}
190 \compatfile{UKenglish}
191 \compatfile{USenglish}
192 \compatfile{germanb}
193 \compatfile{austrian}
194 \compatfile{ngermanb}
195 \compatfile{naustrian}
196 \compatfile{irish}
197 \compatfile{scottish}
198 \compatfile{welsh}
199 \compatfile{breton}
200 }
201 \generate{%
202 \compatfile{francais}
203 \compatfile{italian}
204 \compatfile{portuges}
205 \compatfile{spanish}
206 \compatfile{catalan}
207 \compatfile{galician}
208 \compatfile{danish}
209 \compatfile{norsk}
210 \compatfile{swedish}
211 \compatfile{finnish}
212 \compatfile{magyar}
213 \compatfile{greek}
214 \compatfile{croatian}
215 \compatfile{czech}
216 \compatfile{slovak}
217 \compatfile{polish}
218 }
219 \generate{%
220 \compatfile{estonian}
221 \compatfile{romanian}
222 \compatfile{slovene}
223 \compatfile{russianb}
224 \compatfile{ukraineb}
225 \compatfile{turkish}
226 \compatfile{lsorbian}
227 \compatfile{usorbian}
228 \compatfile{bahasa}
229 \compatfile{hebrew}
230 \compatfile{basque}
231 \compatfile{latin}
232 \compatfile{icelandic}
233 \compatfile{serbian}
234 \compatfile{bulgarian}
235 }
236 \generate{%
237 \compatfile{samin}
238 \compatfile{interlingua}
239 \compatfile{albanian}
240 \compatfile{bahasam}
241 }
242
243
244 \Msg{***********************************************************}
245 \Msg{*}
246 \Msg{* To finish the installation you have to move all the files}
247 \Msg{* with names ending in .ldf, .sty, .def or .lua into a}
248 \Msg{* directory searched by TeX}
249 \Msg{*}
250 \Msg{* For making a format the following files have to be in a}
251 \Msg{* directory which is searched by IniTeX:}
252 \Msg{* \space\space hyphen.cfg}
253 \Msg{* \space\space language.dat}
254 \Msg{* \space\space and files with hyphenation patterns}
255 \Msg{*}
256 \Msg{* To produce source listings you can run babel.dtx}
257 \Msg{* through LuaLaTeX. Deja Vu fonts are required.}
258 \Msg{*}
259 \Msg{*}
260 \Msg{* Happy TeXing}
261 \Msg{*}
262 \Msg{***********************************************************}