summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-09-18 21:57:16 +0000
committerKarl Berry <karl@freefriends.org>2019-09-18 21:57:16 +0000
commit20994f8be67449726f9e6e41563a25084db1b1ad (patch)
treee6c82ab4b6e3c8585a29bea9f67d74b2381b22db /Master/texmf-dist/tex/latex
parent24bc2c41e40be299061ceef93ff7a5f8c74cf9c3 (diff)
extract (18sep19)
git-svn-id: svn://tug.org/texlive/trunk@52117 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/extract/extract.sty69
1 files changed, 48 insertions, 21 deletions
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