summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/extract/README4
-rw-r--r--Master/texmf-dist/doc/latex/extract/extract.bib2
-rw-r--r--Master/texmf-dist/doc/latex/extract/extract.pdfbin229260 -> 231413 bytes
-rw-r--r--Master/texmf-dist/doc/latex/extract/xtrex1.tex2
-rw-r--r--Master/texmf-dist/doc/latex/extract/xtrex2.tex2
-rw-r--r--Master/texmf-dist/doc/latex/extract/xtrex3.tex2
-rw-r--r--Master/texmf-dist/doc/latex/extract/xtrex4.tex2
-rw-r--r--Master/texmf-dist/doc/latex/extract/xtrex5.tex2
-rw-r--r--Master/texmf-dist/doc/latex/extract/xtrex6.tex2
-rw-r--r--Master/texmf-dist/doc/latex/extract/xtrex7.tex2
-rw-r--r--Master/texmf-dist/doc/latex/extract/xtrpream.ble2
-rw-r--r--Master/texmf-dist/source/latex/extract/extract.dtx91
-rw-r--r--Master/texmf-dist/tex/latex/extract/extract.sty69
13 files changed, 124 insertions, 58 deletions
diff --git a/Master/texmf-dist/doc/latex/extract/README b/Master/texmf-dist/doc/latex/extract/README
index c54f79fc8a0..581b965c20d 100644
--- a/Master/texmf-dist/doc/latex/extract/README
+++ b/Master/texmf-dist/doc/latex/extract/README
@@ -1,5 +1,5 @@
-extract v1.9
-------------
+extract v1.9a
+-------------
This package can be used to (conditionally) extract specific
commands and environments from a source file and write them to a
diff --git a/Master/texmf-dist/doc/latex/extract/extract.bib b/Master/texmf-dist/doc/latex/extract/extract.bib
index 87c3bde3be2..e296eb8607e 100644
--- a/Master/texmf-dist/doc/latex/extract/extract.bib
+++ b/Master/texmf-dist/doc/latex/extract/extract.bib
@@ -7,7 +7,7 @@
%% extract.dtx (with options: `bib')
%%
%% ---------------------------------------
-%% Copyright (C) 2004-2005 Hendri Adriaens
+%% Copyright (C) 2004-2019 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
diff --git a/Master/texmf-dist/doc/latex/extract/extract.pdf b/Master/texmf-dist/doc/latex/extract/extract.pdf
index 1ed5ee687dd..b980a381252 100644
--- a/Master/texmf-dist/doc/latex/extract/extract.pdf
+++ b/Master/texmf-dist/doc/latex/extract/extract.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/extract/xtrex1.tex b/Master/texmf-dist/doc/latex/extract/xtrex1.tex
index b3f0df8918e..141d20556ea 100644
--- a/Master/texmf-dist/doc/latex/extract/xtrex1.tex
+++ b/Master/texmf-dist/doc/latex/extract/xtrex1.tex
@@ -7,7 +7,7 @@
%% extract.dtx (with options: `xtrex1')
%%
%% ---------------------------------------
-%% Copyright (C) 2004-2005 Hendri Adriaens
+%% Copyright (C) 2004-2019 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
diff --git a/Master/texmf-dist/doc/latex/extract/xtrex2.tex b/Master/texmf-dist/doc/latex/extract/xtrex2.tex
index 34fb73b4b0c..300e4c46f8d 100644
--- a/Master/texmf-dist/doc/latex/extract/xtrex2.tex
+++ b/Master/texmf-dist/doc/latex/extract/xtrex2.tex
@@ -7,7 +7,7 @@
%% extract.dtx (with options: `xtrex2')
%%
%% ---------------------------------------
-%% Copyright (C) 2004-2005 Hendri Adriaens
+%% Copyright (C) 2004-2019 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
diff --git a/Master/texmf-dist/doc/latex/extract/xtrex3.tex b/Master/texmf-dist/doc/latex/extract/xtrex3.tex
index d3dfc3b25fa..4272f1e4cdc 100644
--- a/Master/texmf-dist/doc/latex/extract/xtrex3.tex
+++ b/Master/texmf-dist/doc/latex/extract/xtrex3.tex
@@ -7,7 +7,7 @@
%% extract.dtx (with options: `xtrex3')
%%
%% ---------------------------------------
-%% Copyright (C) 2004-2005 Hendri Adriaens
+%% Copyright (C) 2004-2019 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
diff --git a/Master/texmf-dist/doc/latex/extract/xtrex4.tex b/Master/texmf-dist/doc/latex/extract/xtrex4.tex
index d8376bdc711..2f8db80737d 100644
--- a/Master/texmf-dist/doc/latex/extract/xtrex4.tex
+++ b/Master/texmf-dist/doc/latex/extract/xtrex4.tex
@@ -7,7 +7,7 @@
%% extract.dtx (with options: `xtrex4')
%%
%% ---------------------------------------
-%% Copyright (C) 2004-2005 Hendri Adriaens
+%% Copyright (C) 2004-2019 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
diff --git a/Master/texmf-dist/doc/latex/extract/xtrex5.tex b/Master/texmf-dist/doc/latex/extract/xtrex5.tex
index 4c5bbe6680f..0b6eff78ea4 100644
--- a/Master/texmf-dist/doc/latex/extract/xtrex5.tex
+++ b/Master/texmf-dist/doc/latex/extract/xtrex5.tex
@@ -7,7 +7,7 @@
%% extract.dtx (with options: `xtrex5')
%%
%% ---------------------------------------
-%% Copyright (C) 2004-2005 Hendri Adriaens
+%% Copyright (C) 2004-2019 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
diff --git a/Master/texmf-dist/doc/latex/extract/xtrex6.tex b/Master/texmf-dist/doc/latex/extract/xtrex6.tex
index e01b2725e02..80d9adec85e 100644
--- a/Master/texmf-dist/doc/latex/extract/xtrex6.tex
+++ b/Master/texmf-dist/doc/latex/extract/xtrex6.tex
@@ -7,7 +7,7 @@
%% extract.dtx (with options: `xtrex6')
%%
%% ---------------------------------------
-%% Copyright (C) 2004-2005 Hendri Adriaens
+%% Copyright (C) 2004-2019 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
diff --git a/Master/texmf-dist/doc/latex/extract/xtrex7.tex b/Master/texmf-dist/doc/latex/extract/xtrex7.tex
index 98ae6ff31a3..5abd788d2ef 100644
--- a/Master/texmf-dist/doc/latex/extract/xtrex7.tex
+++ b/Master/texmf-dist/doc/latex/extract/xtrex7.tex
@@ -7,7 +7,7 @@
%% extract.dtx (with options: `xtrex7')
%%
%% ---------------------------------------
-%% Copyright (C) 2004-2005 Hendri Adriaens
+%% Copyright (C) 2004-2019 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
diff --git a/Master/texmf-dist/doc/latex/extract/xtrpream.ble b/Master/texmf-dist/doc/latex/extract/xtrpream.ble
index de284ca5b2a..6288e190f06 100644
--- a/Master/texmf-dist/doc/latex/extract/xtrpream.ble
+++ b/Master/texmf-dist/doc/latex/extract/xtrpream.ble
@@ -7,7 +7,7 @@
%% extract.dtx (with options: `preamble')
%%
%% ---------------------------------------
-%% Copyright (C) 2004-2005 Hendri Adriaens
+%% Copyright (C) 2004-2019 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
diff --git a/Master/texmf-dist/source/latex/extract/extract.dtx b/Master/texmf-dist/source/latex/extract/extract.dtx
index 42aa96f4c5b..801a9834338 100644
--- a/Master/texmf-dist/source/latex/extract/extract.dtx
+++ b/Master/texmf-dist/source/latex/extract/extract.dtx
@@ -16,7 +16,7 @@
% extract.sty
%
%% ---------------------------------------
-%% Copyright (C) 2004-2005 Hendri Adriaens
+%% Copyright (C) 2004-2019 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -109,7 +109,7 @@ of the package.
%
% \GetFileInfo{extract.sty}
%
-% \CheckSum{1011}
+% \CheckSum{1069}
%
% \DoNotIndex{\@backslashchar,\@bsphack,\@checkend,\@currenvir,
% \@currenvline,\@doendpe,\@eha,\@ehc,\@empty,\@endpefalse,\@esphack,
@@ -920,7 +920,7 @@ of the package.
%<*extract>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{extract}
- [2019/09/17 v1.9 extract content from document (HA)]
+ [2019/09/18 v1.9a extract content from document (HA)]
\RequirePackage{verbatim}
\RequirePackage{xkeyval}
\newwrite\XTR@out
@@ -1086,47 +1086,50 @@ of the package.
% \end{macro}
% \begin{macro}{\begin}
% \marg{environment}\\
-% \changes{v1.9}{2019/09/17}{Changed definition to robust version}
+% \changes{v1.9a}{2019/09/18}{Added definitions for robust versions of \cs{begin} and \cs{end}}
% Modify the macro |\begin| to allow adding code to a level specific
% hook which can be executed after |\endgroup| in |\end|. See for
-% more info on this macro the \LaTeX\ source~\cite{LaTeXbase}.
-% \begin{macrocode}
-\@namedef{begin}#1{%
- \@ifundefined{#1}%
- {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
- {\def\reserved@a{\def\@currenvir{#1}%
- \edef\@currenvline{\on@line}%
- \csname #1\endcsname}}%
- \@ignorefalse
- \begingroup\@endpefalse
+% more info on this macro the \LaTeX\ source~\cite{LaTeXbase}. We first do this
+% for the new \LaTeX\ format, which defines robust versions of |\begin| and |\end|.
+% \begin{macrocode}
+\@ifl@t@r\fmtversion{2019/10/01}%
+{% new format
+ \@namedef{begin }#1{%
+ \@ifundefined{#1}%
+ {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
+ {\def\reserved@a{\def\@currenvir{#1}%
+ \edef\@currenvline{\on@line}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup\@endpefalse
% \end{macrocode}
% Advance depth level.
% \begin{macrocode}
- \global\advance\@envdepth\@ne
+ \global\advance\@envdepth\@ne
% \end{macrocode}
% Initialize the hook for this level.
% \begin{macrocode}
- \global\@namedef{@afterendenvhook@\romannumeral\@envdepth}{}%
- \reserved@a}
+ \global\@namedef{@afterendenvhook@\romannumeral\@envdepth}{}%
+ \reserved@a
+ }%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\end}
% \marg{environment}\\
-% \changes{v1.9}{2019/09/17}{Changed definition to robust version}
% Modify |\end| to execute the code collected in the hook.
% \begin{macrocode}
-\@namedef{end}#1{%
- \csname end#1\endcsname\@checkend{#1}%
- \expandafter\endgroup\if@endpe\@doendpe\fi
+ \@namedef{end }#1{%
+ \csname end#1\endcsname\@checkend{#1}%
+ \expandafter\endgroup\if@endpe\@doendpe\fi
% \end{macrocode}
% Copy current hook code to a temporary macro.
% \begin{macrocode}
- \expandafter\let\expandafter\reserved@a
- \csname @afterendenvhook@\romannumeral\@envdepth\endcsname
+ \expandafter\let\expandafter\reserved@a
+ \csname @afterendenvhook@\romannumeral\@envdepth\endcsname
% \end{macrocode}
% Decrease the depth.
% \begin{macrocode}
- \global\advance\@envdepth\m@ne
+ \global\advance\@envdepth\m@ne
% \end{macrocode}
% Execute the hook of the current environment. This is done after
% decreasing the depth as to avoid level mixing problems when the
@@ -1135,8 +1138,44 @@ of the package.
% defined since it is executed after the group and does not belong
% anymore to the environment in which the hook was defined.
% \begin{macrocode}
- \reserved@a\relax
- \if@ignore\@ignorefalse\ignorespaces\fi}
+ \reserved@a\relax
+ \if@ignore\@ignorefalse\ignorespaces\fi
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\begin}
+% \marg{environment}\\
+% This is the code for the old format of \LaTeX.
+% \begin{macrocode}
+}{% old format
+ \def\begin#1{%
+ \@ifundefined{#1}%
+ {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
+ {\def\reserved@a{\def\@currenvir{#1}%
+ \edef\@currenvline{\on@line}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup\@endpefalse
+ \global\advance\@envdepth\@ne
+ \global\@namedef{@afterendenvhook@\romannumeral\@envdepth}{}%
+ \reserved@a
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\end}
+% \marg{environment}
+% This is the code for the old format of \LaTeX.
+% \begin{macrocode}
+ \def\end#1{%
+ \csname end#1\endcsname\@checkend{#1}%
+ \expandafter\endgroup\if@endpe\@doendpe\fi
+ \expandafter\let\expandafter\reserved@a
+ \csname @afterendenvhook@\romannumeral\@envdepth\endcsname
+ \global\advance\@envdepth\m@ne
+ \reserved@a\relax
+ \if@ignore\@ignorefalse\ignorespaces\fi
+ }%
+}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\AfterEndEnv}
diff --git a/Master/texmf-dist/tex/latex/extract/extract.sty b/Master/texmf-dist/tex/latex/extract/extract.sty
index af58fd244be..2bf5f5d3a41 100644
--- a/Master/texmf-dist/tex/latex/extract/extract.sty
+++ b/Master/texmf-dist/tex/latex/extract/extract.sty
@@ -7,7 +7,7 @@
%% extract.dtx (with options: `extract')
%%
%% ---------------------------------------
-%% Copyright (C) 2004-2005 Hendri Adriaens
+%% Copyright (C) 2004-2019 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -32,7 +32,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{extract}
- [2019/09/17 v1.9 extract content from document (HA)]
+ [2019/09/18 v1.9a extract content from document (HA)]
\RequirePackage{verbatim}
\RequirePackage{xkeyval}
\newwrite\XTR@out
@@ -97,25 +97,52 @@
\fi
\fi
\newcount\@envdepth\@envdepth\z@
-\@namedef{begin}#1{%
- \@ifundefined{#1}%
- {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
- {\def\reserved@a{\def\@currenvir{#1}%
- \edef\@currenvline{\on@line}%
- \csname #1\endcsname}}%
- \@ignorefalse
- \begingroup\@endpefalse
- \global\advance\@envdepth\@ne
- \global\@namedef{@afterendenvhook@\romannumeral\@envdepth}{}%
- \reserved@a}
-\@namedef{end}#1{%
- \csname end#1\endcsname\@checkend{#1}%
- \expandafter\endgroup\if@endpe\@doendpe\fi
- \expandafter\let\expandafter\reserved@a
- \csname @afterendenvhook@\romannumeral\@envdepth\endcsname
- \global\advance\@envdepth\m@ne
- \reserved@a\relax
- \if@ignore\@ignorefalse\ignorespaces\fi}
+\@ifl@t@r\fmtversion{2019/10/01}%
+{% new format
+ \@namedef{begin }#1{%
+ \@ifundefined{#1}%
+ {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
+ {\def\reserved@a{\def\@currenvir{#1}%
+ \edef\@currenvline{\on@line}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup\@endpefalse
+ \global\advance\@envdepth\@ne
+ \global\@namedef{@afterendenvhook@\romannumeral\@envdepth}{}%
+ \reserved@a
+ }%
+ \@namedef{end }#1{%
+ \csname end#1\endcsname\@checkend{#1}%
+ \expandafter\endgroup\if@endpe\@doendpe\fi
+ \expandafter\let\expandafter\reserved@a
+ \csname @afterendenvhook@\romannumeral\@envdepth\endcsname
+ \global\advance\@envdepth\m@ne
+ \reserved@a\relax
+ \if@ignore\@ignorefalse\ignorespaces\fi
+ }%
+}{% old format
+ \def\begin#1{%
+ \@ifundefined{#1}%
+ {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
+ {\def\reserved@a{\def\@currenvir{#1}%
+ \edef\@currenvline{\on@line}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup\@endpefalse
+ \global\advance\@envdepth\@ne
+ \global\@namedef{@afterendenvhook@\romannumeral\@envdepth}{}%
+ \reserved@a
+ }%
+ \def\end#1{%
+ \csname end#1\endcsname\@checkend{#1}%
+ \expandafter\endgroup\if@endpe\@doendpe\fi
+ \expandafter\let\expandafter\reserved@a
+ \csname @afterendenvhook@\romannumeral\@envdepth\endcsname
+ \global\advance\@envdepth\m@ne
+ \reserved@a\relax
+ \if@ignore\@ignorefalse\ignorespaces\fi
+ }%
+}
\def\AfterEndEnv{%
\expandafter\g@addto@macro
\csname @afterendenvhook@\romannumeral\@envdepth\endcsname