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