summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/extract
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-18 03:00:37 +0000
committerNorbert Preining <norbert@preining.info>2019-09-18 03:00:37 +0000
commit841a985f019b145be416f24859bcd1e0833ddb76 (patch)
tree54da1174340da923d25075b69108553327099df3 /macros/latex/contrib/extract
parentcda3ce3f9172e48d4bc673e57fc617ba0f0b40d1 (diff)
CTAN sync 201909180300
Diffstat (limited to 'macros/latex/contrib/extract')
-rw-r--r--macros/latex/contrib/extract/README4
-rw-r--r--macros/latex/contrib/extract/extract.dtx29
-rw-r--r--macros/latex/contrib/extract/extract.pdfbin201813 -> 229260 bytes
-rw-r--r--macros/latex/contrib/extract/extract.sty518
4 files changed, 25 insertions, 526 deletions
diff --git a/macros/latex/contrib/extract/README b/macros/latex/contrib/extract/README
index 7cc0a46779..c54f79fc8a 100644
--- a/macros/latex/contrib/extract/README
+++ b/macros/latex/contrib/extract/README
@@ -1,4 +1,4 @@
-extract v1.8
+extract v1.9
------------
This package can be used to (conditionally) extract specific
@@ -44,7 +44,7 @@ extract into your LaTeX distribution
License
-------
-Copyright (C) 2004-2005 Hendri Adriaens
+Copyright (C) 2004-2019 Hendri Adriaens
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/extract/extract.dtx b/macros/latex/contrib/extract/extract.dtx
index b4b74776be..42aa96f4c5 100644
--- a/macros/latex/contrib/extract/extract.dtx
+++ b/macros/latex/contrib/extract/extract.dtx
@@ -109,7 +109,7 @@ of the package.
%
% \GetFileInfo{extract.sty}
%
-% \CheckSum{1013}
+% \CheckSum{1011}
%
% \DoNotIndex{\@backslashchar,\@bsphack,\@checkend,\@currenvir,
% \@currenvline,\@doendpe,\@eha,\@ehc,\@empty,\@endpefalse,\@esphack,
@@ -152,7 +152,7 @@ of the package.
%\texttt{/macros/latex/contrib/extract}. See \texttt{extract.dtx} for
%information on installing \pf{extract} into your \LaTeX\
%distribution and for the license of this package.}}
-%\author{Hendri Adriaens\\\url{http://stuwww.uvt.nl/~hendri}}
+%\author{\mktitledecor Hendri Adriaens}
%\date{\fileversion\ (\filedate)}
%\maketitle
%
@@ -920,7 +920,7 @@ of the package.
%<*extract>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{extract}
- [2005/05/07 v1.8 extract content from document (HA)]
+ [2019/09/17 v1.9 extract content from document (HA)]
\RequirePackage{verbatim}
\RequirePackage{xkeyval}
\newwrite\XTR@out
@@ -1086,11 +1086,12 @@ of the package.
% \end{macro}
% \begin{macro}{\begin}
% \marg{environment}\\
+% \changes{v1.9}{2019/09/17}{Changed definition to robust version}
% 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}
-\def\begin#1{%
+\@namedef{begin}#1{%
\@ifundefined{#1}%
{\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
{\def\reserved@a{\def\@currenvir{#1}%
@@ -1111,9 +1112,10 @@ of the package.
% \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}
-\def\end#1{%
+\@namedef{end}#1{%
\csname end#1\endcsname\@checkend{#1}%
\expandafter\endgroup\if@endpe\@doendpe\fi
% \end{macrocode}
@@ -1130,7 +1132,7 @@ of the package.
% decreasing the depth as to avoid level mixing problems when the
% hook contains another environment. This environment has to be
% executed at the same level as the environment in which the hook was
-% defined since it is executed after the group and does not below
+% 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
@@ -2109,6 +2111,7 @@ c\end{extractskip}d
\usepackage{xcolor}
\usepackage{fourier}
\usepackage{varioref}
+\usepackage{pst-text}
\def\reftextafter{on page~\thevpagerefnum}
\def\reftextbefore{on page~\thevpagerefnum}
\def\reftextfaceafter{on page~\thevpagerefnum}
@@ -2121,6 +2124,20 @@ c\end{extractskip}d
\lstset{basicstyle=\footnotesize\ttfamily,columns=flexible,frame=single,%
backgroundcolor=\color{yellow!20},xleftmargin=\fboxsep,%
xrightmargin=\fboxsep,gobble=1}}{}
+\def\mktitledecor{%
+ \rput[tl]{90}(-6.5,-22.56){%
+ \psline[linewidth=1pt](0,1.5)(\paperheight,1.5)%
+ \rput[lB](.075\paperheight,.5){\pscharpath[linecolor=blue!50,%
+ fillcolor=yellow!20,fillstyle=solid,linewidth=.5pt]%
+ {\Huge\bfseries\sffamily extract}%
+ }%
+ \rput[rB](.925\paperheight,.5){\pscharpath[linecolor=blue!50,%
+ fillcolor=yellow!20,fillstyle=solid,linewidth=.5pt]%
+ {\Huge\bfseries Documentation}%
+ }%
+ \psline[linewidth=1pt](0,0)(\paperheight,0)%
+ }%
+}
\usepackage{float}
\newfloat{Listing}{htb}{loe}
\makeatletter
diff --git a/macros/latex/contrib/extract/extract.pdf b/macros/latex/contrib/extract/extract.pdf
index 3176259e8e..1ed5ee687d 100644
--- a/macros/latex/contrib/extract/extract.pdf
+++ b/macros/latex/contrib/extract/extract.pdf
Binary files differ
diff --git a/macros/latex/contrib/extract/extract.sty b/macros/latex/contrib/extract/extract.sty
deleted file mode 100644
index 46a653bf85..0000000000
--- a/macros/latex/contrib/extract/extract.sty
+++ /dev/null
@@ -1,518 +0,0 @@
-%%
-%% This is file `extract.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% extract.dtx (with options: `extract')
-%%
-%% ---------------------------------------
-%% Copyright (C) 2004-2005 Hendri Adriaens
-%% ---------------------------------------
-%%
-%% This work 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".
-%%
-%% This Current Maintainer of this work is Hendri Adriaens.
-%%
-%% This work consists of the file extract.dtx and the derived files
-%% extract.sty, xtrex1.tex, xtrex2.tex, xtrex3.tex, xtrex4.tex,
-%% xtrex5.tex, xtrex6.tex and xtrex7.tex.
-%%
-%% The following files constitute the extract package and must be
-%% distributed as a whole: readme, extract.dtx, extract.pdf and
-%% extract.sty.
-%%
-\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{extract}
- [2005/05/07 v1.8 extract content from document (HA)]
-\RequirePackage{verbatim}
-\RequirePackage{xkeyval}
-\newwrite\XTR@out
-\newwrite\XTR@tmp
-\newif\ifXTR@st
-\newif\ifXTR@skip
-\newif\ifXTR@extract
-\def\XTR@err#1{\PackageError{extract}{#1}\@ehc}
-\def\XTR@namelet#1#2{%
- \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname
-}
-\define@boolkey[XTR]{extract.sty}[XTR@]{active}[true]{}
-\define@boolkey[XTR]{extract.sty}[XTR@]{header}[true]{}
-\define@boolkey[XTR]{extract.sty}[XTR@]{handles}[true]{}
-\define@boolkey[XTR]{extract.sty}[XTR@]{copydocumentclass}[true]{}
-\DeclareOptionX[XTR]{generate}{\lowercase{\def\XTR@file{#1}}}
-\DeclareOptionX[XTR]{extract-env}{%
- \def\XTR@envs{#1}%
- \XKV@for@n{#1}\XTR@tempa\XTR@tempb
-}
-\DeclareOptionX[XTR]{extract-cmd}{%
- \def\XTR@cmdsargs{#1}%
- \XKV@for@n{#1}\XTR@tempa\XTR@tempb
-}
-\DeclareOptionX[XTR]{extract-cmdline}{%
- \def\XTR@cmdsline{#1}%
- \XKV@for@n{#1}\XTR@tempa\XTR@tempb
-}
-\def\XTR@tempb{%
- \DeclareOptionX[XTR]{\XTR@tempa-nrs}{%
- \expandafter\XKV@sp@deflist\csname XTR@\XKV@tkey\endcsname{##1}%
- \XTR@namelet{XTR@\XKV@tkey @cnt}{z@}%
- }%
- \DeclareOptionX[XTR]{\XTR@tempa-labels}{%
- \expandafter\XKV@sp@deflist\csname XTR@\XKV@tkey\endcsname{##1}%
- }%
-}
-\def\XTR@tempa{line}\XTR@tempb
-\def\XTR@tempa{extract}\XTR@tempb
-\def\XTR@tempa{extractskip}\XTR@tempb
-\DeclareOptionX*{\XTR@err{Unknown option `\CurrentOption'}}
-\ExecuteOptionsX[XTR]{header=true,handles=true,copydocumentclass=true}
-\ProcessOptionsX[XTR]
-\def\XTR@opentmp{\immediate\openout\XTR@tmp\jobname.xtr\relax}
-\def\XTR@writetmp{\immediate\write\XTR@tmp}
-\def\XTR@closetmp{\immediate\closeout\XTR@tmp}
-\def\XTR@writeout{\immediate\write\XTR@out}
-\ifXTR@active
- \XKV@ifundefined{XTR@file}{
- \XTR@activefalse
- \XTR@err{no file to generate; extract deactivated}
- }{}
- \XTR@opentmp
- \XTR@writetmp{%
- \string\lowercase{\string\def\string\XTR@tempa{\jobname}}%
- }
- \XTR@closetmp
- \input{\jobname.xtr}
- \ifx\XTR@tempa\XTR@file
- \XTR@activefalse
- \XTR@err{attempt to overwrite source file; extract deactivated}
- \fi
-\fi
-\newcount\@envdepth\@envdepth\z@
-\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
-}
-\def\XTR@checkxtr#1#2{%
- \@nameuse{XTR@#1false}%
- \XTR@namelet{XTR@maketrue}{XTR@#1true}%
- \XKV@ifundefined{XTR@#2-nrs}{%
- \XKV@ifundefined{XTR@#2-labels}\XTR@maketrue{}%
- }{%
- \begingroup
- \expandafter\count@\csname XTR@#2-nrs@cnt\endcsname
- \advance\count@\@ne
- \edef\XTR@resa{\expandafter\noexpand\expandafter\gdef\expandafter
- \noexpand\csname XTR@#2-nrs@cnt\endcsname{\the\count@}}%
- \expandafter\endgroup\XTR@resa
- }%
- \@nameuse{ifXTR@#1}\else
- \XKV@ifundefined{XTR@#2-labels}{}{%
- \ifx\XTR@currentlabel\relax\else
- \@expandtwoargs\in@{,\XTR@currentlabel,}%
- {,\csname XTR@#2-labels\endcsname,}%
- \ifin@\XTR@maketrue\fi
- \fi
- }%
- \fi
- \@nameuse{ifXTR@#1}\else
- \XKV@ifundefined{XTR@#2-nrs}{}{%
- \expandafter\XTR@ch@ckxtr\csname XTR@#2-nrs\expandafter
- \endcsname\csname XTR@#2-nrs@cnt\endcsname
- }%
- \fi
- \global\let\XTR@currentlabel\relax
-}
-\def\XTR@ch@ckxtr#1#2{%
- \XKV@for@o#1\XTR@resa{\expandafter\XTR@ch@ck@tr\XTR@resa--\@nil#2}%
-}
-\def\XTR@ch@ck@tr#1-#2-#3\@nil#4{%
- \ifx\@empty#1\@empty
- \ifnum#4>#2 \else\XTR@maketrue\fi
- \else
- \ifx\@empty#2\@empty
- \ifx\@empty#3\@empty
- \ifnum#4=#1 \XTR@maketrue\fi
- \else
- \ifnum#4<#1 \else\XTR@maketrue\fi
- \fi
- \else
- \ifnum#4<#1 \else\ifnum#4>#2 \else\XTR@maketrue\fi\fi
- \fi
- \fi
-}
-\def\extractionlabel{\KV@@sp@def\XTR@currentlabel}
-\let\XTR@currentlabel\relax
-\def\extract{\XTR@stfalse\XTR@extract}
-\@namedef{extract*}{\XTR@sttrue\XTR@extract}
-\def\XTR@extract{%
- \@bsphack
- \let\do\@makeother\dospecials\catcode`\^^M\active
- \@testopt\XTR@@xtract\@nil
-}
-\def\XTR@@xtract[#1]{%
- \ifXTR@active
- \def\XTR@tempa{#1}%
- \ifx\XTR@tempa\@nnil\else
- \KV@@sp@def\XTR@currentlabel{#1}%
- \fi
- \XTR@checkxtr{extract}{extract}%
- \else
- \XTR@extractfalse
- \fi
- \ifXTR@st\XTR@opentmp\fi
- \let\verbatim@processline\XTR@processline@begin
- \verbatim@start
-}
-\begingroup
- \lccode`\!=`\\ \lccode`\(=`\{ \lccode`\)=`\}
-\lowercase{\endgroup
-\def\XTR@processline@begin{%
- \@temptokena{}%
- \edef\XTR@orig@line{\the\verbatim@line}%
- \verbatim@line{}%
- \expandafter\XTR@testbegin\XTR@orig@line!begin(extractskip)\@nil
-}
-\def\XTR@testbegin#1!begin(extractskip)#2\@nil{%
- \@temptokena\expandafter{\the\@temptokena#1}%
- \verbatim@line\expandafter{\the\verbatim@line#1}%
- \def\XTR@tempa{#2}%
- \ifx\XTR@tempa\@empty\XTR@processline@write\else\XKV@afterfi
- \XTR@skiplabel#2[]\@nil
- \XTR@checkxtr{skip}{extractskip}%
- \let\verbatim@processline\XTR@processline@end
- \ifx\XTR@tempa\@nnil\XKV@afterelsefi
- \XTR@t@stbegin#2\@nil
- \else\XKV@afterfi
- \expandafter\XTR@t@stbegin\XTR@tempa\@nil
- \fi
- \fi
-}
-\def\XTR@skiplabel#1[#2]#3\@nil{%
- \def\XTR@tempa{#1}%
- \def\XTR@tempb{#2}%
- \ifx\XTR@tempa\@empty
- \ifx\XTR@tempb\@empty
- \let\XTR@tempa\@nnil
- \else
- \KV@@sp@def\XTR@currentlabel{#2}%
- \XTR@sk@plabel#3\@nil
- \fi
- \else
- \let\XTR@tempa\@nnil
- \fi
-}
-\def\XTR@sk@plabel#1[]\@nil{\def\XTR@tempa{#1}}
-\def\XTR@t@stbegin#1!begin(extractskip)\@nil{%
- \XTR@testend#1!end(extractskip)\@nil
-}
-\def\XTR@processline@end{%
- \@temptokena{}%
- \edef\XTR@orig@line{\the\verbatim@line}%
- \verbatim@line{}%
- \expandafter\XTR@testend\XTR@orig@line!end(extractskip)\@nil
-}
-\def\XTR@testend#1!end(extractskip)#2\@nil{%
- \@temptokena\expandafter{\the\@temptokena#1}%
- \ifXTR@skip\else\verbatim@line\expandafter{\the\verbatim@line#1}\fi
- \def\XTR@tempa{#2}%
- \ifx\XTR@tempa\@empty\XTR@processline@write\else\XKV@afterfi
- \let\verbatim@processline\XTR@processline@begin
- \XTR@t@stend#2\@nil
- \fi
-}
-\def\XTR@t@stend#1!end(extractskip)\@nil{%
- \XTR@testbegin#1!begin(extractskip)\@nil
-}}
-\def\XTR@processline@write{%
- \ifXTR@st\ifcat$\the\@temptokena$\else
- \XTR@writetmp{\the\@temptokena}%
- \fi\fi
- \ifXTR@extract\ifcat$\the\verbatim@line$\else
- \XTR@writeout{\the\verbatim@line}%
- \fi\fi
- \ifx\XTR@orig@line\@empty\XTR@writetmp{}\XTR@writeout{}\fi
-}
-\def\endextract{\XTR@stfalse\XTR@endextract}
-\@namedef{endextract*}{\XTR@sttrue\XTR@endextract}
-\def\XTR@endextract{%
- \@esphack
- \ifXTR@st
- \XTR@closetmp
- \AfterEndEnv{\input{\jobname.xtr}}%
- \fi
-}
-\@namedef{extractskip}{\XTR@activefalse\@nameuse{extract*}}
-\XTR@namelet{endextractskip}{endextract*}
-\def\extractline{%
- \XKV@ifstar{\XTR@sttrue\XTR@extractline}%
- {\XTR@stfalse\XTR@extractline}%
-}
-\def\XTR@extractline{%
- \begingroup
- \let\do\@makeother\dospecials\catcode`\^^M\active
- \@testopt\XTR@@xtractline\@nil
-}
-\begingroup
- \catcode`\~=\active\lccode`\~=`\^^M
-\lowercase{\endgroup
- \def\XTR@@xtractline[#1]#2~{%
- \ifXTR@active
- \def\XTR@tempa{#1}%
- \ifx\XTR@tempa\@nnil\else
- \KV@@sp@def\XTR@currentlabel{#1}%
- \fi
- \XTR@checkxtr{extract}{line}%
- \else
- \XTR@extractfalse
- \fi
- \ifXTR@extract\XTR@writeout{#2}\fi
- \ifXTR@st\XTR@opentmp\XTR@writetmp{#2}\XTR@closetmp\fi
- \endgroup
- \ifXTR@st
- \input{\jobname.xtr}%
- \fi
- }%
-}
-\ifXTR@active
-\immediate\openout\XTR@out\XTR@file\relax
-\ifXTR@header
- \@tempcnta\time
- \divide\@tempcnta 60
- \edef\XTR@tempb{%
- \the\year/\ifnum\the\month<10 0\fi\the\month/%
- \ifnum\the\day<10 0\fi\the\day,\the\@tempcnta:%
- }
- \multiply\@tempcnta 60
- \@tempcntb\time
- \advance\@tempcntb-\@tempcnta
- \ifnum\@tempcntb<10
- \xdef\XTR@tempb{\XTR@tempb0\the\@tempcntb}
- \else
- \xdef\XTR@tempb{\XTR@tempb\the\@tempcntb}
- \fi
- \begingroup
- \catcode`\%=12
- \gdef\XTR@tempa{%%\space}
- \endgroup
- \XTR@writeout{\XTR@tempa}
- \filename@parse\XTR@file
- \ifx\filename@ext\relax\def\filename@ext{tex}\fi
- \XTR@writeout{%
- \XTR@tempa This is file, `\filename@base.\filename@ext',%
- }
- \XTR@writeout{%
- \XTR@tempa generated with the extract package.^^J\XTR@tempa
- }
- \XTR@writeout{\XTR@tempa Generated on : \space\XTR@tempb}
- \filename@parse\jobname
- \ifx\filename@ext\relax\def\filename@ext{tex}\fi
- \XTR@writeout{%
- \XTR@tempa From source \space: \space\filename@base.\filename@ext
- }
- \XTR@writeout{%
- \XTR@tempa Using options: \space\csname opt@extract.sty\endcsname
- }
- \XTR@writeout{\XTR@tempa}
-\fi
-\ifXTR@copydocumentclass
- \def\XTR@tempa#1.cls\@nil{\def\XTR@tempa{#1}}
- \expandafter\XTR@tempa\XKV@documentclass\@nil
- \ifx\XKV@classoptionslist\@empty
- \XTR@writeout{\string\documentclass{\XTR@tempa}}
- \else
- \@temptokena\expandafter{\XKV@classoptionslist}%
- \XTR@writeout{\string\documentclass[\the\@temptokena]{\XTR@tempa}}
- \fi
-\fi
-\AtBeginDocument{%
- \ifXTR@handles
- \XTR@writeout{}%
- \XTR@writeout{\string\begin{document}}%
- \fi
- \XKV@ifundefined{XTR@envs}{}{%
- \XKV@for@o\XTR@envs\XTR@tempa{%
- \XKV@ifundefined\XTR@tempa{%
- \XTR@err{%
- environment `\XTR@tempa' not defined; extraction canceled%
- }%
- }{%
- \XTR@namelet{XTR\XTR@tempa}{\XTR@tempa}%
- \@namedef{\XTR@tempa\expandafter}\expandafter{\expandafter
- \def\expandafter\XTR@tempa\expandafter{\XTR@tempa}%
- \XTR@checkxtr{extract}\XTR@tempa
- \ifXTR@extract
- \XTR@writeout{}\XTR@opentmp
- \@bsphack
- \let\do\@makeother\dospecials\catcode`\^^M\active
- \def\verbatim@processline{%
- \let\verbatim@processline\XTR@processline@begin
- \XTR@writeout{%
- \string\begin{\XTR@tempa}\the\verbatim@line
- }%
- \XTR@writetmp{%
- \string\begin{XTR\XTR@tempa}\the\verbatim@line
- }%
- }%
- \XTR@sttrue\let\XTR@tempb\verbatim@
- \else
- \edef\XTR@tempb{\noexpand\begin{XTR\XTR@tempa}}%
- \fi
- \XTR@tempb
- }%
- \XTR@namelet{endXTR\XTR@tempa}{end\XTR@tempa}%
- \@namedef{end\XTR@tempa\expandafter}\expandafter{\expandafter
- \def\expandafter\XTR@tempa\expandafter{\XTR@tempa}%
- \ifXTR@extract
- \@esphack
- \XTR@writeout{\string\end{\XTR@tempa}}%
- \XTR@writetmp{\string\end{XTR\XTR@tempa}}%
- \XTR@closetmp
- \AfterEndEnv{\input{\jobname.xtr}}%
- \else
- \edef\XTR@tempa{\noexpand\end{XTR\XTR@tempa}}%
- \expandafter\XTR@tempa
- \fi
- }%
- }%
- }%
- }%
- \XKV@ifundefined{XTR@cmdsargs}{}{%
- \let\XTR@sect\@sect
- \let\XTR@chapter\@chapter
- \def\XTR@tempb{chapter}%
- \XKV@for@o\XTR@cmdsargs\XTR@tempa{%
- \XKV@ifundefined\XTR@tempa{%
- \XTR@err{command `\@backslashchar\XTR@tempa' not defined;
- extraction canceled%
- }%
- }{%
- \@expandtwoargs\in@{,\XTR@tempa,}%
- {,chapter,section,subsection,subsubsection,}%
- \ifin@
- \ifx\XTR@tempa\XTR@tempb
- \def\@chapter[#1]#2{%
- \XTR@checkxtr{extract}{chapter}%
- \ifXTR@extract
- \XTR@writeout{}%
- \def\XTR@tempa{#1}%
- \def\XTR@tempb{#2}%
- \ifx\XTR@tempa\XTR@tempb
- \@temptokena{{#2}}%
- \else
- \@temptokena{[#1]{#2}}%
- \fi
- \XTR@writeout{\string\chapter\the\@temptokena}%
- \fi
- \XTR@chapter[#1]{#2}%
- }%
- \else
- \def\@sect#1#2#3#4#5#6[#7]#8{%
- \@expandtwoargs\in@{,#1,}{,\XTR@cmdsargs,}%
- \ifin@
- \XTR@checkxtr{extract}{#1}%
- \ifXTR@extract
- \XTR@writeout{}%
- \def\XTR@tempa{#7}%
- \def\XTR@tempb{#8}%
- \ifx\XTR@tempa\XTR@tempb
- \@temptokena{{#8}}%
- \else
- \@temptokena{[#7]{#8}}%
- \fi
- \XTR@writeout{\expandafter
- \string\csname#1\endcsname\the\@temptokena}%
- \fi
- \fi
- \XTR@sect{#1}{#2}{#3}{#4}{#5}{#6}[#7]{#8}%
- }%
- \fi
- \else
- \XTR@err{unsupported command `\XTR@tempa';
- try the `extract-cmdline option}%
- \fi
- }%
- }%
- }%
- \XKV@ifundefined{XTR@cmdsline}{}{%
- \XKV@for@o\XTR@cmdsline\XTR@tempa{%
- \XKV@ifundefined\XTR@tempa{%
- \XTR@err{command `\@backslashchar\XTR@tempa' not defined;
- extraction canceled}%
- }{%
- \@expandtwoargs\in@{,\XTR@tempa,}%
- {,chapter,section,subsection,subsubsection,}%
- \ifin@
- \XTR@err{%
- use the `extract-cmd' option for command `\XTR@tempa'%
- }%
- \else
- \XTR@namelet{XTR\XTR@tempa}{\XTR@tempa}%
- \@namedef{\XTR@tempa\expandafter}\expandafter{\expandafter
- \def\expandafter\XTR@tempa\expandafter{\XTR@tempa}%
- \XTR@checkxtr{extract}\XTR@tempa
- \begingroup
- \let\do\@makeother\dospecials\catcode`\^^M\active
- \XTR@extractcmdline
- }%
- \fi
- }%
- }%
- \begingroup
- \catcode`\~=\active\lccode`\~=`\^^M
- \lowercase{\endgroup
- \def\XTR@extractcmdline#1~{\verbatim@line{#1}\XTR@@xtractcmdline}%
- }%
- \def\XTR@@xtractcmdline{%
- \XTR@writeout{}%
- \XTR@writeout{\expandafter\string\csname\XTR@tempa
- \endcsname\the\verbatim@line
- }%
- \XTR@opentmp
- \XTR@writetmp{\expandafter\string\csname XTR\XTR@tempa
- \endcsname\the\verbatim@line
- }%
- \XTR@closetmp
- \endgroup
- \input{\jobname.xtr}%
- }%
- }%
-}
-\AtEndDocument{%
- \ifXTR@handles
- \XTR@writeout{}%
- \XTR@writeout{\string\end{document}}%
- \fi
- \immediate\closeout\XTR@out
-}
-\fi
-\endinput
-%%
-%% End of file `extract.sty'.