texlive[53096] Master/texmf-dist: askinclude (11dec19)
commits+karl at tug.org
commits+karl at tug.org
Wed Dec 11 22:54:02 CET 2019
Revision: 53096
http://tug.org/svn/texlive?view=revision&revision=53096
Author: karl
Date: 2019-12-11 22:54:02 +0100 (Wed, 11 Dec 2019)
Log Message:
-----------
askinclude (11dec19)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/askinclude/askinclude.pdf
trunk/Master/texmf-dist/tex/latex/askinclude/askinclude.sty
Added Paths:
-----------
trunk/Master/texmf-dist/source/latex/askinclude/
trunk/Master/texmf-dist/source/latex/askinclude/askinclude.dtx
Removed Paths:
-------------
trunk/Master/texmf-dist/tex/latex/askinclude/askinclude.dtx
Modified: trunk/Master/texmf-dist/doc/latex/askinclude/askinclude.pdf
===================================================================
(Binary files differ)
Added: trunk/Master/texmf-dist/source/latex/askinclude/askinclude.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/askinclude/askinclude.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/askinclude/askinclude.dtx 2019-12-11 21:54:02 UTC (rev 53096)
@@ -0,0 +1,1901 @@
+% \iffalse meta-comment
+%
+% File: askinclude.dtx
+% Version: 2019-12-10 v2.6
+% Info: Interactive asking of included files
+%
+% Copyright (C)
+% 1991-1994 Pablo A. Straub
+% 2007, 2008, 2011 Heiko Oberdiek
+% 2016-2019 Oberdiek Package Support Group
+% https://github.com/ho-tex/askinclude/issues
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any later
+% version. This version of this license is in
+% https://www.latex-project.org/lppl/lppl-1-3c.txt
+% and the latest version of this license is in
+% https://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainers of this work are
+% Heiko Oberdiek and the Oberdiek Package Support Group
+% https://github.com/ho-tex/askinclude/issues
+%
+% This work consists of the main source file askinclude.dtx
+% and the derived files
+% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv,
+%
+% Distribution:
+% CTAN:macros/latex/contrib/askinclude/askinclude.dtx
+% CTAN:macros/latex/contrib/askinclude/askinclude.pdf
+%
+% Unpacking:
+% (a) If askinclude.ins is present:
+% tex askinclude.ins
+% (b) Without askinclude.ins:
+% tex askinclude.dtx
+% (c) If you insist on using LaTeX
+% latex \let\install=y\input{askinclude.dtx}
+% (quote the arguments according to the demands of your shell)
+%
+% Documentation:
+% (a) If askinclude.drv is present:
+% latex askinclude.drv
+% (b) Without askinclude.drv:
+% latex askinclude.dtx; ...
+% The class ltxdoc loads the configuration file ltxdoc.cfg
+% if available. Here you can specify further options, e.g.
+% use A4 as paper format:
+% \PassOptionsToClass{a4paper}{article}
+%
+% Programm calls to get the documentation (example):
+% pdflatex askinclude.dtx
+% bibtex askinclude.aux
+% makeindex -s gind.ist askinclude.idx
+% pdflatex askinclude.dtx
+% makeindex -s gind.ist askinclude.idx
+% pdflatex askinclude.dtx
+%
+% Installation:
+% TDS:tex/latex/askinclude/askinclude.sty
+% TDS:doc/latex/askinclude/askinclude.pdf
+% TDS:source/latex/askinclude/askinclude.dtx
+%
+%<*ignore>
+\begingroup
+ \catcode123=1 %
+ \catcode125=2 %
+ \def\x{LaTeX2e}%
+\expandafter\endgroup
+\ifcase 0\ifx\install y1\fi\expandafter
+ \ifx\csname processbatchFile\endcsname\relax\else1\fi
+ \ifx\fmtname\x\else 1\fi\relax
+\else\csname fi\endcsname
+%</ignore>
+%<*install>
+\input docstrip.tex
+\Msg{************************************************************************}
+\Msg{* Installation}
+\Msg{* Package: askinclude 2019-12-10 v2.6 Interactive asking of included files}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+\preamble
+
+This is a generated file.
+
+Project: askinclude
+Version: 2019-12-10 v2.6
+
+Copyright (C)
+ 1991-1994 Pablo A. Straub
+ 2007, 2008, 2011 Heiko Oberdiek
+ 2016-2019 Oberdiek Package Support Group
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3c of this license or (at your option) any later
+version. This version of this license is in
+ https://www.latex-project.org/lppl/lppl-1-3c.txt
+and the latest version of this license is in
+ https://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+
+This work has the LPPL maintenance status "maintained".
+
+The Current Maintainers of this work are
+Heiko Oberdiek and the Oberdiek Package Support Group
+https://github.com/ho-tex/askinclude/issues
+
+
+This work consists of the main source file askinclude.dtx
+and the derived files
+ askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv,
+
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\generate{%
+ \file{askinclude.ins}{\from{askinclude.dtx}{install}}%
+ \file{askinclude.drv}{\from{askinclude.dtx}{driver}}%
+ \nopreamble
+ \nopostamble
+ \file{askinclude.bib}{\from{askinclude.dtx}{bib}}%
+ \usepreamble\defaultpreamble
+ \usepostamble\defaultpostamble
+ \usedir{tex/latex/askinclude}%
+ \file{askinclude.sty}{\from{askinclude.dtx}{package}}%
+}
+
+\catcode32=13\relax% active space
+\let =\space%
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* askinclude.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file `askinclude.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*bib>
+ at online{texlive,
+ author={Fairbairns, Robin},
+ title={[tex-live] licence on includeonly.sty},
+ date={2007-10-13},
+ url={https://www.tug.org/pipermail/tex-live/2007-October/014928.html},
+ urldate={2011-12-02},
+}
+ at online{newsthread,
+ author={Vo{\ss}, Herbert},
+ title={askinclude.sty},
+ note={Thread in newsgroup {\xnewsgroup{comp.text.tex}};
+ Message-ID: {\texttt{fev72m\$b35\$02\$2 at news.t-online.com}}},
+ date={2007-10-15},
+ url={https://groups.google.com/group/comp.text.tex/browse_thread/thread/728a3e73c04c6789/349e31865c40d00c},
+ urldate={2011-12-02},
+}
+ at manual{makematch,
+ author={Kastrup, David},
+ title={makematch.sty: Pattern matching with wildcards},
+ date={2007-02-23},
+ version={1.7925},
+ url={https://ctan.org/pkg/qstest},
+ urldate={2011-12-02},
+}
+ at manual{excludeonly,
+ author={Luecking, Daniel H. and Arseneau, Donald},
+ title={The excludeonly package},
+ date={2003-03-14},
+ url={https://ctan.org/pkg/excludeonly},
+ urldate={2011-12-02},
+}
+%</bib>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{askinclude.drv}%
+ [2019-12-10 v2.6 Interactive asking of included files]%
+\documentclass{ltxdoc}
+\usepackage{holtxdoc}[2011/11/22]
+\usepackage{iftex}
+\ifluatex
+\else
+ \usepackage[T1]{fontenc}%
+ \usepackage{lmodern}%
+\fi
+\usepackage{csquotes}
+\usepackage[
+ backend=bibtex,
+ bibencoding=ascii,
+ alldates=iso,seconds=true,
+]{biblatex}[2011/11/13]
+\bibliography{oberdiek-source}
+\bibliography{askinclude}
+\begin{document}
+ \DocInput{askinclude.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+%
+%
+% \GetFileInfo{askinclude.drv}
+%
+% \title{The \xpackage{askinclude} package}
+% \date{2019-12-10 v2.6}
+% \author{
+% Pablo A. Straub\\[1ex]
+% Heiko Oberdiek\thanks
+% {Please report any issues at \url{https://github.com/ho-tex/askinclude/issues}}}
+%
+%
+% \maketitle
+%
+% \begin{abstract}
+% This package replaces \cs{includeonly} by an interactive user
+% interface.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Documentation}
+%
+% \subsection{User interface}
+%
+% The \cs{include} feature of \LaTeX\ allows the division of
+% the text body in separate compilation units. It is page
+% based and stores counter settings in additional auxiliary
+% files. \cs{includeonly} limits the actually included files
+% to the ones, listed in its argument.
+%
+% Example:
+%\begin{quote}
+%\begin{verbatim}
+%\documentclass{report}
+%
+%\usepackage{askinclude}
+%
+% % Don't use \include in the preamble.
+% % Instead \input can be used or make a package
+%
+%\begin{document}
+%\include{title}
+%\include{introduction}
+%\include{summary}
+%\include{index}
+%\end{document}
+%\end{verbatim}
+%\end{quote}
+%
+% Package \xpackage{askinclude} adds an interactive user interface.
+% The user is asked which files he want to include and sets
+% \cs{includeonly} accordingly.
+%
+% The first time the package is used the question looks like:
+%\begin{quote}
+%\begin{verbatim}
+%***********************************
+%*** Package askinclude Question ***
+%***********************************
+%
+%Previous answer (noregexp):
+% [*]
+%
+%Regular expressions:
+% --> [noregexp] disabled
+% [makematch] enabled, using package `makematch'
+% [pdfmatch] enabled, using pdfTeX's \pdfmatch
+%
+%Which files do you want to include?
+% [foo,bar] comma separated file or pattern list
+% [*] all files
+% [-] no files
+% [?] ask for each file
+% [] use the previous answer
+%
+%\answer=chapter2,summary
+%\end{verbatim}
+%\end{quote}
+% Square brackets are used as quotation symbols,
+% they are not part of the answer.
+% The answer by the user follows in the last line after |\answer=|.
+% \begin{description}
+% \def\Item[#1]{\item[{[\texttt{#1}]:}]}
+% \Item[foo,bar]
+% A comma separated file list (also one file only) is passed
+% to macro \cs{includeonly} directly. If regular expression support
+% is enabled, the entries in the list are interpreted as
+% file name patterns that will be matched against the file names
+% in \cs{include}, see \hyperref[sec:regexp]{section \ref*{sec:regexp}}.
+% \Item[*] This is a shortcut for specifying \emph{all} files.
+% \Item[-] This means \emph{none} of the files is included.
+% \Item[?] The switches in single asking mode.
+% The user will be asked at each \cs{include}.
+% See section \hyperref[sec:single]{section \ref*{sec:single}}.
+% \Item[] Just pressing return (empty string) uses the default
+% answer, that was stored in the auxiliary file (\xfile{.aux})
+% of the previous \LaTeX run with package \xpackage{askinclude}.
+% Without previous runs the default is [|*|] for all files.
+% \Item[noregexp] Turns regular expression support off.
+% \Item[makematch] Enables regular expression support
+% package \xpackage{makematch} provides.
+% \Item[pdfmatch] It is shown, if \pdfTeX~1.30 or later is used.
+% It relies on an undocumented feature \cs{pdfmatch} that may
+% change in future versions of \pdfTeX.
+% \end{description}
+% Package \xpackage{askinclude} remembers the files of \cs{include}
+% in the auxiliary file and the given answer. they are
+% presented at the next run
+% at the start of the question:
+%\begin{quote}
+%\begin{verbatim}
+%***********************************
+%*** Package askinclude Question ***
+%***********************************
+%
+%Files, found by previous run in \include:
+% (-) title
+% (-) introduction
+% (-) chapter1
+% (+) chapter2
+% (-) chapter3
+% (+) summary
+%
+%Previous answer (noregexp):
+% [chapter2,summary]
+%...
+%\end{verbatim}
+%\end{quote}
+% |(+)| and |(-)| marks files that were and were not included in
+% the previous run. The file list and marks are not always correct.
+% For example, if \cs{include} statements are added or removed.
+% If the method of regular expression support is different,
+% then the marks only reflects the mode of the previous answer.
+%
+% \subsection{Single asking mode}
+% \label{sec:single}
+%
+% The special answer `|?|' trigger single asking mode,
+% at the next \cs{include} the user is asked again:
+%\begin{quote}
+%\begin{verbatim}
+%***********************************
+%*** Package askinclude Question ***
+%***********************************
+%
+%Include `title'? [y]es, [n]o, [A]ll, [N]one, [D]efault (n):
+%
+%\answer=
+%\end{verbatim}
+%\end{quote}
+% Use the letter inside the square brackets as answer.
+% An empty string uses the default answer, the letter in parentheses.
+% The answers are:
+% \begin{description}
+% \def\Item[#1]{\item[{[\texttt{#1}]:}]}
+% \Item[y] The file is included.
+% \Item[n] The file is excluded.
+% \Item[A] This file and all following files are included.
+% \Item[N] This file and all following files are excluded.
+% \Item[D] Use the default answer for this and all following files.
+% \end{description}
+% If the file is known from the previous run, then the
+% default is `|y|' or `|n|' corresponding to the mark
+% `|(+)|' or `|(-)|' in the list of previous files.
+% Otherwise `|y|' is used as default.
+%
+% \subsection{Regular expressions}
+% \label{sec:regexp}
+%
+% Three methods are available that can also set by package options:
+% \begin{description}
+% \def\Item[#1]{\item[\xoption{#1}:]}
+% \Item[noregexp] Regular expression support is disabled.
+% \Item[makematch] Use package \xpackage{makematch}.
+% \Item[pdfmatch] Use \pdfTeX's \cs{pdfmatch} if available.
+% \end{description}
+% Without options the value remembered in the auxiliary file
+% is used, otherwise the default is \xoption{noregexp}.
+%
+% \subsubsection{Method \xoption{makematch}}
+%
+% Package \xpackage{makematch} (part of \xpackage{qstest}), written
+% by David Kastrup provides pattern matching based on wildcards:
+% \begin{description}
+% \item[{[\texttt{*}]}:] The star matches zero or more characters.
+% Thus a lonely star machtes anything.
+% \item[{[\texttt{!}]}:] The exclamation mark at the begin of a
+% pattern negates it, thus the matching files are excluded.
+% \end{description}
+% The pattern list is evaluated for a file name from left to
+% right. Always a file name must match the whole pattern.
+% The file is included if it is matched by a pattern and
+% not excluded afterwards. Examples:
+% \begin{quote}
+% \def\no{\textrm{$\emptyset$}}
+% \begin{tabular}{>{\ttfamily}l|>{\ttfamily}l|>{\ttfamily}l}
+% \textrm{Pattern list} & \textrm{File names} & \textrm{Result}\\
+% \hline
+% foobar & foobar,dummy & foobar\\
+% foo* & foobar,xfoobar & foobar\\
+% \relax *foo* & xfoobar & xfoobar\\
+% f*b*r & foobar & foobar\\
+% \relax * & any & any\\
+% !foobar & foobar,other & other\\
+% !foo* & xfoobar & xfoobar\\
+% in*,!*dex & intro,index & intro\\
+% !index,in* & intro,index & intro,index\\
+% \relax *,!chap2 & chap1,chap2,chap3 & chap1,chap3\\
+% \end{tabular}
+% \end{quote}
+% The example in the last line shows, how the behaviour of package
+% \xpackage{excludeonly} \cite{excludeonly} can be simulated.
+%
+% The documentation of package \xpackage{makematch} tells the
+% the empty pattern does not match anything. But if you answer
+% the question with an empty string the answer of the previous
+% run is used. Also curly braces are not reliable because the
+% can get stripped during the processing of the answer.
+% Using a pair of empty curly braces or the comma for two empty
+% patterns currently works, but this is specific for the current
+% implementation and may change in future. But the special
+% answer `-' is available.
+%
+% \subsubsection{Method \xoption{pdfmatch}}
+%
+% In \pdfTeX\ 1.30 the new primitive \cs{pdfmatch} was introduced.
+% It is not documented yet, because it was not decided if it remains
+% and which implementation of regular expressions should be used.
+% Thus the situation may change in later versions of \pdfTeX.
+% Currently (1.30 until 1.40) it uses a library for POSIX 1003.2 regular
+% expressions, see manual page ``regex(7)''.
+%
+% If a pattern in the pattern list is invalid, the package prints
+% a warning and removes the pattern from the list. Actually there
+% are two warnings, the other warning is generated by \pdfTeX\ itself.
+%
+% In opposite to \xoption{makematch} the pattern only needs to
+% match the specified part of the file name.
+% For matching the whole name, the symbols `|^|' and `|$|' for
+% begin and end of string must be included.
+%
+% Additionally an initial exclamation mark `|!|' implements the
+% same logic as method \xoption{makematch}. The match result is
+% inverted, the matched file excluded.
+%
+% Examples:
+% \begin{quote}
+% \def\no{\textrm{$\emptyset$}}
+% \begin{tabular}{>{\ttfamily}l|>{\ttfamily}l|>{\ttfamily}l}
+% \textrm{Pattern list} & \textrm{File names} & \textrm{Result}\\
+% \hline
+% foobar & foobar,dummy & foobar\\
+% foo.* & foobar,xfoobar & foobar,xfoobar\\
+% |^|foo.* & foobar,xfoobar & foobar\\
+% foo|$| & foo,foobar & foo\\
+% fo?bar & fbar,fobar,foobar & fbar,fobar\\
+% fo+bar & fbar,fobar,foobar & fobar,foobar\\
+% fo*bar & fbar,fobar,foobar & fbar,fobar,foobar\\
+% chap3 & chap3,chap32 & chap1,chap3,chap32\\
+% chap[13] & chap1,chap2,chap3 & chap1,chap3\\
+% chap(1\string|3)|$| & chap1,chap3,chap33 & chap1,chap3\\
+% .* & any & any\\
+% !foobar & foobar,other & other\\
+% in.*,!dex & intro,index & intro\\
+% !index,in.* & intro,index & intro,index\\
+% .*,!chap2 & chap1,chap2,chap3 & chap1,chap3\\
+% .*,!bla & foo,bla,blabla & foo\\
+% .*,!|^|bla|$| & foo,bla,blabla & foo,blabla\\
+% \end{tabular}
+% \end{quote}
+% The example in the last line shows, how the behaviour of package
+% \xpackage{excludeonly} \cite{excludeonly} can be simulated.
+% As the third last line shows, that sometimes `|^|' and `|$|' can
+% be omitted, but this will not work always, shown in the second
+% last line.
+%
+% \subsection{History}
+%
+% Package \xpackage{askinclude} was invented by Pablo A. Straub in 1991
+% and maintained until 1994.
+% ^^A Email address: pablo.straub \symbol{64} gmail.com
+%
+% In October 2007 it was removed from ``TeX Live'' because of
+% the no-commercial license \cite{texlive}. Herbert Vo\ss\ initiated
+% a search for the author in the newsgroup \xnewsgroup{comp.text.tex}
+% \cite{newsthread} to ask him to change the license.
+%
+% It seems that the author could not be reached any more.
+% Joseph Wright suggested a reimplementation that I (HO) have done
+% as package \xpackage{askinc}. Soon it was enhanced by
+% feature requests.
+%
+% Then Ulrike Fischer found email addresses of the original author
+% and Jim Hefferon succeeded in contacting him. He allowed a change
+% of the license to LPPL and the transfer of the maintainership
+% to someone else.
+%
+% Thus I merged both packages as \xpackage{askinclude} in a new
+% major version 2. The license is LPPL.
+%
+% \subsection{New features of version 2}
+%
+% \begin{itemize}
+% \item License is now LPPL.
+% \item A list of \cs{include} files that are detected by the previous
+% run is printed before the question.
+% \item If the special answer `|?|' is given, then the user is
+% asked at each \cs{include}.
+% \item Support for regular expressions.
+% \item The remaining stuff in the \xfile{.aux} file does not
+% cause errors, if the package is removed.
+% \item The use of \cs{includeonly} before the package loading time
+% is detected and respected by taking precedence. After the package
+% is loaded, \cs{includeonly} is disabled and prints a warning.
+% \end{itemize}
+%
+% \subsection{Compatibility to version 1}
+%
+% \begin{itemize}
+% \item The user interface of version 1 with its special answers
+% `|*|', `|-|', and `' remain unchanged, but it is extended by
+% version 2 with the special answer `|?|' and support for
+% regular expressions can be enabled.
+% \item As reimplementation the internal macros have changed of course.
+% \item \xfile{.aux} files that are written by version 1.x will work
+% with version 2.x because \cs{@includeonly} is recognized.
+% \item \LaTeX\ 2.09: The package works as \cs{documentstyle} option
+% in compatibility mode of \LaTeXe. It is possible that it
+% will not work in pure \LaTeX\ 2.09.
+% \end{itemize}
+%
+% \StopEventually{
+% }
+%
+% \section{Implementation}
+%
+% \subsection{Header and catcodes}
+%
+% \begin{macrocode}
+%<*package>
+\NeedsTeXFormat{LaTeX2e}
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode123=1 % {
+ \catcode125=2 % }
+ \catcode64=11 % @
+ \def\x{\endgroup
+ \expandafter\edef\csname AskInc at AtEnd\endcsname{%
+ \endlinechar=\the\endlinechar\relax
+ \catcode13=\the\catcode13\relax
+ \catcode32=\the\catcode32\relax
+ \catcode35=\the\catcode35\relax
+ \catcode61=\the\catcode61\relax
+ \catcode64=\the\catcode64\relax
+ \catcode123=\the\catcode123\relax
+ \catcode125=\the\catcode125\relax
+ }%
+ }%
+\x\catcode61\catcode48\catcode32=10\relax%
+\catcode13=5 % ^^M
+\endlinechar=13 %
+\catcode35=6 % #
+\catcode64=11 % @
+\catcode123=1 % {
+\catcode125=2 % }
+\def\TMP at EnsureCode#1#2{%
+ \edef\AskInc at AtEnd{%
+ \AskInc at AtEnd
+ \catcode#1=\the\catcode#1\relax
+ }%
+ \catcode#1=#2\relax
+}
+\TMP at EnsureCode{33}{12}% !
+\TMP at EnsureCode{39}{12}% '
+\TMP at EnsureCode{40}{12}% (
+\TMP at EnsureCode{41}{12}% )
+\TMP at EnsureCode{42}{12}% *
+\TMP at EnsureCode{43}{12}% +
+\TMP at EnsureCode{44}{12}% ,
+\TMP at EnsureCode{45}{12}% -
+\TMP at EnsureCode{46}{12}% .
+\TMP at EnsureCode{47}{12}% /
+\TMP at EnsureCode{58}{12}% :
+\TMP at EnsureCode{62}{12}% >
+\TMP at EnsureCode{63}{12}% ?
+\TMP at EnsureCode{91}{12}% [
+\TMP at EnsureCode{93}{12}% ]
+\TMP at EnsureCode{96}{12}% `
+\edef\AskInc at AtEnd{\AskInc at AtEnd\noexpand\endinput}
+\ProvidesPackage{askinclude}%
+ [2019-12-10 v2.6 Interactive asking of included files]%
+% \end{macrocode}
+%
+% Luatex compat
+% \begin{macrocode}
+\ifx\pdfextension\@undefined\else
+ \protected\def\pdflastobj {\numexpr\pdffeedback lastobj\relax}
+ \protected\def\pdfnames {\pdfextension names }
+ \protected\def\pdfobj {\pdfextension obj }
+ \let\pdfoutput \outputmode
+\fi
+% \end{macrocode}
+%
+% \subsection{Delay action after preamble}
+%
+% \begin{macro}{\AskInc at AtBeginDocument}
+% Some actions such as \xfile{.aux} file writing cannot be
+% performed in the preamble. \cs{AtBeginDocument} delays
+% such action until |\begin{document}|. However \cs{AtBeginDocument}
+% must not be used after that time (\cs{@onlypreamble}).
+% Thus \cs{AskInc at AtBeginDocument} uses \cs{AtBeginDocument}
+% in the preamble and afterwards executes the code immediately.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \let\AskInc at AtBeginDocument\@firstofone
+}
+\providecommand*{\AskInc at AtBeginDocument}{\AtBeginDocument}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Write entry in \xfile{.aux} file}
+%
+% \begin{macro}{\AskInc at WriteAux}
+% The first argument is written to the main \xfile{.aux} file
+% and the second argument is executed if writing was possible.
+% Remember \cs{nofiles} prevents writing to auxiliary files.
+% \begin{macrocode}
+\def\AskInc at WriteAux#1#2{%
+ \AskInc at AtBeginDocument{%
+ \if at filesw
+ \immediate\write\@mainaux{#1}%
+ #2%
+ \fi
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Remember \cs{include} files}
+%
+% \begin{macro}{\AskInc at CharHash}
+% \begin{macrocode}
+\edef\AskInc at CharHash{\string#}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AskInc at WriteDefAddList}
+% \begin{macrocode}
+\def\AskInc at WriteDefAddList{%
+ \AskInc at WriteAux{%
+% \end{macrocode}
+% \begin{macro}{\AskInc at AddList}
+% \begin{macrocode}
+ \string\providecommand*\string\AskInc at AddList[2]{%
+ \string\ifcase\string\ifx\AskInc at CharHash1\string\@undefined
+ \string\else
+ \string\ifx\AskInc at CharHash1\string\relax
+ \string\else
+ \string\ifx\AskInc at CharHash1\string\@empty
+ \string\else
+ 1%
+ \string\fi
+ \string\fi
+ \string\fi
+ 0 %
+ \string\gdef\AskInc at CharHash1{\AskInc at CharHash2}%
+ \string\else
+ \string\g at addto@macro\AskInc at CharHash1{,\AskInc at CharHash2}%
+ \string\fi
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+ }{%
+ \global\let\AskInc at WriteDefAddList\relax
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at WriteDefAddFile}
+% \begin{macrocode}
+\def\AskInc at WriteDefAddFile{%
+ \AskInc at WriteDefAddList
+ \AskInc at WriteAux{%
+% \end{macrocode}
+% \begin{macro}{\AskInc at AddFile}
+% \begin{macrocode}
+ \string\providecommand\string\AskInc at AddFile{%
+ \string\AskInc at AddList\string\AskInc at Files
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+ }{%
+ \global\let\AskInc at WriteDefAddFile\relax
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at AddFile}
+% \begin{macrocode}
+\AtBeginDocument{%
+ \global\let\AskInc at AddFile\@gobble
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at WriteAddFile}
+% \begin{macrocode}
+\def\AskInc at WriteAddFile#1{%
+ \AskInc at WriteDefAddFile
+ \AskInc at WriteAux{%
+ \string\AskInc at AddFile{#1}%
+ }{}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at Files}
+% \begin{macrocode}
+\providecommand*{\AskInc at Files}{}
+% \end{macrocode}
+% \end{macro}
+%
+% \paragraph{Summary:}
+% Now \cs{AskInc at Files} is always defined
+% and either empty or contains a comma separated list of
+% \cs{include} files of previous run.
+%
+% The \cs{include} files are remembered by using
+% \cs{AskInc at WriteAddFile} at each \cs{include}.
+%
+% \subsection{Redefine \cs{include}}
+%
+% \begin{macro}{\AskInc at OrgInclude}
+% \begin{macrocode}
+\newcommand{\AskInc at OrgInclude}{}
+\let\AskInc at OrgInclude\include
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at AskFile}
+% \begin{macrocode}
+\let\AskInc at AskFile\@gobble
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at MatchFile}
+% \begin{macrocode}
+\let\AskInc at MatchFile\@gobble
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\include}
+% \begin{macrocode}
+\renewcommand*{\include}[1]{%
+ \AskInc at WriteAddFile{#1}%
+ \AskInc at AskFile{#1}%
+ \AskInc at MatchFile{#1}%
+ \AskInc at OrgInclude{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Store answer and match method in \xfile{.aux} file}
+%
+% \begin{macrocode}
+\AtEndOfPackage{%
+ \AtBeginDocument{%
+ \@ifundefined{AskInc at Answer}{}{%
+ \AskInc at WriteAux{%
+ \string\gdef\string\AskInc at Answer{\AskInc at Answer}%
+ }{}%
+ }%
+ \@ifundefined{AskInc at MatchMethod}{}{%
+ \AskInc at WriteAux{%
+ \string\gdef\string\AskInc at MatchMethod{\AskInc at MatchMethod}%
+ }{}%
+ }%
+ }%
+}
+% \end{macrocode}
+%
+% \subsection{Support for \cs{@includeonly}}
+%
+% \begin{macro}{\@includeonly}
+% Macro \cs{@includeonly} is defined for compatiblity reasons only,
+% if the \xfile{.aux} file was written by versions before 2 of package
+% \xpackage{askinclude}.
+% \begin{macrocode}
+\providecommand*{\@includeonly}[1]{%
+ \gdef\AskInc at Answer{#1}%
+ \ifx\AskInc at Answer\@empty
+ \gdef\AskInc at Answer{-}%
+ \fi
+ \global\let\AskInc at MatchMethod\@empty
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Stop if \cs{includeonly} is active}
+%
+% If \cs{includeonly} is used before, the questions are skipped
+% and the data in the main auxiliary file is preserved.
+% \begin{macrocode}
+\if at partsw
+ \PackageWarningNoLine{askinclude}{%
+ Previous \string\includeonly\space detected,\MessageBreak
+ therefore asking for files is suppressed%
+ }%
+% \end{macrocode}
+% Dummy options.
+% \begin{macrocode}
+ \DeclareOption{makematch}{}%
+ \DeclareOption{pdfmatch}{}%
+ \DeclareOption{noregexp}{}%
+ \ProcessOptions*%
+% \end{macrocode}
+% Preserve \cs{AskInc at MatchFiles}.
+% \begin{macrocode}
+ \@ifundefined{AskInc at MatchFiles}{%
+ }{%
+ \ifx\AskInc at MatchMethod\@empty
+ \else
+ \AskInc at WriteAux{%
+ \string\gdef\string\AskInc at MatchFiles{\AskInc at MatchFiles}%
+ }{}%
+ \fi
+ }%
+ \expandafter\AskInc at AtEnd
+\fi%
+% \end{macrocode}
+%
+% \subsection{\cs{includeonly}}
+%
+% \begin{macro}{\AskInc at OrgIncludeOnly}
+% \begin{macrocode}
+\newcommand{\AskInc at OrgIncludeOnly}{}%
+\let\AskInc at OrgIncludeOnly\includeonly
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\includeonly}
+% \begin{macrocode}
+\renewcommand*{\includeonly}[1]{%
+ \PackageWarning{askinclude}{%
+ \string\includeonly\space is managed by package `askinclude',%
+ \MessageBreak
+ therefore it is ignored%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Options}
+%
+% \begin{macro}{\AskInc at StringNoRegExp}
+% \begin{macrocode}
+\def\AskInc at StringNoRegExp{noregexp}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at StringMakeMatch}
+% \begin{macrocode}
+\def\AskInc at StringMakeMatch{makematch}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at StringPdfMatch}
+% \begin{macrocode}
+\def\AskInc at StringPdfMatch{pdfmatch}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ifAskInc at PdfMatchAvailable}
+% \begin{macrocode}
+\newif\ifAskInc at PdfMatchAvailable
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname pdfmatch\endcsname\relax
+\else
+ \AskInc at PdfMatchAvailabletrue
+\fi
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\DeclareOption{makematch}{%
+ \let\AskInc at MatchOption\AskInc at StringMakeMatch
+}
+\ifAskInc at PdfMatchAvailable
+ \DeclareOption{pdfmatch}{%
+ \let\AskInc at MatchOption\AskInc at StringPdfMatch
+ }%
+\else
+ \DeclareOption{pdfmatch}{%
+ \PackageWarningNoLine{askinclude}{%
+ Option `pdfmatch' is not available because\MessageBreak
+ your pdfTeX does not provide \string\pdfmatch
+ }%
+ }%
+\fi
+\DeclareOption{noregexp}{%
+ \let\AskInc at MatchOption\@empty
+}
+\ProcessOptions*
+% \end{macrocode}
+%
+% \subsection{Strings}
+%
+% \begin{macro}{\AskInc at CharAsterisk}
+% \begin{macrocode}
+\def\AskInc at CharAsterisk{*}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at CharMinus}
+% \begin{macrocode}
+\def\AskInc at CharMinus{-}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at CharPlus}
+% \begin{macrocode}
+\def\AskInc at CharPlus{+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at CharQuestion}
+% \begin{macrocode}
+\def\AskInc at CharQuestion{?}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at CharExclam}
+% \begin{macrocode}
+\def\AskInc at CharExclam{!}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at CharYes}
+% \begin{macrocode}
+\def\AskInc at CharYes{y}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at CharNo}
+% \begin{macrocode}
+\def\AskInc at CharNo{n}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at CharAll}
+% \begin{macrocode}
+\def\AskInc at CharAll{A}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at CharNone}
+% \begin{macrocode}
+\def\AskInc at CharNone{N}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at CharDefault}
+% \begin{macrocode}
+\def\AskInc at CharDefault{D}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Set defaults}
+%
+% \begin{macro}{\AskInc at SanitizeAnswer}
+% \begin{macrocode}
+\def\AskInc at SanitizeAnswer#1#2{%
+ \begingroup
+ \escapechar=`\\%
+ \edef\[{\string\[}%
+ \edef\]{\string\]}%
+ \edef\({\string\(}%
+ \edef\){\string\)}%
+ \edef\*{\string\*}%
+ \edef\+{\string\+}%
+ \edef\?{\string\?}%
+ \edef\|{\string\|}%
+ \edef\^{\string\^}%
+ \edef\${\string\$}%
+ \edef\{{\string\{}%
+ \edef\}{\string\}}%
+ \edef\.{\string\.}%
+ \xdef#1{%
+ \expandafter\expandafter\expandafter\zap at space
+ \expandafter#2\space\@empty
+ }%
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifundefined{AskInc at Answer}{%
+ \global\let\AskInc at Answer\AskInc at CharAsterisk
+ }{%
+ \AskInc at SanitizeAnswer\AskInc at Answer\AskInc at Answer
+ }%
+ \global\let\AskInc at PreviousAnswer\AskInc at Answer
+ \@ifundefined{AskInc at MatchMethod}{%
+ \global\let\AskInc at MatchMethod\@empty
+ }{}%
+ \global\let\AskInc at PreviousMatchMethod\AskInc at MatchMethod
+ \@ifundefined{AskInc at MatchOption}{%
+ \let\AskInc at MatchOption\AskInc at MatchMethod
+ }{}%
+ \ifx\AskInc at MatchOption\AskInc at StringPdfMatch
+ \ifAskInc at PdfMatchAvailable
+ \else
+ \let\AskInc at MatchOption\@empty
+ \fi
+ \fi
+ \@ifundefined{AskInc at MatchFiles}{%
+ \let\AskInc at MatchFiles\@empty
+ }{}%
+}
+% \end{macrocode}
+%
+% \subsection{Questions}
+%
+% \subsubsection{Generic question header}
+%
+% \begin{macro}{\AskInc at QuestionHeader}
+% \begin{macrocode}
+\def\AskInc at QuestionHeader{%
+ \typeout{}%
+ \typeout{***********************************}%
+ \typeout{*** Package askinclude Question ***}%
+ \typeout{***********************************}%
+ \typeout{}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Display files}
+%
+% \begin{macro}{\AskInc at TypeoutFiles}
+% \begin{macrocode}
+\def\AskInc at TypeoutFiles{%
+ \global\let\AskInc at PreviousMatches\@empty
+ \ifx\AskInc at Files\@empty
+ \else
+ \typeout{Files, found by previous run in \string\include:}%
+ \@for\AskInc at File:=\AskInc at Files\do{%
+ \ifx\AskInc at Answer\AskInc at CharAsterisk
+ \let\AskInc at Mark\AskInc at CharPlus
+ \else
+ \let\AskInc at Mark\AskInc at CharMinus
+ \ifx\AskInc at Answer\AskInc at CharMinus
+ \else
+ \ifx\AskInc at MatchMethod\@empty
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\@for\AskInc at Temp:=\AskInc at Answer}%
+ {\@for\AskInc at Temp:=\AskInc at MatchFiles}%
+ \do{%
+ \ifx\AskInc at File\AskInc at Temp
+ \let\AskInc at Mark\AskInc at CharPlus
+ \fi
+ }%
+ \fi
+ \fi
+ \typeout{ \@spaces(\AskInc at Mark) \AskInc at File}%
+ \ifx\AskInc at Mark\AskInc at CharPlus
+ \ifx\AskInc at PreviousMatches\@empty
+ \global\let\AskInc at PreviousMatches\AskInc at File
+ \else
+ \expandafter\g at addto@macro
+ \expandafter\AskInc at PreviousMatches{%
+ \expandafter,\AskInc at File
+ }%
+ \fi
+ \fi
+ }%
+ \typeout{}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Previous answer}
+%
+% \begin{macro}{\AskInc at TypeoutPreviousAnswer}
+% \begin{macrocode}
+\def\AskInc at TypeoutPreviousAnswer{%
+ \typeout{%
+ Previous answer (%
+ \ifx\AskInc at MatchMethod\@empty
+ noregexp%
+ \else
+ \AskInc at MatchMethod
+ \fi
+ ):%
+ }%
+ \typeout{ \@spaces[\AskInc at Answer]}%
+ \typeout{}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Current regular expression support}
+%
+% \begin{macro}{\AskInc at TypeoutMatchMethod}
+% \begin{macrocode}
+\def\AskInc at TypeoutMatchMethod{%
+ \typeout{Regular expressions:}%
+ \AskInc at TypeoutMethod\@empty{noregexp}{%
+ \space disabled%
+ }%
+ \AskInc at TypeoutMethod\AskInc at StringMakeMatch{makematch}{%
+ enabled, using package `makematch'%
+ }%
+ \ifAskInc at PdfMatchAvailable
+ \AskInc at TypeoutMethod\AskInc at StringPdfMatch{pdfmatch}{%
+ \space enabled, using pdfTeX's \string\pdfmatch
+ }%
+ \fi
+ \typeout{}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at TypeoutMethod}
+% \begin{macrocode}
+\def\AskInc at TypeoutMethod#1#2#3{%
+ \typeout{%
+ \ifx#1\AskInc at MatchOption \space--> \else\@spaces\space\fi
+ [#2] #3% hash-ok
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Main question text}
+%
+% \begin{macro}{\AskInc at TypeoutMainQuestion}
+% \begin{macrocode}
+\def\AskInc at TypeoutMainQuestion{%
+ \typeout{Which files do you want to include?}%
+ \typeout{ \@spaces[foo,bar] \space\space
+ comma separated file or pattern list}%
+ \typeout{ \@spaces[*] \@spaces\@spaces all files}%
+ \typeout{ \@spaces[-] \@spaces\@spaces no files}%
+ \typeout{ \@spaces[?] \@spaces\@spaces ask for each file}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Main question}
+%
+% \begin{macro}{\AskInc at MainQuestion}
+% \begin{macrocode}
+\def\AskInc at MainQuestion{%
+ \AskInc at QuestionHeader
+ \AskInc at TypeoutFiles
+ \AskInc at TypeoutPreviousAnswer
+ \AskInc at TypeoutMatchMethod
+ \AskInc at TypeoutMainQuestion
+ \begingroup
+ \@makeother\*%
+ \@makeother\-%
+ \@makeother\?%
+ \@makeother\,%
+ \@makeother\!%
+ \@makeother\^%
+ \@makeother\$%
+ \@makeother\(%
+ \@makeother\)%
+ \@makeother\+%
+ \@makeother\[%
+ \@makeother\]%
+ \@makeother\\%
+ \@makeother\|%
+ \@makeother\:%
+ \@makeother\.%
+ \typein[\answer]%
+ { \@spaces[] \space\@spaces\@spaces use the previous answer}%
+ \typeout{}%
+ \AskInc at SanitizeAnswer\AskInc@@Answer\answer
+ \endgroup
+ \let\AskInc at Next\AskInc at MainQuestion
+ \ifx\AskInc@@Answer\AskInc at StringNoRegExp
+ \let\AskInc at MatchOption\@empty
+ \else
+ \ifx\AskInc@@Answer\AskInc at StringMakeMatch
+ \let\AskInc at MatchOption\AskInc at StringMakeMatch
+ \else
+ \ifx\AskInc@@Answer\AskInc at StringPdfMatch
+ \ifAskInc at PdfMatchAvailable
+ \let\AskInc at MatchOption\AskInc at StringPdfMatch
+ \else
+ \PackageWarning{askinclude}{%
+ Method `pdfmatch' is not available because\MessageBreak
+ your pdfTeX does not provide \string\pdfmatch
+ }%
+ \let\AskInc at MatchOption\@empty
+ \fi
+ \else
+ \ifx\AskInc@@Answer\@empty
+ \global\let\AskInc@@Answer\AskInc at Answer
+ \fi
+ \let\AskInc at Next\AskInc at MainAnswer
+ \fi
+ \fi
+ \fi
+ \AskInc at Next
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Evaluate answer of main question}
+%
+% \begin{macro}{\AskInc at MainAnswer}
+% \begin{macrocode}
+\def\AskInc at MainAnswer{%
+ \ifx\AskInc@@Answer\AskInc at CharQuestion
+ \global\let\AskInc at Answer\@empty
+ \global\let\AskInc at MatchMethod\@empty
+ \global\let\AskInc at AskFile\AskInc at DoAskFile
+ \AskInc at OrgIncludeOnly{}%
+ \else
+ \global\let\AskInc at Answer\AskInc@@Answer
+ \ifx\AskInc@@Answer\AskInc at CharAsterisk
+ \global\let\AskInc at MatchMethod\@empty
+ \else
+ \ifx\AskInc@@Answer\AskInc at CharMinus
+ \global\let\AskInc at MatchMethod\@empty
+ \AskInc at OrgIncludeOnly{}%
+ \else
+ \global\let\AskInc at MatchMethod\AskInc at MatchOption
+ \ifx\AskInc at MatchOption\@empty
+ \expandafter\AskInc at OrgIncludeOnly\expandafter{%
+ \AskInc at Answer
+ }%
+ \else
+ \AskInc at MatchInit
+ \AskInc at OrgIncludeOnly{}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \let\AskInc at Include\AskInc at DoInclude
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AskInc at MatchInit}
+% \begin{macrocode}
+\def\AskInc at MatchInit{%
+ \RequirePackage{kvsetkeys}[2007/09/29]%
+ \expandafter\comma at normalize\expandafter{\AskInc at Answer}%
+ \global\let\AskInc at MatchList\comma at list
+% \end{macrocode}
+% \begin{macro}{\AskInc at MatchFile}
+% \begin{macrocode}
+ \def\AskInc at MatchFile##1{%
+ \AskInc at DoMatch{##1}{%
+ \AskInc at WriteAddMatch{##1}%
+ \ifx\@partlist\@empty
+ \gdef\@partlist{##1}%
+ \else
+ \g at addto@macro\@partlist{,##1}%
+ \fi
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+ \ifx\AskInc at MatchMethod\AskInc at StringMakeMatch
+ \AskInc at MakeMatchInit
+ \else
+ \AskInc at PdfMatchInit
+ \fi
+ \let\AskInc at MatchInit\@undefined
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at MakeMatchInit}
+% \begin{macrocode}
+\def\AskInc at MakeMatchInit{%
+ \RequirePackage{makematch}%
+% \end{macrocode}
+% \begin{macro}{\AskInc at DoMatch}
+% \begin{macrocode}
+ \def\AskInc at DoMatch##1{%
+ \def\AskInc at Temp{%
+ \MakeMatcher[,]\AskInc at Temp
+ }%
+ \expandafter\AskInc at Temp\expandafter{\AskInc at MatchList}%
+ \AskInc at Temp{{##1}}\@firstofone\@gobble
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+ \let\AskInc at MakeMatchInit\@undefined
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at PdfMatchInit}
+% \begin{macrocode}
+\def\AskInc at PdfMatchInit{%
+% \end{macrocode}
+% \begin{macro}{\ifAskInc at Found}
+% \begin{macrocode}
+ \newif\ifAskInc at Found
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at DoMatch}
+% \begin{macrocode}
+ \def\AskInc at DoMatch##1{%
+ \AskInc at Foundfalse
+ \expandafter\comma at parse@normalized\expandafter
+ {\AskInc at MatchList}{\AskInc at CheckMatch{##1}}%
+ \ifAskInc at Found
+ \expandafter\@firstofone
+ \else
+ \expandafter\@gobble
+ \fi
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at CheckMatch}
+% \begin{macrocode}
+ \def\AskInc at CheckMatch##1##2{%
+ \AskInc@@CheckMatch##2\@empty\@nil{##1}%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc@@CheckMatch}
+% \begin{macrocode}
+ \def\AskInc@@CheckMatch##1##2\@nil##3{%
+ \def\AskInc at Temp{##1}%
+ \ifx\AskInc at Temp\AskInc at CharExclam
+ \ifcase\pdfmatch{##2}{##3}=1 %
+ \or
+ \AskInc at Foundfalse
+ \else
+ \AskInc at InvalidPattern{##2}{##1##2}%
+ \fi
+ \else
+ \ifcase\pdfmatch{##1##2}{##3} %
+ \or
+ \AskInc at Foundtrue
+ \else
+ \AskInc at InvalidPattern{##1##2}{##1##2}%
+ \fi
+ \fi
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at InvalidPattern}
+% Prints a warning with the regular expression and
+% removes it from the list to prevent further warnings
+% for the same expression.
+% \begin{macrocode}
+ \def\AskInc at InvalidPattern##1##2{%
+ \edef\AskInc at Temp{##1}%
+ \PackageWarningNoLine{askinclude}{%
+ Invalid pattern `\AskInc at Temp' for \string\pdfmatch
+ }%
+ \edef\AskInc at Temp{##2}%
+ \global\expandafter\let\expandafter\AskInc at MatchList
+ \expandafter\@empty
+ \expandafter\comma at parse@normalized\expandafter
+ {\AskInc at MatchList}\AskInc at FilterPattern
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at FilterPattern}
+% \begin{macrocode}
+ \def\AskInc at FilterPattern##1{%
+ \edef\AskInc at Pattern{##1}%
+ \ifx\AskInc at Temp\AskInc at Pattern
+ \else
+ \ifx\AskInc at MatchList\@empty
+ \global\let\AskInc at MatchList\AskInc at Pattern
+ \else
+ \expandafter\g at addto@macro\expandafter\AskInc at MatchList{%
+ \expandafter,\AskInc at Pattern
+ }%
+ \fi
+ \fi
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+ \let\AskInc at PdfMatchInit\@undefined
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AskInc at WriteDefAddMatch}
+% \begin{macrocode}
+\def\AskInc at WriteDefAddMatch{%
+ \AskInc at WriteDefAddList
+ \AskInc at WriteAux{%
+% \end{macrocode}
+% \begin{macro}{\AskInc at AddMatch}
+% \begin{macrocode}
+ \string\providecommand\string\AskInc at AddMatch{%
+ \string\AskInc at AddList\string\AskInc at MatchFiles
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+ }{%
+ \global\let\AskInc at WriteDefAddMatch\relax
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at AddMatch}
+% \begin{macrocode}
+\AtBeginDocument{%
+ \global\let\AskInc at AddMatch\@gobble
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at WriteAddMatch}
+% \begin{macrocode}
+\def\AskInc at WriteAddMatch#1{%
+ \AskInc at WriteDefAddMatch
+ \AskInc at WriteAux{%
+ \string\AskInc at AddMatch{#1}%
+ }{}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AskInc at SaveAnswer}
+% \begin{macrocode}
+\def\AskInc at SaveAnswer{%
+ \AskInc at WriteAux{%
+ \string\gdef\string\AskInc at Answer{\AskInc at Answer}%
+ }{}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Ask for each file}
+%
+% \begin{macro}{\AskInc at PreviousAnswer}
+% \begin{macrocode}
+\@ifundefined{AskInc at PreviousAnswer}{%
+ \let\AskInc at PreviousAnswer\AskInc at CharAsterisk
+}{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at PreviousMatchMethod}
+% \begin{macrocode}
+\@ifundefined{AskInc at PreviousMatchMethod}{%
+ \let\AskInc at PreviousMatchMethod\@empty
+}{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at DoAskFile}
+% \begin{macrocode}
+\def\AskInc at DoAskFile#1{%
+ \edef\AskInc at File{#1}%
+ \ifx\AskInc at PreviousAnswer\AskInc at CharAsterisk
+ \let\AskInc at Default\AskInc at CharYes
+ \else
+ \let\AskInc at Default\AskInc at CharNo
+ \ifx\AskInc at PreviousAnswer\AskInc at CharMinus
+ \else
+ \ifx\AskInc at PreviousMatchMethod\@empty
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\@for\AskInc at Temp:=\AskInc at PreviousAnswer}%
+ {\@for\AskInc at Temp:=\AskInc at MatchFiles}%
+ \do{%
+ \ifx\AskInc at Temp\AskInc at File
+ \let\AskInc at Default\AskInc at CharYes
+ \fi
+ }%
+ \fi
+ \ifx\AskInc at Default\AskInc at CharNo
+ \let\AskInc at Default\AskInc at CharYes
+ \@for\AskInc at Temp:=\AskInc at Files\do{%
+ \ifx\AskInc at Temp\AskInc at File
+ \let\AskInc at Default\AskInc at CharNo
+ \fi
+ }%
+ \fi
+ \fi
+ \let\AskInc@@QuestionHeader\AskInc at QuestionHeader
+ \AskInc at AskQuestion
+ \ifx\AskInc at AskResult\AskInc at CharYes
+ \ifx\AskInc at Answer\@empty
+ \gdef\AskInc at Answer{#1}%
+ \else
+ \g at addto@macro\AskInc at Answer{,#1}%
+ \fi
+ \AskInc at SaveAnswer
+ \let\@partlist\AskInc at Answer
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AskInc at AskQuestion}
+% \begin{macrocode}
+\def\AskInc at AskQuestion{%
+ \let\AskInc at Temp\answer
+ \AskInc@@QuestionHeader
+ \let\AskInc@@QuestionHeader\relax
+ \typein[\answer]{%
+ Include `\AskInc at File'? [y]es, [n]o, [A]ll, [N]one, [D]efault %
+ (\AskInc at Default):%
+ }%
+ \typeout{}%
+ \let\AskInc at AskResult\answer
+ \let\answer\AskInc at Temp
+ \ifx\AskInc at AskResult\@empty
+ \let\AskInc at AskResult\AskInc at Default
+ \let\AskInc at Next\relax
+ \else
+ \ifx\AskInc at AskResult\AskInc at CharYes
+ \let\AskInc at Next\relax
+ \else
+ \ifx\AskInc at AskResult\AskInc at CharNo
+ \let\AskInc at Next\relax
+ \else
+ \ifx\AskInc at AskResult\AskInc at CharAll
+ \gdef\AskInc at AskQuestion{%
+ \let\AskInc at AskResult\AskInc at CharYes
+ }%
+ \else
+ \ifx\AskInc at AskResult\AskInc at CharNone
+ \gdef\AskInc at AskQuestion{%
+ \let\AskInc at AskResult\AskInc at CharNo
+ }%
+ \else
+ \ifx\AskInc at AskResult\AskInc at CharDefault
+ \gdef\AskInc at AskQuestion{%
+ \let\AskInc at AskResult\AskInc at Default
+ }%
+ \else
+ \PackageWarningNoLine{askinclude}{%
+ Invalid answer [\AskInc at AskResult].\MessageBreak
+ Answer must be one letter out of [ynAND]%
+ }%
+ \fi
+ \fi
+ \fi
+ \let\AskInc at Next\AskInc at AskQuestion
+ \fi
+ \fi
+ \fi
+ \AskInc at Next
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\AtBeginDocument{\AskInc at MainQuestion}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\AskInc at AtEnd%
+%</package>
+% \end{macrocode}
+% \section{Installation}
+%
+% \subsection{Download}
+%
+% \paragraph{Package.} This package is available on
+% CTAN\footnote{\CTANpkg{askinclude}}:
+% \begin{description}
+% \item[\CTAN{macros/latex/contrib/askinclude/askinclude.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/askinclude/askinclude.pdf}] Documentation.
+% \end{description}
+%
+%
+% \paragraph{Bundle.} All the packages of the bundle `askinclude'
+% are also available in a TDS compliant ZIP archive. There
+% the packages are already unpacked and the documentation files
+% are generated. The files and directories obey the TDS standard.
+% \begin{description}
+% \item[\CTANinstall{install/macros/latex/contrib/askinclude.tds.zip}]
+% \end{description}
+% \emph{TDS} refers to the standard ``A Directory Structure
+% for \TeX\ Files'' (\CTANpkg{tds}). Directories
+% with \xfile{texmf} in their name are usually organized this way.
+%
+% \subsection{Bundle installation}
+%
+% \paragraph{Unpacking.} Unpack the \xfile{askinclude.tds.zip} in the
+% TDS tree (also known as \xfile{texmf} tree) of your choice.
+% Example (linux):
+% \begin{quote}
+% |unzip askinclude.tds.zip -d ~/texmf|
+% \end{quote}
+%
+% \subsection{Package installation}
+%
+% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
+% \docstrip\ archive. The files are extracted by running the
+% \xfile{.dtx} through \plainTeX:
+% \begin{quote}
+% \verb|tex askinclude.dtx|
+% \end{quote}
+%
+% \paragraph{TDS.} Now the different files must be moved into
+% the different directories in your installation TDS tree
+% (also known as \xfile{texmf} tree):
+% \begin{quote}
+% \def\t{^^A
+% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
+% askinclude.sty & tex/latex/askinclude/askinclude.sty\\
+% askinclude.pdf & doc/latex/askinclude/askinclude.pdf\\
+% askinclude.dtx & source/latex/askinclude/askinclude.dtx\\
+% \end{tabular}^^A
+% }^^A
+% \sbox0{\t}^^A
+% \ifdim\wd0>\linewidth
+% \begingroup
+% \advance\linewidth by\leftmargin
+% \advance\linewidth by\rightmargin
+% \edef\x{\endgroup
+% \def\noexpand\lw{\the\linewidth}^^A
+% }\x
+% \def\lwbox{^^A
+% \leavevmode
+% \hbox to \linewidth{^^A
+% \kern-\leftmargin\relax
+% \hss
+% \usebox0
+% \hss
+% \kern-\rightmargin\relax
+% }^^A
+% }^^A
+% \ifdim\wd0>\lw
+% \sbox0{\small\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\footnotesize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\scriptsize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\tiny\t}^^A
+% \ifdim\wd0>\linewidth
+% \lwbox
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \end{quote}
+% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
+% TDS installing feature, then some files can already be in the right
+% place, see the documentation of \docstrip.
+%
+% \subsection{Refresh file name databases}
+%
+% If your \TeX~distribution
+% (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh
+% these. For example, \TeX\,Live\ users run \verb|texhash| or
+% \verb|mktexlsr|.
+%
+% \subsection{Some details for the interested}
+%
+% \paragraph{Unpacking with \LaTeX.}
+% The \xfile{.dtx} chooses its action depending on the format:
+% \begin{description}
+% \item[\plainTeX:] Run \docstrip\ and extract the files.
+% \item[\LaTeX:] Generate the documentation.
+% \end{description}
+% If you insist on using \LaTeX\ for \docstrip\ (really,
+% \docstrip\ does not need \LaTeX), then inform the autodetect routine
+% about your intention:
+% \begin{quote}
+% \verb|latex \let\install=y\input{askinclude.dtx}|
+% \end{quote}
+% Do not forget to quote the argument according to the demands
+% of your shell.
+%
+% \paragraph{Generating the documentation.}
+% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
+% the documentation. The process can be configured by the
+% configuration file \xfile{ltxdoc.cfg}. For instance, put this
+% line into this file, if you want to have A4 as paper format:
+% \begin{quote}
+% \verb|\PassOptionsToClass{a4paper}{article}|
+% \end{quote}
+% An example follows how to generate the
+% documentation with pdf\LaTeX:
+% \begin{quote}
+%\begin{verbatim}
+%pdflatex askinclude.dtx
+%bibtex askinclude.aux
+%makeindex -s gind.ist askinclude.idx
+%pdflatex askinclude.dtx
+%makeindex -s gind.ist askinclude.idx
+%pdflatex askinclude.dtx
+%\end{verbatim}
+% \end{quote}
+%
+% \section{Acknowledgement}
+%
+% \begin{description}
+% \item[Tom Scavo]
+% suggested saving the include file list
+% from the previous run and a simplified user interface.
+% \item[Joseph Wright] suggested questions for each \cs{include}.
+% \end{description}
+%
+% \printbibliography[
+% heading=bibnumbered,
+% ]
+%
+% \begin{History}
+
+% \begin{Version}{1991/11/05 v0.95}
+% \item
+% First beta-test version (asked two questions).
+% \end{Version}
+% \begin{Version}{1991/11/05 v0.99}
+% \item
+% Second beta-test version (asks one question; uses `|*|' and `|-|').
+% \end{Version}
+% \begin{Version}{1991/11/07 v1.0}
+% \item
+% Changed prompts (sent to \xnewsgroup{comp.text.tex}):
+% \URL{``\link{Interactive inclusion of files in LaTeX}''}^^A
+% {https://groups.google.com/group/comp.text.tex/msg/34b770a7c277e79c}
+% \end{Version}
+% \begin{Version}{1991/12/13 v1.1}
+% \item
+% \textit{Unknown}.
+% \end{Version}
+% \begin{Version}{1994/11/02 v1.2e}
+% \item
+% Two small changes to run under LaTeX2e [RF].
+% \item
+% Additional documentation [TRS].
+% \end{Version}
+% \begin{Version}{2007/10/15 v1.0 (askinc)}
+% \item
+% Reimplementation, published as \xpackage{askinc} in
+% newsgroup \xnewsgroup{comp.text.tex}:\\
+% \URL{``\link{Re: askinclude.sty}''}^^A
+% {https://groups.google.com/group/comp.text.tex/msg/2d638b84a858fdc8}
+% \item
+% Listing of included files, collected from the previous run before
+% the question.
+% \item
+% No error message by \xfile{.aux} file if package is removed.
+% \end{Version}
+% \begin{Version}{2007/10/23 v2.0}
+% \item
+% The next version of \xpackage{askinc} becomes
+% version 2.0 of \xpackage{askinclude}.
+% \item
+% `|?|' added for questioning each file.
+% \item
+% \cs{includeonly} has precedence until package loading.
+% Then it is disabled by a warning.
+% \item
+% Documentation rewritten/added.
+% \item
+% Tests added.
+% \end{Version}
+% \begin{Version}{2008/08/11 v2.1}
+% \item
+% Code is not changed.
+% \item
+% URLs updated.
+% \end{Version}
+% \begin{Version}{2011/12/02 v2.2}
+% \item
+% Bibliography rewritten for biblatex.
+% \end{Version}
+% \begin{Version}{2016/05/14 v2.3}
+% \item
+% Luatex compatibility
+% \end{Version}
+% \begin{Version}{2018/11/01 v2.4}
+% \item
+% Remove luatex85 package dependency
+% \end{Version}
+% \begin{Version}{2019/12/09 v2.5}
+% \item
+% Documentation updates.
+% \end{Version}
+% \begin{Version}{2019-12-10 v2.6}
+% \item Updated
+% \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput
+% \begin{Version}{1991/11/05 v0.95}
+% \item
+% First beta-test version (asked two questions).
+% \end{Version}
+% \begin{Version}{1991/11/05 v0.99}
+% \item
+% Second beta-test version (asks one question; uses `|*|' and `|-|').
+% \end{Version}
+% \begin{Version}{1991/11/07 v1.0}
+% \item
+% Changed prompts (sent to \xnewsgroup{comp.text.tex}):
+% \URL{``\link{Interactive inclusion of files in LaTeX}''}^^A
+% {https://groups.google.com/group/comp.text.tex/msg/34b770a7c277e79c}
+% \end{Version}
+% \begin{Version}{1991/12/13 v1.1}
+% \item
+% \textit{Unknown}.
+% \end{Version}
+% \begin{Version}{1994/11/02 v1.2e}
+% \item
+% Two small changes to run under LaTeX2e [RF].
+% \item
+% Additional documentation [TRS].
+% \end{Version}
+% \begin{Version}{2007/10/15 v1.0 (askinc)}
+% \item
+% Reimplementation, published as \xpackage{askinc} in
+% newsgroup \xnewsgroup{comp.text.tex}:\\
+% \URL{``\link{Re: askinclude.sty}''}^^A
+% {https://groups.google.com/group/comp.text.tex/msg/2d638b84a858fdc8}
+% \item
+% Listing of included files, collected from the previous run before
+% the question.
+% \item
+% No error message by \xfile{.aux} file if package is removed.
+% \end{Version}
+% \begin{Version}{2007/10/23 v2.0}
+% \item
+% The next version of \xpackage{askinc} becomes
+% version 2.0 of \xpackage{askinclude}.
+% \item
+% `|?|' added for questioning each file.
+% \item
+% \cs{includeonly} has precedence until package loading.
+% Then it is disabled by a warning.
+% \item
+% Documentation rewritten/added.
+% \item
+% Tests added.
+% \end{Version}
+% \begin{Version}{2008/08/11 v2.1}
+% \item
+% Code is not changed.
+% \item
+% URLs updated.
+% \end{Version}
+% \begin{Version}{2011/12/02 v2.2}
+% \item
+% Bibliography rewritten for biblatex.
+% \end{Version}
+% \begin{Version}{2016/05/14 v2.3}
+% \item
+% Luatex compatibility
+% \end{Version}
+% \begin{Version}{2019-12-10 v2.6}
+% \item Updated
+% \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput
Property changes on: trunk/Master/texmf-dist/source/latex/askinclude/askinclude.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/tex/latex/askinclude/askinclude.dtx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/askinclude/askinclude.dtx 2019-12-11 21:53:45 UTC (rev 53095)
+++ trunk/Master/texmf-dist/tex/latex/askinclude/askinclude.dtx 2019-12-11 21:54:02 UTC (rev 53096)
@@ -1,1895 +0,0 @@
-% \iffalse meta-comment
-%
-% File: askinclude.dtx
-% Version: 2019/12/09 v2.5
-% Info: Interactive asking of included files
-%
-% Copyright (C)
-% 1991-1994 Pablo A. Straub
-% 2007, 2008, 2011 Heiko Oberdiek
-% 2016-2019 Oberdiek Package Support Group
-% https://github.com/ho-tex/askinclude/issues
-%
-% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either
-% version 1.3c of this license or (at your option) any later
-% version. This version of this license is in
-% https://www.latex-project.org/lppl/lppl-1-3c.txt
-% and the latest version of this license is in
-% https://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of
-% LaTeX version 2005/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainers of this work are
-% Heiko Oberdiek and the Oberdiek Package Support Group
-% https://github.com/ho-tex/askinclude/issues
-%
-% This work consists of the main source file askinclude.dtx
-% and the derived files
-% askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv,
-%
-% Distribution:
-% CTAN:macros/latex/contrib/askinclude/askinclude.dtx
-% CTAN:macros/latex/contrib/askinclude/askinclude.pdf
-%
-% Unpacking:
-% (a) If askinclude.ins is present:
-% tex askinclude.ins
-% (b) Without askinclude.ins:
-% tex askinclude.dtx
-% (c) If you insist on using LaTeX
-% latex \let\install=y\input{askinclude.dtx}
-% (quote the arguments according to the demands of your shell)
-%
-% Documentation:
-% (a) If askinclude.drv is present:
-% latex askinclude.drv
-% (b) Without askinclude.drv:
-% latex askinclude.dtx; ...
-% The class ltxdoc loads the configuration file ltxdoc.cfg
-% if available. Here you can specify further options, e.g.
-% use A4 as paper format:
-% \PassOptionsToClass{a4paper}{article}
-%
-% Programm calls to get the documentation (example):
-% pdflatex askinclude.dtx
-% bibtex askinclude.aux
-% makeindex -s gind.ist askinclude.idx
-% pdflatex askinclude.dtx
-% makeindex -s gind.ist askinclude.idx
-% pdflatex askinclude.dtx
-%
-% Installation:
-% TDS:tex/latex/askinclude/askinclude.sty
-% TDS:doc/latex/askinclude/askinclude.pdf
-% TDS:source/latex/askinclude/askinclude.dtx
-%
-%<*ignore>
-\begingroup
- \catcode123=1 %
- \catcode125=2 %
- \def\x{LaTeX2e}%
-\expandafter\endgroup
-\ifcase 0\ifx\install y1\fi\expandafter
- \ifx\csname processbatchFile\endcsname\relax\else1\fi
- \ifx\fmtname\x\else 1\fi\relax
-\else\csname fi\endcsname
-%</ignore>
-%<*install>
-\input docstrip.tex
-\Msg{************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: askinclude 2019/12/09 v2.5 Interactive asking of included files}
-\Msg{************************************************************************}
-
-\keepsilent
-\askforoverwritefalse
-
-\let\MetaPrefix\relax
-\preamble
-
-This is a generated file.
-
-Project: askinclude
-Version: 2019/12/09 v2.5
-
-Copyright (C)
- 1991-1994 Pablo A. Straub
- 2007, 2008, 2011 Heiko Oberdiek
- 2016-2019 Oberdiek Package Support Group
-
-This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either
-version 1.3c of this license or (at your option) any later
-version. This version of this license is in
- https://www.latex-project.org/lppl/lppl-1-3c.txt
-and the latest version of this license is in
- https://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of
-LaTeX version 2005/12/01 or later.
-
-This work has the LPPL maintenance status "maintained".
-
-The Current Maintainers of this work are
-Heiko Oberdiek and the Oberdiek Package Support Group
-https://github.com/ho-tex/askinclude/issues
-
-
-This work consists of the main source file askinclude.dtx
-and the derived files
- askinclude.sty, askinclude.pdf, askinclude.ins, askinclude.drv,
-
-\endpreamble
-\let\MetaPrefix\DoubleperCent
-
-\generate{%
- \file{askinclude.ins}{\from{askinclude.dtx}{install}}%
- \file{askinclude.drv}{\from{askinclude.dtx}{driver}}%
- \nopreamble
- \nopostamble
- \file{askinclude.bib}{\from{askinclude.dtx}{bib}}%
- \usepreamble\defaultpreamble
- \usepostamble\defaultpostamble
- \usedir{tex/latex/askinclude}%
- \file{askinclude.sty}{\from{askinclude.dtx}{package}}%
-}
-
-\catcode32=13\relax% active space
-\let =\space%
-\Msg{************************************************************************}
-\Msg{*}
-\Msg{* To finish the installation you have to move the following}
-\Msg{* file into a directory searched by TeX:}
-\Msg{*}
-\Msg{* askinclude.sty}
-\Msg{*}
-\Msg{* To produce the documentation run the file `askinclude.drv'}
-\Msg{* through LaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{*}
-\Msg{************************************************************************}
-
-\endbatchfile
-%</install>
-%<*bib>
- at online{texlive,
- author={Fairbairns, Robin},
- title={[tex-live] licence on includeonly.sty},
- date={2007-10-13},
- url={https://www.tug.org/pipermail/tex-live/2007-October/014928.html},
- urldate={2011-12-02},
-}
- at online{newsthread,
- author={Vo{\ss}, Herbert},
- title={askinclude.sty},
- note={Thread in newsgroup {\xnewsgroup{comp.text.tex}};
- Message-ID: {\texttt{fev72m\$b35\$02\$2 at news.t-online.com}}},
- date={2007-10-15},
- url={https://groups.google.com/group/comp.text.tex/browse_thread/thread/728a3e73c04c6789/349e31865c40d00c},
- urldate={2011-12-02},
-}
- at manual{makematch,
- author={Kastrup, David},
- title={makematch.sty: Pattern matching with wildcards},
- date={2007-02-23},
- version={1.7925},
- url={https://ctan.org/pkg/qstest},
- urldate={2011-12-02},
-}
- at manual{excludeonly,
- author={Luecking, Daniel H. and Arseneau, Donald},
- title={The excludeonly package},
- date={2003-03-14},
- url={https://ctan.org/pkg/excludeonly},
- urldate={2011-12-02},
-}
-%</bib>
-%<*ignore>
-\fi
-%</ignore>
-%<*driver>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{askinclude.drv}%
- [2019/12/09 v2.5 Interactive asking of included files]%
-\documentclass{ltxdoc}
-\usepackage{holtxdoc}[2011/11/22]
-\usepackage{iftex}
-\ifluatex
-\else
- \usepackage[T1]{fontenc}%
- \usepackage{lmodern}%
-\fi
-\usepackage{csquotes}
-\usepackage[
- backend=bibtex,
- bibencoding=ascii,
- alldates=iso,seconds=true,
-]{biblatex}[2011/11/13]
-\bibliography{oberdiek-source}
-\bibliography{askinclude}
-\begin{document}
- \DocInput{askinclude.dtx}%
-\end{document}
-%</driver>
-% \fi
-%
-%
-%
-% \GetFileInfo{askinclude.drv}
-%
-% \title{The \xpackage{askinclude} package}
-% \date{2019/12/09 v2.5}
-% \author{
-% Pablo A. Straub\\[1ex]
-% Heiko Oberdiek\thanks
-% {Please report any issues at \url{https://github.com/ho-tex/askinclude/issues}}}
-%
-%
-% \maketitle
-%
-% \begin{abstract}
-% This package replaces \cs{includeonly} by an interactive user
-% interface.
-% \end{abstract}
-%
-% \tableofcontents
-%
-% \section{Documentation}
-%
-% \subsection{User interface}
-%
-% The \cs{include} feature of \LaTeX\ allows the division of
-% the text body in separate compilation units. It is page
-% based and stores counter settings in additional auxiliary
-% files. \cs{includeonly} limits the actually included files
-% to the ones, listed in its argument.
-%
-% Example:
-%\begin{quote}
-%\begin{verbatim}
-%\documentclass{report}
-%
-%\usepackage{askinclude}
-%
-% % Don't use \include in the preamble.
-% % Instead \input can be used or make a package
-%
-%\begin{document}
-%\include{title}
-%\include{introduction}
-%\include{summary}
-%\include{index}
-%\end{document}
-%\end{verbatim}
-%\end{quote}
-%
-% Package \xpackage{askinclude} adds an interactive user interface.
-% The user is asked which files he want to include and sets
-% \cs{includeonly} accordingly.
-%
-% The first time the package is used the question looks like:
-%\begin{quote}
-%\begin{verbatim}
-%***********************************
-%*** Package askinclude Question ***
-%***********************************
-%
-%Previous answer (noregexp):
-% [*]
-%
-%Regular expressions:
-% --> [noregexp] disabled
-% [makematch] enabled, using package `makematch'
-% [pdfmatch] enabled, using pdfTeX's \pdfmatch
-%
-%Which files do you want to include?
-% [foo,bar] comma separated file or pattern list
-% [*] all files
-% [-] no files
-% [?] ask for each file
-% [] use the previous answer
-%
-%\answer=chapter2,summary
-%\end{verbatim}
-%\end{quote}
-% Square brackets are used as quotation symbols,
-% they are not part of the answer.
-% The answer by the user follows in the last line after |\answer=|.
-% \begin{description}
-% \def\Item[#1]{\item[{[\texttt{#1}]:}]}
-% \Item[foo,bar]
-% A comma separated file list (also one file only) is passed
-% to macro \cs{includeonly} directly. If regular expression support
-% is enabled, the entries in the list are interpreted as
-% file name patterns that will be matched against the file names
-% in \cs{include}, see \hyperref[sec:regexp]{section \ref*{sec:regexp}}.
-% \Item[*] This is a shortcut for specifying \emph{all} files.
-% \Item[-] This means \emph{none} of the files is included.
-% \Item[?] The switches in single asking mode.
-% The user will be asked at each \cs{include}.
-% See section \hyperref[sec:single]{section \ref*{sec:single}}.
-% \Item[] Just pressing return (empty string) uses the default
-% answer, that was stored in the auxiliary file (\xfile{.aux})
-% of the previous \LaTeX run with package \xpackage{askinclude}.
-% Without previous runs the default is [|*|] for all files.
-% \Item[noregexp] Turns regular expression support off.
-% \Item[makematch] Enables regular expression support
-% package \xpackage{makematch} provides.
-% \Item[pdfmatch] It is shown, if \pdfTeX~1.30 or later is used.
-% It relies on an undocumented feature \cs{pdfmatch} that may
-% change in future versions of \pdfTeX.
-% \end{description}
-% Package \xpackage{askinclude} remembers the files of \cs{include}
-% in the auxiliary file and the given answer. they are
-% presented at the next run
-% at the start of the question:
-%\begin{quote}
-%\begin{verbatim}
-%***********************************
-%*** Package askinclude Question ***
-%***********************************
-%
-%Files, found by previous run in \include:
-% (-) title
-% (-) introduction
-% (-) chapter1
-% (+) chapter2
-% (-) chapter3
-% (+) summary
-%
-%Previous answer (noregexp):
-% [chapter2,summary]
-%...
-%\end{verbatim}
-%\end{quote}
-% |(+)| and |(-)| marks files that were and were not included in
-% the previous run. The file list and marks are not always correct.
-% For example, if \cs{include} statements are added or removed.
-% If the method of regular expression support is different,
-% then the marks only reflects the mode of the previous answer.
-%
-% \subsection{Single asking mode}
-% \label{sec:single}
-%
-% The special answer `|?|' trigger single asking mode,
-% at the next \cs{include} the user is asked again:
-%\begin{quote}
-%\begin{verbatim}
-%***********************************
-%*** Package askinclude Question ***
-%***********************************
-%
-%Include `title'? [y]es, [n]o, [A]ll, [N]one, [D]efault (n):
-%
-%\answer=
-%\end{verbatim}
-%\end{quote}
-% Use the letter inside the square brackets as answer.
-% An empty string uses the default answer, the letter in parentheses.
-% The answers are:
-% \begin{description}
-% \def\Item[#1]{\item[{[\texttt{#1}]:}]}
-% \Item[y] The file is included.
-% \Item[n] The file is excluded.
-% \Item[A] This file and all following files are included.
-% \Item[N] This file and all following files are excluded.
-% \Item[D] Use the default answer for this and all following files.
-% \end{description}
-% If the file is known from the previous run, then the
-% default is `|y|' or `|n|' corresponding to the mark
-% `|(+)|' or `|(-)|' in the list of previous files.
-% Otherwise `|y|' is used as default.
-%
-% \subsection{Regular expressions}
-% \label{sec:regexp}
-%
-% Three methods are available that can also set by package options:
-% \begin{description}
-% \def\Item[#1]{\item[\xoption{#1}:]}
-% \Item[noregexp] Regular expression support is disabled.
-% \Item[makematch] Use package \xpackage{makematch}.
-% \Item[pdfmatch] Use \pdfTeX's \cs{pdfmatch} if available.
-% \end{description}
-% Without options the value remembered in the auxiliary file
-% is used, otherwise the default is \xoption{noregexp}.
-%
-% \subsubsection{Method \xoption{makematch}}
-%
-% Package \xpackage{makematch} (part of \xpackage{qstest}), written
-% by David Kastrup provides pattern matching based on wildcards:
-% \begin{description}
-% \item[{[\texttt{*}]}:] The star matches zero or more characters.
-% Thus a lonely star machtes anything.
-% \item[{[\texttt{!}]}:] The exclamation mark at the begin of a
-% pattern negates it, thus the matching files are excluded.
-% \end{description}
-% The pattern list is evaluated for a file name from left to
-% right. Always a file name must match the whole pattern.
-% The file is included if it is matched by a pattern and
-% not excluded afterwards. Examples:
-% \begin{quote}
-% \def\no{\textrm{$\emptyset$}}
-% \begin{tabular}{>{\ttfamily}l|>{\ttfamily}l|>{\ttfamily}l}
-% \textrm{Pattern list} & \textrm{File names} & \textrm{Result}\\
-% \hline
-% foobar & foobar,dummy & foobar\\
-% foo* & foobar,xfoobar & foobar\\
-% \relax *foo* & xfoobar & xfoobar\\
-% f*b*r & foobar & foobar\\
-% \relax * & any & any\\
-% !foobar & foobar,other & other\\
-% !foo* & xfoobar & xfoobar\\
-% in*,!*dex & intro,index & intro\\
-% !index,in* & intro,index & intro,index\\
-% \relax *,!chap2 & chap1,chap2,chap3 & chap1,chap3\\
-% \end{tabular}
-% \end{quote}
-% The example in the last line shows, how the behaviour of package
-% \xpackage{excludeonly} \cite{excludeonly} can be simulated.
-%
-% The documentation of package \xpackage{makematch} tells the
-% the empty pattern does not match anything. But if you answer
-% the question with an empty string the answer of the previous
-% run is used. Also curly braces are not reliable because the
-% can get stripped during the processing of the answer.
-% Using a pair of empty curly braces or the comma for two empty
-% patterns currently works, but this is specific for the current
-% implementation and may change in future. But the special
-% answer `-' is available.
-%
-% \subsubsection{Method \xoption{pdfmatch}}
-%
-% In \pdfTeX\ 1.30 the new primitive \cs{pdfmatch} was introduced.
-% It is not documented yet, because it was not decided if it remains
-% and which implementation of regular expressions should be used.
-% Thus the situation may change in later versions of \pdfTeX.
-% Currently (1.30 until 1.40) it uses a library for POSIX 1003.2 regular
-% expressions, see manual page ``regex(7)''.
-%
-% If a pattern in the pattern list is invalid, the package prints
-% a warning and removes the pattern from the list. Actually there
-% are two warnings, the other warning is generated by \pdfTeX\ itself.
-%
-% In opposite to \xoption{makematch} the pattern only needs to
-% match the specified part of the file name.
-% For matching the whole name, the symbols `|^|' and `|$|' for
-% begin and end of string must be included.
-%
-% Additionally an initial exclamation mark `|!|' implements the
-% same logic as method \xoption{makematch}. The match result is
-% inverted, the matched file excluded.
-%
-% Examples:
-% \begin{quote}
-% \def\no{\textrm{$\emptyset$}}
-% \begin{tabular}{>{\ttfamily}l|>{\ttfamily}l|>{\ttfamily}l}
-% \textrm{Pattern list} & \textrm{File names} & \textrm{Result}\\
-% \hline
-% foobar & foobar,dummy & foobar\\
-% foo.* & foobar,xfoobar & foobar,xfoobar\\
-% |^|foo.* & foobar,xfoobar & foobar\\
-% foo|$| & foo,foobar & foo\\
-% fo?bar & fbar,fobar,foobar & fbar,fobar\\
-% fo+bar & fbar,fobar,foobar & fobar,foobar\\
-% fo*bar & fbar,fobar,foobar & fbar,fobar,foobar\\
-% chap3 & chap3,chap32 & chap1,chap3,chap32\\
-% chap[13] & chap1,chap2,chap3 & chap1,chap3\\
-% chap(1\string|3)|$| & chap1,chap3,chap33 & chap1,chap3\\
-% .* & any & any\\
-% !foobar & foobar,other & other\\
-% in.*,!dex & intro,index & intro\\
-% !index,in.* & intro,index & intro,index\\
-% .*,!chap2 & chap1,chap2,chap3 & chap1,chap3\\
-% .*,!bla & foo,bla,blabla & foo\\
-% .*,!|^|bla|$| & foo,bla,blabla & foo,blabla\\
-% \end{tabular}
-% \end{quote}
-% The example in the last line shows, how the behaviour of package
-% \xpackage{excludeonly} \cite{excludeonly} can be simulated.
-% As the third last line shows, that sometimes `|^|' and `|$|' can
-% be omitted, but this will not work always, shown in the second
-% last line.
-%
-% \subsection{History}
-%
-% Package \xpackage{askinclude} was invented by Pablo A. Straub in 1991
-% and maintained until 1994.
-% ^^A Email address: pablo.straub \symbol{64} gmail.com
-%
-% In October 2007 it was removed from ``TeX Live'' because of
-% the no-commercial license \cite{texlive}. Herbert Vo\ss\ initiated
-% a search for the author in the newsgroup \xnewsgroup{comp.text.tex}
-% \cite{newsthread} to ask him to change the license.
-%
-% It seems that the author could not be reached any more.
-% Joseph Wright suggested a reimplementation that I (HO) have done
-% as package \xpackage{askinc}. Soon it was enhanced by
-% feature requests.
-%
-% Then Ulrike Fischer found email addresses of the original author
-% and Jim Hefferon succeeded in contacting him. He allowed a change
-% of the license to LPPL and the transfer of the maintainership
-% to someone else.
-%
-% Thus I merged both packages as \xpackage{askinclude} in a new
-% major version 2. The license is LPPL.
-%
-% \subsection{New features of version 2}
-%
-% \begin{itemize}
-% \item License is now LPPL.
-% \item A list of \cs{include} files that are detected by the previous
-% run is printed before the question.
-% \item If the special answer `|?|' is given, then the user is
-% asked at each \cs{include}.
-% \item Support for regular expressions.
-% \item The remaining stuff in the \xfile{.aux} file does not
-% cause errors, if the package is removed.
-% \item The use of \cs{includeonly} before the package loading time
-% is detected and respected by taking precedence. After the package
-% is loaded, \cs{includeonly} is disabled and prints a warning.
-% \end{itemize}
-%
-% \subsection{Compatibility to version 1}
-%
-% \begin{itemize}
-% \item The user interface of version 1 with its special answers
-% `|*|', `|-|', and `' remain unchanged, but it is extended by
-% version 2 with the special answer `|?|' and support for
-% regular expressions can be enabled.
-% \item As reimplementation the internal macros have changed of course.
-% \item \xfile{.aux} files that are written by version 1.x will work
-% with version 2.x because \cs{@includeonly} is recognized.
-% \item \LaTeX\ 2.09: The package works as \cs{documentstyle} option
-% in compatibility mode of \LaTeXe. It is possible that it
-% will not work in pure \LaTeX\ 2.09.
-% \end{itemize}
-%
-% \StopEventually{
-% }
-%
-% \section{Implementation}
-%
-% \subsection{Header and catcodes}
-%
-% \begin{macrocode}
-%<*package>
-\NeedsTeXFormat{LaTeX2e}
-\begingroup\catcode61\catcode48\catcode32=10\relax%
- \catcode13=5 % ^^M
- \endlinechar=13 %
- \catcode123=1 % {
- \catcode125=2 % }
- \catcode64=11 % @
- \def\x{\endgroup
- \expandafter\edef\csname AskInc at AtEnd\endcsname{%
- \endlinechar=\the\endlinechar\relax
- \catcode13=\the\catcode13\relax
- \catcode32=\the\catcode32\relax
- \catcode35=\the\catcode35\relax
- \catcode61=\the\catcode61\relax
- \catcode64=\the\catcode64\relax
- \catcode123=\the\catcode123\relax
- \catcode125=\the\catcode125\relax
- }%
- }%
-\x\catcode61\catcode48\catcode32=10\relax%
-\catcode13=5 % ^^M
-\endlinechar=13 %
-\catcode35=6 % #
-\catcode64=11 % @
-\catcode123=1 % {
-\catcode125=2 % }
-\def\TMP at EnsureCode#1#2{%
- \edef\AskInc at AtEnd{%
- \AskInc at AtEnd
- \catcode#1=\the\catcode#1\relax
- }%
- \catcode#1=#2\relax
-}
-\TMP at EnsureCode{33}{12}% !
-\TMP at EnsureCode{39}{12}% '
-\TMP at EnsureCode{40}{12}% (
-\TMP at EnsureCode{41}{12}% )
-\TMP at EnsureCode{42}{12}% *
-\TMP at EnsureCode{43}{12}% +
-\TMP at EnsureCode{44}{12}% ,
-\TMP at EnsureCode{45}{12}% -
-\TMP at EnsureCode{46}{12}% .
-\TMP at EnsureCode{47}{12}% /
-\TMP at EnsureCode{58}{12}% :
-\TMP at EnsureCode{62}{12}% >
-\TMP at EnsureCode{63}{12}% ?
-\TMP at EnsureCode{91}{12}% [
-\TMP at EnsureCode{93}{12}% ]
-\TMP at EnsureCode{96}{12}% `
-\edef\AskInc at AtEnd{\AskInc at AtEnd\noexpand\endinput}
-\ProvidesPackage{askinclude}%
- [2019/12/09 v2.5 Interactive asking of included files]%
-% \end{macrocode}
-%
-% Luatex compat
-% \begin{macrocode}
-\ifx\pdfextension\@undefined\else
- \protected\def\pdflastobj {\numexpr\pdffeedback lastobj\relax}
- \protected\def\pdfnames {\pdfextension names }
- \protected\def\pdfobj {\pdfextension obj }
- \let\pdfoutput \outputmode
-\fi
-% \end{macrocode}
-%
-% \subsection{Delay action after preamble}
-%
-% \begin{macro}{\AskInc at AtBeginDocument}
-% Some actions such as \xfile{.aux} file writing cannot be
-% performed in the preamble. \cs{AtBeginDocument} delays
-% such action until |\begin{document}|. However \cs{AtBeginDocument}
-% must not be used after that time (\cs{@onlypreamble}).
-% Thus \cs{AskInc at AtBeginDocument} uses \cs{AtBeginDocument}
-% in the preamble and afterwards executes the code immediately.
-% \begin{macrocode}
-\AtBeginDocument{%
- \let\AskInc at AtBeginDocument\@firstofone
-}
-\providecommand*{\AskInc at AtBeginDocument}{\AtBeginDocument}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Write entry in \xfile{.aux} file}
-%
-% \begin{macro}{\AskInc at WriteAux}
-% The first argument is written to the main \xfile{.aux} file
-% and the second argument is executed if writing was possible.
-% Remember \cs{nofiles} prevents writing to auxiliary files.
-% \begin{macrocode}
-\def\AskInc at WriteAux#1#2{%
- \AskInc at AtBeginDocument{%
- \if at filesw
- \immediate\write\@mainaux{#1}%
- #2%
- \fi
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Remember \cs{include} files}
-%
-% \begin{macro}{\AskInc at CharHash}
-% \begin{macrocode}
-\edef\AskInc at CharHash{\string#}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\AskInc at WriteDefAddList}
-% \begin{macrocode}
-\def\AskInc at WriteDefAddList{%
- \AskInc at WriteAux{%
-% \end{macrocode}
-% \begin{macro}{\AskInc at AddList}
-% \begin{macrocode}
- \string\providecommand*\string\AskInc at AddList[2]{%
- \string\ifcase\string\ifx\AskInc at CharHash1\string\@undefined
- \string\else
- \string\ifx\AskInc at CharHash1\string\relax
- \string\else
- \string\ifx\AskInc at CharHash1\string\@empty
- \string\else
- 1%
- \string\fi
- \string\fi
- \string\fi
- 0 %
- \string\gdef\AskInc at CharHash1{\AskInc at CharHash2}%
- \string\else
- \string\g at addto@macro\AskInc at CharHash1{,\AskInc at CharHash2}%
- \string\fi
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
- }{%
- \global\let\AskInc at WriteDefAddList\relax
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at WriteDefAddFile}
-% \begin{macrocode}
-\def\AskInc at WriteDefAddFile{%
- \AskInc at WriteDefAddList
- \AskInc at WriteAux{%
-% \end{macrocode}
-% \begin{macro}{\AskInc at AddFile}
-% \begin{macrocode}
- \string\providecommand\string\AskInc at AddFile{%
- \string\AskInc at AddList\string\AskInc at Files
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
- }{%
- \global\let\AskInc at WriteDefAddFile\relax
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at AddFile}
-% \begin{macrocode}
-\AtBeginDocument{%
- \global\let\AskInc at AddFile\@gobble
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at WriteAddFile}
-% \begin{macrocode}
-\def\AskInc at WriteAddFile#1{%
- \AskInc at WriteDefAddFile
- \AskInc at WriteAux{%
- \string\AskInc at AddFile{#1}%
- }{}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at Files}
-% \begin{macrocode}
-\providecommand*{\AskInc at Files}{}
-% \end{macrocode}
-% \end{macro}
-%
-% \paragraph{Summary:}
-% Now \cs{AskInc at Files} is always defined
-% and either empty or contains a comma separated list of
-% \cs{include} files of previous run.
-%
-% The \cs{include} files are remembered by using
-% \cs{AskInc at WriteAddFile} at each \cs{include}.
-%
-% \subsection{Redefine \cs{include}}
-%
-% \begin{macro}{\AskInc at OrgInclude}
-% \begin{macrocode}
-\newcommand{\AskInc at OrgInclude}{}
-\let\AskInc at OrgInclude\include
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at AskFile}
-% \begin{macrocode}
-\let\AskInc at AskFile\@gobble
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at MatchFile}
-% \begin{macrocode}
-\let\AskInc at MatchFile\@gobble
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\include}
-% \begin{macrocode}
-\renewcommand*{\include}[1]{%
- \AskInc at WriteAddFile{#1}%
- \AskInc at AskFile{#1}%
- \AskInc at MatchFile{#1}%
- \AskInc at OrgInclude{#1}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Store answer and match method in \xfile{.aux} file}
-%
-% \begin{macrocode}
-\AtEndOfPackage{%
- \AtBeginDocument{%
- \@ifundefined{AskInc at Answer}{}{%
- \AskInc at WriteAux{%
- \string\gdef\string\AskInc at Answer{\AskInc at Answer}%
- }{}%
- }%
- \@ifundefined{AskInc at MatchMethod}{}{%
- \AskInc at WriteAux{%
- \string\gdef\string\AskInc at MatchMethod{\AskInc at MatchMethod}%
- }{}%
- }%
- }%
-}
-% \end{macrocode}
-%
-% \subsection{Support for \cs{@includeonly}}
-%
-% \begin{macro}{\@includeonly}
-% Macro \cs{@includeonly} is defined for compatiblity reasons only,
-% if the \xfile{.aux} file was written by versions before 2 of package
-% \xpackage{askinclude}.
-% \begin{macrocode}
-\providecommand*{\@includeonly}[1]{%
- \gdef\AskInc at Answer{#1}%
- \ifx\AskInc at Answer\@empty
- \gdef\AskInc at Answer{-}%
- \fi
- \global\let\AskInc at MatchMethod\@empty
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Stop if \cs{includeonly} is active}
-%
-% If \cs{includeonly} is used before, the questions are skipped
-% and the data in the main auxiliary file is preserved.
-% \begin{macrocode}
-\if at partsw
- \PackageWarningNoLine{askinclude}{%
- Previous \string\includeonly\space detected,\MessageBreak
- therefore asking for files is suppressed%
- }%
-% \end{macrocode}
-% Dummy options.
-% \begin{macrocode}
- \DeclareOption{makematch}{}%
- \DeclareOption{pdfmatch}{}%
- \DeclareOption{noregexp}{}%
- \ProcessOptions*%
-% \end{macrocode}
-% Preserve \cs{AskInc at MatchFiles}.
-% \begin{macrocode}
- \@ifundefined{AskInc at MatchFiles}{%
- }{%
- \ifx\AskInc at MatchMethod\@empty
- \else
- \AskInc at WriteAux{%
- \string\gdef\string\AskInc at MatchFiles{\AskInc at MatchFiles}%
- }{}%
- \fi
- }%
- \expandafter\AskInc at AtEnd
-\fi%
-% \end{macrocode}
-%
-% \subsection{\cs{includeonly}}
-%
-% \begin{macro}{\AskInc at OrgIncludeOnly}
-% \begin{macrocode}
-\newcommand{\AskInc at OrgIncludeOnly}{}%
-\let\AskInc at OrgIncludeOnly\includeonly
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\includeonly}
-% \begin{macrocode}
-\renewcommand*{\includeonly}[1]{%
- \PackageWarning{askinclude}{%
- \string\includeonly\space is managed by package `askinclude',%
- \MessageBreak
- therefore it is ignored%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Options}
-%
-% \begin{macro}{\AskInc at StringNoRegExp}
-% \begin{macrocode}
-\def\AskInc at StringNoRegExp{noregexp}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at StringMakeMatch}
-% \begin{macrocode}
-\def\AskInc at StringMakeMatch{makematch}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at StringPdfMatch}
-% \begin{macrocode}
-\def\AskInc at StringPdfMatch{pdfmatch}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ifAskInc at PdfMatchAvailable}
-% \begin{macrocode}
-\newif\ifAskInc at PdfMatchAvailable
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname pdfmatch\endcsname\relax
-\else
- \AskInc at PdfMatchAvailabletrue
-\fi
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-\DeclareOption{makematch}{%
- \let\AskInc at MatchOption\AskInc at StringMakeMatch
-}
-\ifAskInc at PdfMatchAvailable
- \DeclareOption{pdfmatch}{%
- \let\AskInc at MatchOption\AskInc at StringPdfMatch
- }%
-\else
- \DeclareOption{pdfmatch}{%
- \PackageWarningNoLine{askinclude}{%
- Option `pdfmatch' is not available because\MessageBreak
- your pdfTeX does not provide \string\pdfmatch
- }%
- }%
-\fi
-\DeclareOption{noregexp}{%
- \let\AskInc at MatchOption\@empty
-}
-\ProcessOptions*
-% \end{macrocode}
-%
-% \subsection{Strings}
-%
-% \begin{macro}{\AskInc at CharAsterisk}
-% \begin{macrocode}
-\def\AskInc at CharAsterisk{*}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at CharMinus}
-% \begin{macrocode}
-\def\AskInc at CharMinus{-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at CharPlus}
-% \begin{macrocode}
-\def\AskInc at CharPlus{+}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at CharQuestion}
-% \begin{macrocode}
-\def\AskInc at CharQuestion{?}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at CharExclam}
-% \begin{macrocode}
-\def\AskInc at CharExclam{!}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at CharYes}
-% \begin{macrocode}
-\def\AskInc at CharYes{y}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at CharNo}
-% \begin{macrocode}
-\def\AskInc at CharNo{n}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at CharAll}
-% \begin{macrocode}
-\def\AskInc at CharAll{A}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at CharNone}
-% \begin{macrocode}
-\def\AskInc at CharNone{N}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at CharDefault}
-% \begin{macrocode}
-\def\AskInc at CharDefault{D}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Set defaults}
-%
-% \begin{macro}{\AskInc at SanitizeAnswer}
-% \begin{macrocode}
-\def\AskInc at SanitizeAnswer#1#2{%
- \begingroup
- \escapechar=`\\%
- \edef\[{\string\[}%
- \edef\]{\string\]}%
- \edef\({\string\(}%
- \edef\){\string\)}%
- \edef\*{\string\*}%
- \edef\+{\string\+}%
- \edef\?{\string\?}%
- \edef\|{\string\|}%
- \edef\^{\string\^}%
- \edef\${\string\$}%
- \edef\{{\string\{}%
- \edef\}{\string\}}%
- \edef\.{\string\.}%
- \xdef#1{%
- \expandafter\expandafter\expandafter\zap at space
- \expandafter#2\space\@empty
- }%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\AtBeginDocument{%
- \@ifundefined{AskInc at Answer}{%
- \global\let\AskInc at Answer\AskInc at CharAsterisk
- }{%
- \AskInc at SanitizeAnswer\AskInc at Answer\AskInc at Answer
- }%
- \global\let\AskInc at PreviousAnswer\AskInc at Answer
- \@ifundefined{AskInc at MatchMethod}{%
- \global\let\AskInc at MatchMethod\@empty
- }{}%
- \global\let\AskInc at PreviousMatchMethod\AskInc at MatchMethod
- \@ifundefined{AskInc at MatchOption}{%
- \let\AskInc at MatchOption\AskInc at MatchMethod
- }{}%
- \ifx\AskInc at MatchOption\AskInc at StringPdfMatch
- \ifAskInc at PdfMatchAvailable
- \else
- \let\AskInc at MatchOption\@empty
- \fi
- \fi
- \@ifundefined{AskInc at MatchFiles}{%
- \let\AskInc at MatchFiles\@empty
- }{}%
-}
-% \end{macrocode}
-%
-% \subsection{Questions}
-%
-% \subsubsection{Generic question header}
-%
-% \begin{macro}{\AskInc at QuestionHeader}
-% \begin{macrocode}
-\def\AskInc at QuestionHeader{%
- \typeout{}%
- \typeout{***********************************}%
- \typeout{*** Package askinclude Question ***}%
- \typeout{***********************************}%
- \typeout{}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Display files}
-%
-% \begin{macro}{\AskInc at TypeoutFiles}
-% \begin{macrocode}
-\def\AskInc at TypeoutFiles{%
- \global\let\AskInc at PreviousMatches\@empty
- \ifx\AskInc at Files\@empty
- \else
- \typeout{Files, found by previous run in \string\include:}%
- \@for\AskInc at File:=\AskInc at Files\do{%
- \ifx\AskInc at Answer\AskInc at CharAsterisk
- \let\AskInc at Mark\AskInc at CharPlus
- \else
- \let\AskInc at Mark\AskInc at CharMinus
- \ifx\AskInc at Answer\AskInc at CharMinus
- \else
- \ifx\AskInc at MatchMethod\@empty
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- {\@for\AskInc at Temp:=\AskInc at Answer}%
- {\@for\AskInc at Temp:=\AskInc at MatchFiles}%
- \do{%
- \ifx\AskInc at File\AskInc at Temp
- \let\AskInc at Mark\AskInc at CharPlus
- \fi
- }%
- \fi
- \fi
- \typeout{ \@spaces(\AskInc at Mark) \AskInc at File}%
- \ifx\AskInc at Mark\AskInc at CharPlus
- \ifx\AskInc at PreviousMatches\@empty
- \global\let\AskInc at PreviousMatches\AskInc at File
- \else
- \expandafter\g at addto@macro
- \expandafter\AskInc at PreviousMatches{%
- \expandafter,\AskInc at File
- }%
- \fi
- \fi
- }%
- \typeout{}%
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Previous answer}
-%
-% \begin{macro}{\AskInc at TypeoutPreviousAnswer}
-% \begin{macrocode}
-\def\AskInc at TypeoutPreviousAnswer{%
- \typeout{%
- Previous answer (%
- \ifx\AskInc at MatchMethod\@empty
- noregexp%
- \else
- \AskInc at MatchMethod
- \fi
- ):%
- }%
- \typeout{ \@spaces[\AskInc at Answer]}%
- \typeout{}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Current regular expression support}
-%
-% \begin{macro}{\AskInc at TypeoutMatchMethod}
-% \begin{macrocode}
-\def\AskInc at TypeoutMatchMethod{%
- \typeout{Regular expressions:}%
- \AskInc at TypeoutMethod\@empty{noregexp}{%
- \space disabled%
- }%
- \AskInc at TypeoutMethod\AskInc at StringMakeMatch{makematch}{%
- enabled, using package `makematch'%
- }%
- \ifAskInc at PdfMatchAvailable
- \AskInc at TypeoutMethod\AskInc at StringPdfMatch{pdfmatch}{%
- \space enabled, using pdfTeX's \string\pdfmatch
- }%
- \fi
- \typeout{}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at TypeoutMethod}
-% \begin{macrocode}
-\def\AskInc at TypeoutMethod#1#2#3{%
- \typeout{%
- \ifx#1\AskInc at MatchOption \space--> \else\@spaces\space\fi
- [#2] #3% hash-ok
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Main question text}
-%
-% \begin{macro}{\AskInc at TypeoutMainQuestion}
-% \begin{macrocode}
-\def\AskInc at TypeoutMainQuestion{%
- \typeout{Which files do you want to include?}%
- \typeout{ \@spaces[foo,bar] \space\space
- comma separated file or pattern list}%
- \typeout{ \@spaces[*] \@spaces\@spaces all files}%
- \typeout{ \@spaces[-] \@spaces\@spaces no files}%
- \typeout{ \@spaces[?] \@spaces\@spaces ask for each file}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Main question}
-%
-% \begin{macro}{\AskInc at MainQuestion}
-% \begin{macrocode}
-\def\AskInc at MainQuestion{%
- \AskInc at QuestionHeader
- \AskInc at TypeoutFiles
- \AskInc at TypeoutPreviousAnswer
- \AskInc at TypeoutMatchMethod
- \AskInc at TypeoutMainQuestion
- \begingroup
- \@makeother\*%
- \@makeother\-%
- \@makeother\?%
- \@makeother\,%
- \@makeother\!%
- \@makeother\^%
- \@makeother\$%
- \@makeother\(%
- \@makeother\)%
- \@makeother\+%
- \@makeother\[%
- \@makeother\]%
- \@makeother\\%
- \@makeother\|%
- \@makeother\:%
- \@makeother\.%
- \typein[\answer]%
- { \@spaces[] \space\@spaces\@spaces use the previous answer}%
- \typeout{}%
- \AskInc at SanitizeAnswer\AskInc@@Answer\answer
- \endgroup
- \let\AskInc at Next\AskInc at MainQuestion
- \ifx\AskInc@@Answer\AskInc at StringNoRegExp
- \let\AskInc at MatchOption\@empty
- \else
- \ifx\AskInc@@Answer\AskInc at StringMakeMatch
- \let\AskInc at MatchOption\AskInc at StringMakeMatch
- \else
- \ifx\AskInc@@Answer\AskInc at StringPdfMatch
- \ifAskInc at PdfMatchAvailable
- \let\AskInc at MatchOption\AskInc at StringPdfMatch
- \else
- \PackageWarning{askinclude}{%
- Method `pdfmatch' is not available because\MessageBreak
- your pdfTeX does not provide \string\pdfmatch
- }%
- \let\AskInc at MatchOption\@empty
- \fi
- \else
- \ifx\AskInc@@Answer\@empty
- \global\let\AskInc@@Answer\AskInc at Answer
- \fi
- \let\AskInc at Next\AskInc at MainAnswer
- \fi
- \fi
- \fi
- \AskInc at Next
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Evaluate answer of main question}
-%
-% \begin{macro}{\AskInc at MainAnswer}
-% \begin{macrocode}
-\def\AskInc at MainAnswer{%
- \ifx\AskInc@@Answer\AskInc at CharQuestion
- \global\let\AskInc at Answer\@empty
- \global\let\AskInc at MatchMethod\@empty
- \global\let\AskInc at AskFile\AskInc at DoAskFile
- \AskInc at OrgIncludeOnly{}%
- \else
- \global\let\AskInc at Answer\AskInc@@Answer
- \ifx\AskInc@@Answer\AskInc at CharAsterisk
- \global\let\AskInc at MatchMethod\@empty
- \else
- \ifx\AskInc@@Answer\AskInc at CharMinus
- \global\let\AskInc at MatchMethod\@empty
- \AskInc at OrgIncludeOnly{}%
- \else
- \global\let\AskInc at MatchMethod\AskInc at MatchOption
- \ifx\AskInc at MatchOption\@empty
- \expandafter\AskInc at OrgIncludeOnly\expandafter{%
- \AskInc at Answer
- }%
- \else
- \AskInc at MatchInit
- \AskInc at OrgIncludeOnly{}%
- \fi
- \fi
- \fi
- \fi
- \let\AskInc at Include\AskInc at DoInclude
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\AskInc at MatchInit}
-% \begin{macrocode}
-\def\AskInc at MatchInit{%
- \RequirePackage{kvsetkeys}[2007/09/29]%
- \expandafter\comma at normalize\expandafter{\AskInc at Answer}%
- \global\let\AskInc at MatchList\comma at list
-% \end{macrocode}
-% \begin{macro}{\AskInc at MatchFile}
-% \begin{macrocode}
- \def\AskInc at MatchFile##1{%
- \AskInc at DoMatch{##1}{%
- \AskInc at WriteAddMatch{##1}%
- \ifx\@partlist\@empty
- \gdef\@partlist{##1}%
- \else
- \g at addto@macro\@partlist{,##1}%
- \fi
- }%
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
- \ifx\AskInc at MatchMethod\AskInc at StringMakeMatch
- \AskInc at MakeMatchInit
- \else
- \AskInc at PdfMatchInit
- \fi
- \let\AskInc at MatchInit\@undefined
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at MakeMatchInit}
-% \begin{macrocode}
-\def\AskInc at MakeMatchInit{%
- \RequirePackage{makematch}%
-% \end{macrocode}
-% \begin{macro}{\AskInc at DoMatch}
-% \begin{macrocode}
- \def\AskInc at DoMatch##1{%
- \def\AskInc at Temp{%
- \MakeMatcher[,]\AskInc at Temp
- }%
- \expandafter\AskInc at Temp\expandafter{\AskInc at MatchList}%
- \AskInc at Temp{{##1}}\@firstofone\@gobble
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
- \let\AskInc at MakeMatchInit\@undefined
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at PdfMatchInit}
-% \begin{macrocode}
-\def\AskInc at PdfMatchInit{%
-% \end{macrocode}
-% \begin{macro}{\ifAskInc at Found}
-% \begin{macrocode}
- \newif\ifAskInc at Found
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at DoMatch}
-% \begin{macrocode}
- \def\AskInc at DoMatch##1{%
- \AskInc at Foundfalse
- \expandafter\comma at parse@normalized\expandafter
- {\AskInc at MatchList}{\AskInc at CheckMatch{##1}}%
- \ifAskInc at Found
- \expandafter\@firstofone
- \else
- \expandafter\@gobble
- \fi
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at CheckMatch}
-% \begin{macrocode}
- \def\AskInc at CheckMatch##1##2{%
- \AskInc@@CheckMatch##2\@empty\@nil{##1}%
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc@@CheckMatch}
-% \begin{macrocode}
- \def\AskInc@@CheckMatch##1##2\@nil##3{%
- \def\AskInc at Temp{##1}%
- \ifx\AskInc at Temp\AskInc at CharExclam
- \ifcase\pdfmatch{##2}{##3}=1 %
- \or
- \AskInc at Foundfalse
- \else
- \AskInc at InvalidPattern{##2}{##1##2}%
- \fi
- \else
- \ifcase\pdfmatch{##1##2}{##3} %
- \or
- \AskInc at Foundtrue
- \else
- \AskInc at InvalidPattern{##1##2}{##1##2}%
- \fi
- \fi
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at InvalidPattern}
-% Prints a warning with the regular expression and
-% removes it from the list to prevent further warnings
-% for the same expression.
-% \begin{macrocode}
- \def\AskInc at InvalidPattern##1##2{%
- \edef\AskInc at Temp{##1}%
- \PackageWarningNoLine{askinclude}{%
- Invalid pattern `\AskInc at Temp' for \string\pdfmatch
- }%
- \edef\AskInc at Temp{##2}%
- \global\expandafter\let\expandafter\AskInc at MatchList
- \expandafter\@empty
- \expandafter\comma at parse@normalized\expandafter
- {\AskInc at MatchList}\AskInc at FilterPattern
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at FilterPattern}
-% \begin{macrocode}
- \def\AskInc at FilterPattern##1{%
- \edef\AskInc at Pattern{##1}%
- \ifx\AskInc at Temp\AskInc at Pattern
- \else
- \ifx\AskInc at MatchList\@empty
- \global\let\AskInc at MatchList\AskInc at Pattern
- \else
- \expandafter\g at addto@macro\expandafter\AskInc at MatchList{%
- \expandafter,\AskInc at Pattern
- }%
- \fi
- \fi
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
- \let\AskInc at PdfMatchInit\@undefined
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\AskInc at WriteDefAddMatch}
-% \begin{macrocode}
-\def\AskInc at WriteDefAddMatch{%
- \AskInc at WriteDefAddList
- \AskInc at WriteAux{%
-% \end{macrocode}
-% \begin{macro}{\AskInc at AddMatch}
-% \begin{macrocode}
- \string\providecommand\string\AskInc at AddMatch{%
- \string\AskInc at AddList\string\AskInc at MatchFiles
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
- }{%
- \global\let\AskInc at WriteDefAddMatch\relax
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at AddMatch}
-% \begin{macrocode}
-\AtBeginDocument{%
- \global\let\AskInc at AddMatch\@gobble
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at WriteAddMatch}
-% \begin{macrocode}
-\def\AskInc at WriteAddMatch#1{%
- \AskInc at WriteDefAddMatch
- \AskInc at WriteAux{%
- \string\AskInc at AddMatch{#1}%
- }{}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\AskInc at SaveAnswer}
-% \begin{macrocode}
-\def\AskInc at SaveAnswer{%
- \AskInc at WriteAux{%
- \string\gdef\string\AskInc at Answer{\AskInc at Answer}%
- }{}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Ask for each file}
-%
-% \begin{macro}{\AskInc at PreviousAnswer}
-% \begin{macrocode}
-\@ifundefined{AskInc at PreviousAnswer}{%
- \let\AskInc at PreviousAnswer\AskInc at CharAsterisk
-}{}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at PreviousMatchMethod}
-% \begin{macrocode}
-\@ifundefined{AskInc at PreviousMatchMethod}{%
- \let\AskInc at PreviousMatchMethod\@empty
-}{}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at DoAskFile}
-% \begin{macrocode}
-\def\AskInc at DoAskFile#1{%
- \edef\AskInc at File{#1}%
- \ifx\AskInc at PreviousAnswer\AskInc at CharAsterisk
- \let\AskInc at Default\AskInc at CharYes
- \else
- \let\AskInc at Default\AskInc at CharNo
- \ifx\AskInc at PreviousAnswer\AskInc at CharMinus
- \else
- \ifx\AskInc at PreviousMatchMethod\@empty
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- {\@for\AskInc at Temp:=\AskInc at PreviousAnswer}%
- {\@for\AskInc at Temp:=\AskInc at MatchFiles}%
- \do{%
- \ifx\AskInc at Temp\AskInc at File
- \let\AskInc at Default\AskInc at CharYes
- \fi
- }%
- \fi
- \ifx\AskInc at Default\AskInc at CharNo
- \let\AskInc at Default\AskInc at CharYes
- \@for\AskInc at Temp:=\AskInc at Files\do{%
- \ifx\AskInc at Temp\AskInc at File
- \let\AskInc at Default\AskInc at CharNo
- \fi
- }%
- \fi
- \fi
- \let\AskInc@@QuestionHeader\AskInc at QuestionHeader
- \AskInc at AskQuestion
- \ifx\AskInc at AskResult\AskInc at CharYes
- \ifx\AskInc at Answer\@empty
- \gdef\AskInc at Answer{#1}%
- \else
- \g at addto@macro\AskInc at Answer{,#1}%
- \fi
- \AskInc at SaveAnswer
- \let\@partlist\AskInc at Answer
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\AskInc at AskQuestion}
-% \begin{macrocode}
-\def\AskInc at AskQuestion{%
- \let\AskInc at Temp\answer
- \AskInc@@QuestionHeader
- \let\AskInc@@QuestionHeader\relax
- \typein[\answer]{%
- Include `\AskInc at File'? [y]es, [n]o, [A]ll, [N]one, [D]efault %
- (\AskInc at Default):%
- }%
- \typeout{}%
- \let\AskInc at AskResult\answer
- \let\answer\AskInc at Temp
- \ifx\AskInc at AskResult\@empty
- \let\AskInc at AskResult\AskInc at Default
- \let\AskInc at Next\relax
- \else
- \ifx\AskInc at AskResult\AskInc at CharYes
- \let\AskInc at Next\relax
- \else
- \ifx\AskInc at AskResult\AskInc at CharNo
- \let\AskInc at Next\relax
- \else
- \ifx\AskInc at AskResult\AskInc at CharAll
- \gdef\AskInc at AskQuestion{%
- \let\AskInc at AskResult\AskInc at CharYes
- }%
- \else
- \ifx\AskInc at AskResult\AskInc at CharNone
- \gdef\AskInc at AskQuestion{%
- \let\AskInc at AskResult\AskInc at CharNo
- }%
- \else
- \ifx\AskInc at AskResult\AskInc at CharDefault
- \gdef\AskInc at AskQuestion{%
- \let\AskInc at AskResult\AskInc at Default
- }%
- \else
- \PackageWarningNoLine{askinclude}{%
- Invalid answer [\AskInc at AskResult].\MessageBreak
- Answer must be one letter out of [ynAND]%
- }%
- \fi
- \fi
- \fi
- \let\AskInc at Next\AskInc at AskQuestion
- \fi
- \fi
- \fi
- \AskInc at Next
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\AtBeginDocument{\AskInc at MainQuestion}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\AskInc at AtEnd%
-%</package>
-% \end{macrocode}
-% \section{Installation}
-%
-% \subsection{Download}
-%
-% \paragraph{Package.} This package is available on
-% CTAN\footnote{\CTANpkg{askinclude}}:
-% \begin{description}
-% \item[\CTAN{macros/latex/contrib/askinclude/askinclude.dtx}] The source file.
-% \item[\CTAN{macros/latex/contrib/askinclude/askinclude.pdf}] Documentation.
-% \end{description}
-%
-%
-% \paragraph{Bundle.} All the packages of the bundle `askinclude'
-% are also available in a TDS compliant ZIP archive. There
-% the packages are already unpacked and the documentation files
-% are generated. The files and directories obey the TDS standard.
-% \begin{description}
-% \item[\CTANinstall{install/macros/latex/contrib/askinclude.tds.zip}]
-% \end{description}
-% \emph{TDS} refers to the standard ``A Directory Structure
-% for \TeX\ Files'' (\CTANpkg{tds}). Directories
-% with \xfile{texmf} in their name are usually organized this way.
-%
-% \subsection{Bundle installation}
-%
-% \paragraph{Unpacking.} Unpack the \xfile{askinclude.tds.zip} in the
-% TDS tree (also known as \xfile{texmf} tree) of your choice.
-% Example (linux):
-% \begin{quote}
-% |unzip askinclude.tds.zip -d ~/texmf|
-% \end{quote}
-%
-% \subsection{Package installation}
-%
-% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
-% \docstrip\ archive. The files are extracted by running the
-% \xfile{.dtx} through \plainTeX:
-% \begin{quote}
-% \verb|tex askinclude.dtx|
-% \end{quote}
-%
-% \paragraph{TDS.} Now the different files must be moved into
-% the different directories in your installation TDS tree
-% (also known as \xfile{texmf} tree):
-% \begin{quote}
-% \def\t{^^A
-% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
-% askinclude.sty & tex/latex/askinclude/askinclude.sty\\
-% askinclude.pdf & doc/latex/askinclude/askinclude.pdf\\
-% askinclude.dtx & source/latex/askinclude/askinclude.dtx\\
-% \end{tabular}^^A
-% }^^A
-% \sbox0{\t}^^A
-% \ifdim\wd0>\linewidth
-% \begingroup
-% \advance\linewidth by\leftmargin
-% \advance\linewidth by\rightmargin
-% \edef\x{\endgroup
-% \def\noexpand\lw{\the\linewidth}^^A
-% }\x
-% \def\lwbox{^^A
-% \leavevmode
-% \hbox to \linewidth{^^A
-% \kern-\leftmargin\relax
-% \hss
-% \usebox0
-% \hss
-% \kern-\rightmargin\relax
-% }^^A
-% }^^A
-% \ifdim\wd0>\lw
-% \sbox0{\small\t}^^A
-% \ifdim\wd0>\linewidth
-% \ifdim\wd0>\lw
-% \sbox0{\footnotesize\t}^^A
-% \ifdim\wd0>\linewidth
-% \ifdim\wd0>\lw
-% \sbox0{\scriptsize\t}^^A
-% \ifdim\wd0>\linewidth
-% \ifdim\wd0>\lw
-% \sbox0{\tiny\t}^^A
-% \ifdim\wd0>\linewidth
-% \lwbox
-% \else
-% \usebox0
-% \fi
-% \else
-% \lwbox
-% \fi
-% \else
-% \usebox0
-% \fi
-% \else
-% \lwbox
-% \fi
-% \else
-% \usebox0
-% \fi
-% \else
-% \lwbox
-% \fi
-% \else
-% \usebox0
-% \fi
-% \else
-% \lwbox
-% \fi
-% \else
-% \usebox0
-% \fi
-% \end{quote}
-% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
-% TDS installing feature, then some files can already be in the right
-% place, see the documentation of \docstrip.
-%
-% \subsection{Refresh file name databases}
-%
-% If your \TeX~distribution
-% (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh
-% these. For example, \TeX\,Live\ users run \verb|texhash| or
-% \verb|mktexlsr|.
-%
-% \subsection{Some details for the interested}
-%
-% \paragraph{Unpacking with \LaTeX.}
-% The \xfile{.dtx} chooses its action depending on the format:
-% \begin{description}
-% \item[\plainTeX:] Run \docstrip\ and extract the files.
-% \item[\LaTeX:] Generate the documentation.
-% \end{description}
-% If you insist on using \LaTeX\ for \docstrip\ (really,
-% \docstrip\ does not need \LaTeX), then inform the autodetect routine
-% about your intention:
-% \begin{quote}
-% \verb|latex \let\install=y\input{askinclude.dtx}|
-% \end{quote}
-% Do not forget to quote the argument according to the demands
-% of your shell.
-%
-% \paragraph{Generating the documentation.}
-% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
-% the documentation. The process can be configured by the
-% configuration file \xfile{ltxdoc.cfg}. For instance, put this
-% line into this file, if you want to have A4 as paper format:
-% \begin{quote}
-% \verb|\PassOptionsToClass{a4paper}{article}|
-% \end{quote}
-% An example follows how to generate the
-% documentation with pdf\LaTeX:
-% \begin{quote}
-%\begin{verbatim}
-%pdflatex askinclude.dtx
-%bibtex askinclude.aux
-%makeindex -s gind.ist askinclude.idx
-%pdflatex askinclude.dtx
-%makeindex -s gind.ist askinclude.idx
-%pdflatex askinclude.dtx
-%\end{verbatim}
-% \end{quote}
-%
-% \section{Acknowledgement}
-%
-% \begin{description}
-% \item[Tom Scavo]
-% suggested saving the include file list
-% from the previous run and a simplified user interface.
-% \item[Joseph Wright] suggested questions for each \cs{include}.
-% \end{description}
-%
-% \printbibliography[
-% heading=bibnumbered,
-% ]
-%
-% \begin{History}
-
-% \begin{Version}{1991/11/05 v0.95}
-% \item
-% First beta-test version (asked two questions).
-% \end{Version}
-% \begin{Version}{1991/11/05 v0.99}
-% \item
-% Second beta-test version (asks one question; uses `|*|' and `|-|').
-% \end{Version}
-% \begin{Version}{1991/11/07 v1.0}
-% \item
-% Changed prompts (sent to \xnewsgroup{comp.text.tex}):
-% \URL{``\link{Interactive inclusion of files in LaTeX}''}^^A
-% {https://groups.google.com/group/comp.text.tex/msg/34b770a7c277e79c}
-% \end{Version}
-% \begin{Version}{1991/12/13 v1.1}
-% \item
-% \textit{Unknown}.
-% \end{Version}
-% \begin{Version}{1994/11/02 v1.2e}
-% \item
-% Two small changes to run under LaTeX2e [RF].
-% \item
-% Additional documentation [TRS].
-% \end{Version}
-% \begin{Version}{2007/10/15 v1.0 (askinc)}
-% \item
-% Reimplementation, published as \xpackage{askinc} in
-% newsgroup \xnewsgroup{comp.text.tex}:\\
-% \URL{``\link{Re: askinclude.sty}''}^^A
-% {https://groups.google.com/group/comp.text.tex/msg/2d638b84a858fdc8}
-% \item
-% Listing of included files, collected from the previous run before
-% the question.
-% \item
-% No error message by \xfile{.aux} file if package is removed.
-% \end{Version}
-% \begin{Version}{2007/10/23 v2.0}
-% \item
-% The next version of \xpackage{askinc} becomes
-% version 2.0 of \xpackage{askinclude}.
-% \item
-% `|?|' added for questioning each file.
-% \item
-% \cs{includeonly} has precedence until package loading.
-% Then it is disabled by a warning.
-% \item
-% Documentation rewritten/added.
-% \item
-% Tests added.
-% \end{Version}
-% \begin{Version}{2008/08/11 v2.1}
-% \item
-% Code is not changed.
-% \item
-% URLs updated.
-% \end{Version}
-% \begin{Version}{2011/12/02 v2.2}
-% \item
-% Bibliography rewritten for biblatex.
-% \end{Version}
-% \begin{Version}{2016/05/14 v2.3}
-% \item
-% Luatex compatibility
-% \end{Version}
-% \begin{Version}{2018/11/01 v2.4}
-% \item
-% Remove luatex85 package dependency
-% \end{Version}
-% \begin{Version}{2019/12/09 v2.5}
-% \item
-% Documentation updates.
-% \end{Version}
-% \end{History}
-%
-% \PrintIndex
-%
-% \Finale
-\endinput
-% \begin{Version}{1991/11/05 v0.95}
-% \item
-% First beta-test version (asked two questions).
-% \end{Version}
-% \begin{Version}{1991/11/05 v0.99}
-% \item
-% Second beta-test version (asks one question; uses `|*|' and `|-|').
-% \end{Version}
-% \begin{Version}{1991/11/07 v1.0}
-% \item
-% Changed prompts (sent to \xnewsgroup{comp.text.tex}):
-% \URL{``\link{Interactive inclusion of files in LaTeX}''}^^A
-% {https://groups.google.com/group/comp.text.tex/msg/34b770a7c277e79c}
-% \end{Version}
-% \begin{Version}{1991/12/13 v1.1}
-% \item
-% \textit{Unknown}.
-% \end{Version}
-% \begin{Version}{1994/11/02 v1.2e}
-% \item
-% Two small changes to run under LaTeX2e [RF].
-% \item
-% Additional documentation [TRS].
-% \end{Version}
-% \begin{Version}{2007/10/15 v1.0 (askinc)}
-% \item
-% Reimplementation, published as \xpackage{askinc} in
-% newsgroup \xnewsgroup{comp.text.tex}:\\
-% \URL{``\link{Re: askinclude.sty}''}^^A
-% {https://groups.google.com/group/comp.text.tex/msg/2d638b84a858fdc8}
-% \item
-% Listing of included files, collected from the previous run before
-% the question.
-% \item
-% No error message by \xfile{.aux} file if package is removed.
-% \end{Version}
-% \begin{Version}{2007/10/23 v2.0}
-% \item
-% The next version of \xpackage{askinc} becomes
-% version 2.0 of \xpackage{askinclude}.
-% \item
-% `|?|' added for questioning each file.
-% \item
-% \cs{includeonly} has precedence until package loading.
-% Then it is disabled by a warning.
-% \item
-% Documentation rewritten/added.
-% \item
-% Tests added.
-% \end{Version}
-% \begin{Version}{2008/08/11 v2.1}
-% \item
-% Code is not changed.
-% \item
-% URLs updated.
-% \end{Version}
-% \begin{Version}{2011/12/02 v2.2}
-% \item
-% Bibliography rewritten for biblatex.
-% \end{Version}
-% \begin{Version}{2016/05/14 v2.3}
-% \item
-% Luatex compatibility
-% \end{Version}
-% \end{History}
-%
-% \PrintIndex
-%
-% \Finale
-\endinput
Modified: trunk/Master/texmf-dist/tex/latex/askinclude/askinclude.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/askinclude/askinclude.sty 2019-12-11 21:53:45 UTC (rev 53095)
+++ trunk/Master/texmf-dist/tex/latex/askinclude/askinclude.sty 2019-12-11 21:54:02 UTC (rev 53096)
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: askinclude
-%% Version: 2019/12/09 v2.5
+%% Version: 2019-12-10 v2.6
%%
%% Copyright (C)
%% 1991-1994 Pablo A. Straub
@@ -88,7 +88,7 @@
\TMP at EnsureCode{96}{12}% `
\edef\AskInc at AtEnd{\AskInc at AtEnd\noexpand\endinput}
\ProvidesPackage{askinclude}%
- [2019/12/09 v2.5 Interactive asking of included files]%
+ [2019-12-10 v2.6 Interactive asking of included files]%
\ifx\pdfextension\@undefined\else
\protected\def\pdflastobj {\numexpr\pdffeedback lastobj\relax}
\protected\def\pdfnames {\pdfextension names }
More information about the tex-live-commits
mailing list