summaryrefslogtreecommitdiff
path: root/macros/latex/required/babel/base/babel.ins
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-05-12 03:02:23 +0000
committerNorbert Preining <norbert@preining.info>2023-05-12 03:02:23 +0000
commit23711a0fa219bf3164abd4aa2e25cb4db9757d7d (patch)
tree2ff6367ebc2164bcd857ce389e6221f2bf6f64a6 /macros/latex/required/babel/base/babel.ins
parent9e4111819083b4794937d896ecb306c32daa1c2e (diff)
CTAN sync 202305120302
Diffstat (limited to 'macros/latex/required/babel/base/babel.ins')
-rw-r--r--macros/latex/required/babel/base/babel.ins35
1 files changed, 31 insertions, 4 deletions
diff --git a/macros/latex/required/babel/base/babel.ins b/macros/latex/required/babel/base/babel.ins
index f89a5a3498..3706b2c074 100644
--- a/macros/latex/required/babel/base/babel.ins
+++ b/macros/latex/required/babel/base/babel.ins
@@ -26,7 +26,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%%
-\def\filedate{2023/04/18}
+\def\filedate{2023/05/11}
\def\batchfile{babel.ins}
\input docstrip.tex
@@ -74,7 +74,7 @@
\else
\activefiles
\fi}
-
+
\newif\ifcollect
\newif\ifsaving
@@ -105,6 +105,32 @@
\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
@@ -153,6 +179,9 @@
}
% compatibility files
+
+\let\minusOption\bblMinus
+\let\plusOption\bblPlus
\def\compatfile#1{\file{#1.sty}{\from{bbcompat.dtx}{styfile,#1}}}
\generate{%
@@ -252,5 +281,3 @@
\Msg{* Happy TeXing}
\Msg{*}
\Msg{***********************************************************}
-
-