summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-10-22 20:52:12 +0000
committerKarl Berry <karl@freefriends.org>2020-10-22 20:52:12 +0000
commit700c78615396e6d1751932b05cbab52007dd5e52 (patch)
treee002cabf9bbc1032573a57dab5fd93cc911da494 /Master
parent85c4ff192a502b4ea49d15cead3c8cd24e345623 (diff)
snapshot (22oct20)
git-svn-id: svn://tug.org/texlive/trunk@56735 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/snapshot/README126
-rw-r--r--Master/texmf-dist/doc/latex/snapshot/snapshot.pdfbin193747 -> 236859 bytes
-rw-r--r--Master/texmf-dist/source/latex/snapshot/snapshot.dtx920
-rw-r--r--Master/texmf-dist/source/latex/snapshot/snapshot.ins8
-rw-r--r--Master/texmf-dist/tex/latex/snapshot/snapshot.sty731
5 files changed, 1137 insertions, 648 deletions
diff --git a/Master/texmf-dist/doc/latex/snapshot/README b/Master/texmf-dist/doc/latex/snapshot/README
index 570861d37d4..4c50606d36c 100644
--- a/Master/texmf-dist/doc/latex/snapshot/README
+++ b/Master/texmf-dist/doc/latex/snapshot/README
@@ -1,17 +1,119 @@
-README for snapshot 2019/09/17
-https://www.ams.org/arc/resources/snapshot-about.html
-tech-support@ams.org
+README file for package snapshot 2.14 [2020/06/17]
-The snapshot package helps the owner of a LaTeX document
-obtain a list of the external dependencies of the document, in a
-form that can be embedded at the top of the document. To put it
-another way, it provides a snapshot of the current processing
-context of the document, insofar as it can be determined from
-inside LaTeX.
-
-Originally written by Michael J. Downes, the snapshot package
-is currently maintained by the American Mathematical Society.
+Copyright 1999-2003, 2004, 2010, 2012, 2020 American Mathematical Society.
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.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3c 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 Maintainer of this work is the American Mathematical
+Society.
+
+American Mathematical Society
+Technical Support
+Publications Technical Group
+201 Charles Street
+Providence, RI 02904
+USA
+tel: (401) 455-4080
+ (800) 321-4267 (USA and Canada only)
+fax: (401) 331-3842
+email: tech-support@ams.org
+
+========================================================================
+ CONTENTS
+I. OVERVIEW
+II. REMARKS ON THIS RELEASE
+II. CHANGE LOG
+
+========================================================================
+I. OVERVIEW
+
+Complete documentation of all package options is available in
+snapshot.pdf.
+
+Typical usage involves the following steps:
+
+1. Add a \RequirePackage statement at the top of the document:
+
+ \RequirePackage{snapshot}
+ \documentclass{article}
+
+ \usepackage{graphicx}
+
+ \begin{document}
+
+ hello, world
+
+ \end{document}
+
+ Note that snapshot should be the very first thing loaded, even
+ before the \documentclass. Otherwise snapshot will not be able to
+ capture the information for the document class and any packages
+ loaded inside it.
+
+2. Run LaTeX on the document. This will produce a dependency list in a
+ file \jobname.dep.
+
+3. Insert the .dep file at the top of the document, before
+ \documentclass. The following example shows what you would
+ typically end up with for a document that used the article
+ documentclass and the graphicx package:
+
+ \RequirePackage{snapshot}
+
+ \RequireVersions{
+ *{application}{pdfTeX} {0000/00/00 v1.40.21}
+ *{format} {LaTeX2e} {2020-02-02 v2.e}
+ *{package}{snapshot} {2020/06/17 v2.14}
+ *{class} {article} {2019/12/20 v1.4l}
+ *{file} {size10.clo} {2019/12/20 v1.4l}
+ *{package}{graphicx} {2019/11/30 v1.2a}
+ *{package}{keyval} {2014/10/28 v1.15}
+ *{package}{graphics} {2019/11/30 v1.4a}
+ *{package}{trig} {2016/01/03 v1.10}
+ *{file} {graphics.cfg}{2016/06/04 v1.11}
+ *{file} {dvips.def} {2017/06/20 v3.1d}
+ *{file} {l3backend-dvips.def}{2020-05-05 v3}
+ }
+
+ \documentclass{article}
+ [...]
+
+ Now each time you recompile the document, snapshot will compare the
+ list of files actually loaded against the list recorded in
+ \RequireVersions and warn you of any changes.
+
+========================================================================
+II. REMARKS ON THIS RELEASE
+
+Since the snapshot package was originally released, there has been a
+tremendous amount of evolution among TeX engines (what snapshot calls
+the "application"). In addition to the introduction of two major new
+engines, three other engines that were once distinct have effectively
+merged. The algorithm for detecting the identify of the engine has
+been updated to reflect the state of the TeX world as reflected in TeX
+Live 2020.
+
+COMPATIBILITY NOTE: As a result of these improvements, the
+*{application} entry of your documents will almost certainly change.
+The snapshot package does not warn of changes in this entry, but if
+you have an external application that makes use of this information,
+you will probably need to update it.
+
+========================================================================
+III. CHANGE LOG
+
+2020-06-17 snapshot.dtx v2.14
+ -- Added code to detect the aleph, ptex, eptex, uptex, euptex,
+ luatex, and xetex engines in addition to etex, pdftex, and
+ pdfetex. Also distinguish between the various engines which
+ incorporate the eTeX extensions.
+ -- Made snapshot more tolerant of macros in the optional argument
+ to \Provides... declarations.
diff --git a/Master/texmf-dist/doc/latex/snapshot/snapshot.pdf b/Master/texmf-dist/doc/latex/snapshot/snapshot.pdf
index 0dfa0f13f6c..45cc249e311 100644
--- a/Master/texmf-dist/doc/latex/snapshot/snapshot.pdf
+++ b/Master/texmf-dist/doc/latex/snapshot/snapshot.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/snapshot/snapshot.dtx b/Master/texmf-dist/source/latex/snapshot/snapshot.dtx
index f79605dbf6f..38c6b7d656f 100644
--- a/Master/texmf-dist/source/latex/snapshot/snapshot.dtx
+++ b/Master/texmf-dist/source/latex/snapshot/snapshot.dtx
@@ -1,6 +1,6 @@
% \def\filename{snapshot.dtx}
-% \def\fileversion{2.13}
-% \def\filedate{2012/08/06}
+% \def\fileversion{2.14}
+% \def\filedate{2020/06/17}
%
% \iffalse meta-comment
%
@@ -15,7 +15,7 @@
% fax: (401) 331-3842
% email: tech-support@ams.org
%
-% Copyright 1999-2003, 2004, 2010, 2012 American Mathematical Society.
+% Copyright 1999-2003, 2004, 2010, 2012, 2020 American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -35,7 +35,10 @@
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}
-\documentclass[oneside]{amsdtx}
+\documentclass{amsdtx}
+
+\usepackage{hyperref}
+
\providecommand{\qq}[1]{\textquotedblleft#1\textquotedblright}
\providecommand{\mdash}{\textemdash\penalty\exhyphenpenalty}
\providecommand{\lat}[1]{\protect\LaTeX{}}
@@ -44,12 +47,18 @@
\CodelineIndex
-\begin{document}
\title{The \pkg{snapshot} package}
-\author{American Mathematical Society\\Michael Downes}
+
+\author{American Mathematical Society}
+
\date{Version \fileversion, \filedate}
+
+\begin{document}
+
\DocInput{snapshot.dtx}
+
\PrintIndex
+
\end{document}
%</driver>
% \fi
@@ -57,6 +66,9 @@
% \MakeShortVerb{\|}
%
% \maketitle
+%
+% \tableofcontents
+%
% \section{Introduction}
%
% The \pkg{snapshot} package helps the owner of a \LaTeX{} document
@@ -122,7 +134,6 @@
% \begin{verbatim}
% \RequirePackage[log]{snapshot}
% \end{verbatim}
-%
% Making the necessary arrangements to ensure that future \latex/
% runs of the document actually call in the specified versions is a
% separate problem. The \pkg{snapshot} package only provides a way to
@@ -333,7 +344,7 @@
% Standard declaration of package name and date.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{snapshot}[2012/08/06 v2.13]
+\ProvidesPackage{snapshot}[2020/06/17 v2.14]
% \end{macrocode}
%
% Calling the \pkg{snapshot} package in a document causes \latex/ to
@@ -367,11 +378,17 @@
% their documents.
% \end{minipage}\end{center}
%
+% \begin{macro}{\@xp}
+% \begin{macro}{\@nx}
% A couple of shorthand forms.
% \begin{macrocode}
\let\@xp=\expandafter \let\@nx=\noexpand
% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
+% \begin{macro}{\str@cmp}
+% \begin{macro}{\str@equal}
% A function to compare two strings and return FT or TT (for use with
% \cs{if}).
% \begin{macrocode}
@@ -382,6 +399,8 @@
\str@cmp#1\relax\str@cmp#2{\relax\@gobbletwo}\@nil TT%
}
% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\RequireVersions}
%
@@ -390,86 +409,219 @@
% \tex/ inputs path.
% \begin{macrocode}
\newcommand{\RequireVersions}[2][]{}%
+
\renewcommand{\RequireVersions}[1][]{%
- \def\snap@check{\snap@compare@versions}%
- \toks@{#1}\afterassignment\snap@storem
- \let\@let@token=
+ \def\snap@check{\snap@compare@versions}%
+ \toks@{#1}%
+ \afterassignment\snap@storem
+ \let\@let@token=
}
+
+\@onlypreamble\RequireVersions
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\snap@storem}
+% \begin{macrocode}
\def\snap@storem{%
- \ifx\@let@token\bgroup
- \else
- \PackageError{snapshot}{Expected a `\@charlb' character here}\@ehc
- \@xp\@gobblefour
- \fi
- \futurelet\@let@token\snap@branch
+ \ifx\@let@token\bgroup \else
+ \PackageError{snapshot}{Expected a `\@charlb' character here}\@ehc
+ \@xp\@gobblefour
+ \fi
+ \futurelet\@let@token\snap@branch
}
-\@onlypreamble\RequireVersions
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@check}
% \begin{macrocode}
\let\snap@check\@gobble
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@finish}
% \begin{macrocode}
\def\snap@finish{\toks@\bgroup}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@branch}
% \begin{macrocode}
\def\snap@branch{%
- \ifx\@let@token\egroup
- \@xp\snap@finish
- \else\ifx\@let@token *%
- \let\reserved@c\snap@store@version
- \else\ifx\@let@token\@sptoken
- \lowercase{\def\reserved@c} {\futurelet\@let@token\snap@branch}%
- \else
- \let\reserved@c\snap@store@error
- \fi\fi\fi
- \reserved@c
+ \ifx\@let@token\egroup
+ \@xp\snap@finish
+ \else\ifx\@let@token *%
+ \let\reserved@c\snap@store@version
+ \else\ifx\@let@token\@sptoken
+ \lowercase{\def\reserved@c} {\futurelet\@let@token\snap@branch}%
+ \else
+ \let\reserved@c\snap@store@error
+ \fi\fi\fi
+ \reserved@c
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@store@error}
% \begin{macrocode}
\def\snap@store@error#1{%
- \PackageError{snapshot}{Expected '*' here, not '#1'}\@ehc
+ \PackageError{snapshot}{Expected '*' here, not '#1'}\@ehc
}
+
\@onlypreamble\snap@store@error
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@store@version}
% \begin{macrocode}
\def\snap@store@version #1#2#3#4{%
- \@xp\snap@store@b\csname snapx@#2\endcsname{#2}{#3}{#4}%
+ \@xp\snap@store@b\csname snapx@#2\endcsname{#2}{#3}{#4}%
}
+
\@onlypreamble\snap@store@version
% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Determining the engine}
+%
+% \begin{macro}{\snapshotApplication}
+
+% Check for the engines that are active in \TeX Live 2020. Note
+% that in in modern versions of \TeX Live, there is no distinction
+% between \fn{etex}, \fn{pdfetex}, and \fn{pdftex}. I believe this
+% code will distinguish between distinct legacy binaries, but I
+% have not tested this thoroughly. Similar remarks apply to the
+% p\TeX\ family.
%
-% Detection of e-\LaTeX{}, pdf\LaTeX{}, pdfe\LaTeX{}, and Lambda
-% [Omega]:
% \begin{macrocode}
-\ifx\OmegaVersion\@@undefined
-\else
- \edef\snapshotApplication{%
- {Omega}\space\space\space
- {0000/00/00 v\OmegaVersion}%
- }%
-\fi
-\ifx\eTeXversion\@@undefined
-\else
- \edef\snapshotApplication{%
- {eTeX}\space\space\space\space
- {0000/00/00 v\number\eTeXversion\eTeXrevision}%
- }%
+\let\snapshotApplication\@empty
+
+\ifx\OmegaVersion\@@undefined \else
+ \edef\snapshotApplication{%
+ \ifx\AlephVersion\@@undefined
+ {Omega}\space\space\space
+ {0000/00/00 v\OmegaVersion}%
+ \else
+ {Aleph}\space\space\space
+% \end{macrocode}
+% \cs{AlephVersion} appears to be incorrectly set to 0.0, so
+% include the Omega version as well.
+% \begin{macrocode}
+ {0000/00/00 v\OmegaVersion-\AlephVersion}%
+ \fi
+ }%
\fi
-\ifx\pdftexversion\@@undefined
-\else
- \edef\snapshotApplication{%
- \ifx\eTeXversion\@@undefined
- {pdfTeX}\space\space
+
+\ifx\ptexversion\@@undefined\else
+ \edef\snapshotApplication{%
+ {pTeX}\space\space\space\space
+ {0000/00/00 v\number\ptexversion
+ \ifx\ptexminorversion\undefined \u \else.\number\ptexminorversion\fi
+ \ifx\ptexrevision\undefined \u \else\ptexrevision\fi}%
+ }%
+ \ifx\uptexversion\@@undefined
+ \ifx\epTeXversion\@@undefined\else
+ \edef\snapshotApplication{%
+ {epTeX}\space\space\space
+ {0000/00/00 v\number\epTeXversion}%
+ }%
+ \fi
\else
- {pdfeTeX}\space
+ \ifx\epTeXversion\@@undefined
+ \edef\snapshotApplication{%
+ {upTeX}\space\space\space
+ {0000/00/00 v\number\uptexversion
+ \ifx\uptexrevision\undefined \u \else\uptexrevision\fi}%
+ }%
+ \else
+% \end{macrocode}
+% There is no separate \cs{euptexversion}, so use a combination of
+% the underlying up\TeX\ and ep\TeX\ versions.
+% \begin{macrocode}
+ \edef\snapshotApplication{%
+ {eupTeX}\space\space
+ {0000/00/00 v\number\uptexversion
+ \ifx\uptexrevision\undefined \u \else\uptexrevision\fi
+ --\number\epTeXversion}%
+ }%
+ \fi
+ \fi
+\fi
+
+\ifx\snapshotApplication\@empty
+ \ifx\XeTeXversion\@@undefined\else
+ \edef\snapshotApplication{%
+ {XeTeX}\space\space\space
+ {0000/00/00 v\number\XeTeXversion
+ \ifx\XeTeXrevision\undefined\else\XeTeXrevision\fi}%
+ }%
+ \fi
+\fi
+
+\ifx\snapshotApplication\@empty
+ \ifx\luatexversion\@@undefined\else
+ \begingroup
+ \@tempcnta\luatexversion
+ \divide\@tempcnta by 100
+ \edef\@tempa{\the\@tempcnta}%
+ \multiply\@tempcnta by 100
+ \@tempcntb\luatexversion
+ \advance\@tempcntb by -\@tempcnta
+ \edef\@tempa{\@tempa.\the\@tempcntb.\luatexrevision}%
+ \xdef\snapshotApplication{%
+ {luaTeX}\space\space
+ {0000/00/00 v\@tempa}%
+ }%
+ \endgroup
+ \fi
+\fi
+
+\ifx\snapshotApplication\@empty
+ \ifx\pdftexversion\@@undefined \else
+ \begingroup
+ \ifx\eTeXversion\@@undefined
+ \@tempswafalse
+ \else
+ \@tempswatrue
+ \fi
+ \@tempcnta\pdftexversion
+ \divide\@tempcnta by 100
+ \edef\@tempa{\the\@tempcnta}%
+ \multiply\@tempcnta by 100
+ \@tempcntb\pdftexversion
+ \advance\@tempcntb by -\@tempcnta
+% \end{macrocode}
+% e\TeX\ was folded into pdf\TeX\ as of version 1.40.
+% \begin{macrocode}
+ \ifnum\@tempcntb > 39
+ \@tempswafalse
+ \fi
+ \edef\@tempa{\@tempa.\the\@tempcntb.\pdftexrevision}%
+ \xdef\snapshotApplication{%
+ \if@tempswa
+ {pdfeTeX}\space
+ \else
+ {pdfTeX}\space\space
+ \fi
+ {0000/00/00 v\@tempa}%
+ }%
+ \endgroup
+ \fi
+\fi
+
+\ifx\snapshotApplication\@empty
+ \ifx\eTeXversion\@@undefined \else
+ \edef\snapshotApplication{%
+ {eTeX}\space\space\space\space
+ {0000/00/00 v\number\eTeXversion
+ \ifx\eTeXrevision\undefined
+ \ifx\eTeXminorversion\undefined\else.\number\eTeXminorversion\fi
+ \else
+ \eTeXrevision
+ \fi
+ }%
+ }%
\fi
- {0000/00/00 v0.\number\pdftexversion\pdftexrevision}%
- }%
\fi
% \end{macrocode}
% If none of the above information is available, the exact version
@@ -477,13 +629,14 @@
% fall back to using a nominal date of 1990/03/25, which is when
% version 3.0 of \fn{tex.web} was released by Knuth.
% \begin{macrocode}
-\@ifundefined{snapshotApplication}{%
- \edef\snapshotApplication{%
- {TeX}\space\space\space\space\space
- {1990/03/25 v3.x}%
- }%
-}{}
+\ifx\snapshotApplication\@empty
+ \edef\snapshotApplication{%
+ {TeX}\space\space\space\space\space
+ {1990/03/25 v3.x}%
+ }%
+\fi
% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
\def\@fmtextension{fmt}
@@ -499,57 +652,62 @@
\expandafter\let\csname snapx@-------\endcsname\snapx@end
% \end{macrocode}
%
+% \begin{macro}{\snap@store@b}
% For a package named \fn{foo.sty}, this function defines
% \cs{rqv@foo.sty} to hold the date and version information.
% \begin{macrocode}
\def\snap@store@b#1#2#3#4{%
- \ifx#1\snapx@end
- \@xp\snap@finish
- \else
- \ifx#1\relax \let#1\@empty\fi
- \def\@tempa##1 ##2 ##3\@nil{##1 ##2}%
+ \ifx#1\snapx@end
+ \@xp\snap@finish
+ \else
+ \ifx#1\relax \let#1\@empty\fi
+ \def\@tempa##1 ##2 ##3\@nil{##1 ##2}%
% \end{macrocode}
%
% \begin{macrocode}
- \ifx#1\snapx@application
- \@xp\xdef\csname rqv@#3#1\endcsname{\@tempa#4 v?.? ? \relax\@nil}%
- \else
- \xdef\rqv@list{\rqv@list{#3#1}}%
- \@xp\xdef\csname rqv@#3#1\endcsname{\@tempa#4 v?.? ? \relax\@nil}%
- \snap@intest{#3}{#1}%
- \ifx#1\snapx@format \snap@check{#3.fmt}%
+ \ifx#1\snapx@application
+ \@xp\xdef\csname rqv@#3#1\endcsname{\@tempa#4 v?.? ? \relax\@nil}%
+ \else
+ \xdef\rqv@list{\rqv@list{#3#1}}%
+ \@xp\xdef\csname rqv@#3#1\endcsname{\@tempa#4 v?.? ? \relax\@nil}%
+ \snap@intest{#3}{#1}%
+ \ifx#1\snapx@format \snap@check{#3.fmt}\else
% \end{macrocode}
% Test if current file is \fn{snapshot.sty}. Need to pre-expand the
% extension part to ensure the test is correct.
% \begin{macrocode}
- \else
- \edef\@tempa{\@nx\string@equal{snapshot.sty}{#3#1}}%
- \if\@tempa \snap@selfcheck \fi
- \fi
+ \edef\@tempa{\@nx\string@equal{snapshot.sty}{#3#1}}%
+ \if\@tempa \snap@selfcheck \fi
+ \fi
+ \fi
\fi
- \fi
- \futurelet\@let@token\snap@branch
+ \futurelet\@let@token\snap@branch
}
+
\@onlypreamble\snap@store@b
% \end{macrocode}
-% \end{macro}
+% \end{macro}
%
+% \begin{macro}{\snap@write}
% Default setup is geared to write the dependency list to a \fn{.dep}
% file. The option \opt{log} means write it to the \tex/ log instead.
% \begin{macrocode}
\def\snap@write{\immediate\write\snap@out}
\let\snap@out\sixt@@n % fallback, probably never used
% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Package options}
%
% \begin{macrocode}
\DeclareOption{dep}{%
- \def\snap@write{\immediate\write\snap@out}%
+ \def\snap@write{\immediate\write\snap@out}%
}
% \end{macrocode}
%
% \begin{macrocode}
\DeclareOption{log}{%
- \let\snap@write\typeout
+ \let\snap@write\typeout
}
% \end{macrocode}
%
@@ -577,32 +735,39 @@
% in the \fn{.dvi} file.
% \begin{macrocode}
\DeclareOption{tfm}{%
- \typeout{Option 'tfm' not implemented yet [1999/09/23]}%
+ \typeout{Option 'tfm' not implemented yet [1999/09/23]}%
}
% \end{macrocode}
%
-% Warnings and errors.
+% \subsubsection{Warnings and errors}
+% \begin{macro}{\snap@mismatch@warning}
+% \begin{macro}{\snap@mismatch}
% \begin{macrocode}
\def\snap@mismatch@warning#1#2#3{\PackageWarningNoLine{#1}{#2}}
\def\snap@mismatch{\snap@mismatch@warning}
% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
% \begin{macrocode}
\DeclareOption{error}{%
- \def\snap@mismatch{\PackageError}%
- \def\snap@selfcheck{\snap@selfcheck@a}%
- \ifx\snap@select\@empty \let\snap@select\snap@select@all \fi
+ \def\snap@mismatch{\PackageError}%
+ \def\snap@selfcheck{\snap@selfcheck@a}%
+ \ifx\snap@select\@empty \let\snap@select\snap@select@all \fi
}
% \end{macrocode}
%
% \begin{macrocode}
\DeclareOption{warning}{%
- \def\snap@mismatch{\snap@mismatch@warning}%
- \def\snap@selfcheck{\snap@selfcheck@a}%
- \ifx\snap@select\@empty \let\snap@select\snap@select@all \fi
+ \def\snap@mismatch{\snap@mismatch@warning}%
+ \def\snap@selfcheck{\snap@selfcheck@a}%
+ \ifx\snap@select\@empty \let\snap@select\snap@select@all \fi
}
% \end{macrocode}
%
+%
+% \begin{macro}{\snap@select@all}
+% \begin{macro}{\snap@select}
% Because the exact form of the version number is not mandated by
% \LaTeX{}, just take the first two ``words'' delimited by spaces.
% And take a little extra care to properly handle multiple spaces
@@ -611,7 +776,12 @@
\def\snap@select@all#1#2 #3#4 #5\@nil{#1#2 #3#4}
\let\snap@select\@empty
% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
+% \begin{macro}{\snap@seldate}
+% \begin{macro}{\snap@selversion}
+% \begin{macro}{\snap@selmajor}
% If the naming conventions seem a little peculiar here, it's because
% I had to add some pieces later that I didn't think of initially,
% and I wanted to minimize the chances of compatibility problems for
@@ -621,21 +791,31 @@
\def\snap@selversion#1#2 #3{\snap@select@version #3}%
\def\snap@selmajor#1#2 #3{\snap@select@major #3}%
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macrocode}
\DeclareOption{date}{\let\snap@select=\snap@seldate}
% \end{macrocode}
%
+% \begin{macro}{\snap@select@version}
% \begin{macrocode}
\def\snap@select@version#1{%
\ifodd 0#11 \@xp\snap@sva\@xp#1\else\@xp\snap@select@version\fi
}
\def\snap@sva#1.#2 #3\@nil{#1.#2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\snap@select@major}
+% \begin{macrocode}
\def\snap@select@major#1{%
\ifodd 0#11 \@xp\snap@svm\@xp#1\else\@xp\snap@select@major\fi
}
\def\snap@svm#1.#2\@nil{#1}
% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
\DeclareOption{version}{\let\snap@select\snap@selversion}
@@ -647,30 +827,34 @@
\DeclareOption{bbinfo}{\def\snap@bbinfo{00}}
% \end{macrocode}
%
+% \begin{macro}{\snap@splitter}
% Give this an inert definition, for the time being, until we are
% ready to do the split.
% \begin{macrocode}
\let\snap@splitter=?
\AtBeginDocument{%
- \xdef\@filelist{\@filelist\snap@splitter}%
+ \xdef\@filelist{\@filelist\snap@splitter}%
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@selfcheck}
% \begin{macrocode}
\let\snap@selfcheck\@empty
\let\snap@selfcheck@a\@empty
% \end{macrocode}
+% \end{macro}
%
% The \opt{self-warning} option would normally be used in conjunction
% with the \opt{error} option.
% \begin{macrocode}
\DeclareOption{self-warning}{%
- \def\snap@selfcheck{%
- \begingroup
- \def\snap@mismatch{\snap@mismatch@warning}%
- \snap@selfcheck@a
- \endgroup
- }
+ \def\snap@selfcheck{%
+ \begingroup
+ \def\snap@mismatch{\snap@mismatch@warning}%
+ \snap@selfcheck@a
+ \endgroup
+ }
}
% \end{macrocode}
%
@@ -679,16 +863,19 @@
\ProcessOptions\relax
% \end{macrocode}
%
+% \begin{macro}{\snap@restore@extensions}
% We need the following patch to make up for the fact that
% \cs{@pkgextension} and \cs{@clsextension} are marked in the \latex/
% kernel as \qq{only preamble}.
% \begin{macrocode}
\edef\snap@restore@extensions{%
- \def\@nx\@pkgextension{\@pkgextension}%
- \def\@nx\@clsextension{\@clsextension}%
+ \def\@nx\@pkgextension{\@pkgextension}%
+ \def\@nx\@clsextension{\@clsextension}%
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@pad}
% Pad filename strings out to 8+3 length so that the list will look
% pretty.
% \begin{macrocode}
@@ -696,7 +883,9 @@
\def\snap@pad@a#1#2#3#4#5\@nil{\snap@pad@b#1#2#3#4\space\@nil}
\def\snap@pad@b#1\space#2\@nil#3{\def#3{#2}}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@trim@version}
% First stage: discard leading spaces before the first and second
% nonspace strings in the argument. Take the first nonspace string as
% the date. Since we only do equal/not-equal testing on dates, it
@@ -716,6 +905,7 @@
% \begin{macrocode}
\def\snap@trim@c#1#2 #3\@nil{#2}
% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
\let\rqv@list=\@empty
@@ -726,13 +916,14 @@
\edef\@tempc#1\fmtname{#1\fmtname}\@tempc
\def\@tempa#1,\fmtname.fmt,#2#3\@nil{#2}
\edef\@tempb{\@nx\@tempa,\@filelist,\fmtname.fmt,}
+
\if ?\@tempb?\@nil
- \edef\@filelist{\fmtname.fmt,\@filelist}%
- \def\@tempc{LaTeX2e}%
- \@xp\edef\csname ver@\fmtname.fmt\endcsname{%
- \fmtversion\space
- v\ifx\@tempc\fmtname 2.e\else ?.?\fi
- }%
+ \edef\@filelist{\fmtname.fmt,\@filelist}%
+ \def\@tempc{LaTeX2e}%
+ \@xp\edef\csname ver@\fmtname.fmt\endcsname{%
+ \fmtversion\space
+ v\ifx\@tempc\fmtname 2.e\else ?.?\fi
+ }%
\fi
% \end{macrocode}
% Ensure that files get recorded.
@@ -740,81 +931,100 @@
\listfiles
% \end{macrocode}
%
+% \begin{macro}{\snap@doit}
% \begin{macrocode}
\def\snap@doit#1{%
- \begingroup
- \ifx\delimiter#1\delimiter
- \else
- \filename@parse{#1}%
- \let\@tempd\@empty
- \ifx\filename@ext\relax
- \def\@tempa{file}\def\@tempb{~~~}%
- \else\ifx\filename@ext\@pkgextension
- \def\@tempa{package}\let\@tempb\@empty
- \else\ifx\filename@ext\@clsextension
- \def\@tempa{class}\def\@tempb{~~}%
- \else\ifx\filename@ext\@fmtextension
- \def\@tempa{format}\def\@tempb{~}%
- \else\ifx\filename@ext\@tfmextension
- \def\@tempa{tfm}\def\@tempb{~~~~}%
- \else
- \def\@tempa{file}\edef\@tempd{.\filename@ext}%
- \def\@tempb{~~~}%
- \fi\fi\fi\fi\fi
- \@xp\let\@xp\@tempe
- \csname ver@\filename@base %
- \ifx\filename@ext\relax\else.\filename@ext\fi\endcsname
- \ifx\@tempe\@empty \let\@tempe\relax \fi
- \edef\@tempe{%
- \ifx\@tempe\relax 0000/00/00 v0.0%
- \else
- \@xp\@xp\@xp\snap@trim@version\@xp\@tempe\space v0.0 v0.0 \@nil
- \fi
- }%
- \edef\@tempc{\filename@area\filename@base\@tempd}% full file name
- \@xp\snap@pad\@tempc\space~~~~~~~~~~~~~~~~\@nil\@tempd
- \let~\space
- \snap@write{\space\space *{\@tempa}\@tempb{\@tempc}\@tempd{\@tempe}}%
- \fi
- \aftergroup\snap@doit
- \endgroup
-}%
+ \begingroup
+ \ifx\delimiter#1\delimiter \else
+ \filename@parse{#1}%
+ \let\@tempd\@empty
+ \ifx\filename@ext\relax
+ \def\@tempa{file}\def\@tempb{~~~}%
+ \else\ifx\filename@ext\@pkgextension
+ \def\@tempa{package}\let\@tempb\@empty
+ \else\ifx\filename@ext\@clsextension
+ \def\@tempa{class}\def\@tempb{~~}%
+ \else\ifx\filename@ext\@fmtextension
+ \def\@tempa{format}\def\@tempb{~}%
+ \else\ifx\filename@ext\@tfmextension
+ \def\@tempa{tfm}\def\@tempb{~~~~}%
+ \else
+ \def\@tempa{file}%
+ \edef\@tempd{.\filename@ext}%
+ \def\@tempb{~~~}%
+ \fi\fi\fi\fi\fi
+ \@xp\let\@xp\@tempe
+ \csname ver@\filename@base %
+ \ifx\filename@ext\relax\else.\filename@ext\fi\endcsname
+ \ifx\@tempe\@empty \let\@tempe\relax \fi
+ \edef\@tempe{%
+ \ifx\@tempe\relax 0000/00/00 v0.0%
+ \else
+ \@xp\@xp\@xp\snap@trim@version\@xp\@tempe\space v0.0 v0.0 \@nil
+ \fi
+ }%
+ \edef\@tempc{\filename@area\filename@base\@tempd}% full file name
+ \@xp\snap@pad\@tempc\space~~~~~~~~~~~~~~~~\@nil\@tempd
+ \let~\space
+ \snap@write{\space\space *{\@tempa}\@tempb{\@tempc}\@tempd{\@tempe}}%
+ \fi
+ \aftergroup\snap@doit
+ \endgroup
+}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@bracify}
% \begin{macrocode}
\def\snap@bracify#1#2,{%
\ifx\@empty#1\expandafter\@gobble\else {#1#2}\fi \snap@bracify
}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\snap@splitter@a}
+% \begin{macrocode}
\def\snap@splitter@a{%
- \iffalse{{\fi }}% close current file name, end definition
- \xdef\specific@files{%
- \iffalse}\fi
- \specific@files
- \expandafter\@gobble\string % discard one closing brace
+ \iffalse{{\fi }}% close current file name, end definition
+ \xdef\specific@files{%
+ \iffalse}\fi
+ \specific@files
+ \expandafter\@gobble\string % discard one closing brace
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@fdcheck}
% \begin{macrocode}
\def\snap@fdcheck#1{%
- \ifx\delimiter#1\@xp\@gobble
- \else\snap@fda#1\@empty.fd\@empty ?\@nil
- \fi
- \snap@fdcheck
+ \ifx\delimiter#1%
+ \@xp\@gobble
+ \else
+ \snap@fda#1\@empty.fd\@empty ?\@nil
+ \fi
+ \snap@fdcheck
}
+
\def\snap@fda#1.fd\@empty#2#3\@nil{%
- \if ?#2%
- \xdef\specific@files{\specific@files {#1}}%
- \else
- \xdef\general@files{\general@files {#1.fd}}%
- \fi
+ \if ?#2%
+ \xdef\specific@files{\specific@files {#1}}%
+ \else
+ \xdef\general@files{\general@files {#1.fd}}%
+ \fi
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\general@files}
+% \begin{macro}{\specific@files}
% \begin{macrocode}
\let\general@files\@empty
\let\specific@files\@empty
% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
+% \begin{macro}{\SpecialInput}
% The \cn{SpecialInput} command is related to the \opt{packages-only}
% option. Apart from some ad hoc handling for \fn{.fd} files that get
% loaded on demand, all files that are input after
@@ -826,128 +1036,149 @@
% go in the specific-files list.
% \begin{macrocode}
\newcommand{\SpecialInput}[1]{%
- \xdef\specific@files{\specific@files{#1}}%
- \@@input#1\relax
+ \xdef\specific@files{\specific@files{#1}}%
+ \@@input#1\relax
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\@dofilelist}
% Our definition of \cs{@dofilelist} does not retain much resemblance
% to the original in the \LaTeX{} kernel.
% \begin{macrocode}
\def\@dofilelist{%
- \snap@restore@extensions
- \xdef\general@files{\@xp\snap@bracify \@filelist \@empty,\@empty,}%
- \let\snap@splitter\snap@splitter@a
- \xdef\general@files{\general@files}%
- \let\@tempa\specific@files \global\let\specific@files\@empty
- \@xp\snap@fdcheck\@tempa{\delimiter}%
- \ifx\rqv@list\@empty
- \else \rqv@compare@lists
- \fi
- \ifx\snap@write\typeout
- \else
- \newwrite\snap@out
- \immediate\openout\snap@out=\jobname.dep \relax
- \fi
- \snap@write{\string\RequireVersions\@charlb}%
- \snap@write{\space\space *{application}%
- \snapshotApplication
- }%
- \@xp\snap@doit\general@files{\delimiter\aftergroup\@gobble\@gobble}%
- \ifx\specific@files\@empty
- \else
- \snap@specific
- \fi
- \snap@write{\@charrb}%
- \ifx\snap@write\typeout
- \else \immediate\closeout\snap@out
- \typeout{Dependency list written on \jobname.dep.}%
- \fi
-}%
+ \snap@restore@extensions
+ \xdef\general@files{\@xp\snap@bracify \@filelist \@empty,\@empty,}%
+ \let\snap@splitter\snap@splitter@a
+ \xdef\general@files{\general@files}%
+ \let\@tempa\specific@files
+ \global\let\specific@files\@empty
+ \@xp\snap@fdcheck\@tempa{\delimiter}%
+ \ifx\rqv@list\@empty \else
+ \rqv@compare@lists
+ \fi
+ \ifx\snap@write\typeout \else
+ \newwrite\snap@out
+ \immediate\openout\snap@out=\jobname.dep \relax
+ \fi
+ \snap@write{\string\RequireVersions\@charlb}%
+ \snap@write{\space\space *{application}%
+ \snapshotApplication
+ }%
+ \@xp\snap@doit\general@files{\delimiter\aftergroup\@gobble\@gobble}%
+ \ifx\specific@files\@empty \else
+ \snap@specific
+ \fi
+ \snap@write{\@charrb}%
+ \ifx\snap@write\typeout \else
+ \immediate\closeout\snap@out
+ \typeout{Dependency list written on \jobname.dep.}%
+ \fi
+}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@specific}
% \begin{macrocode}
\def\snap@specific{%
- \snap@write{ \space *{-------}{Document-specific files:}{----}}%
- \@xp\snap@doit\specific@files{\delimiter\aftergroup\@gobble\@gobble}%
+ \snap@write{ \space *{-------}{Document-specific files:}{----}}%
+ \@xp\snap@doit\specific@files{\delimiter\aftergroup\@gobble\@gobble}%
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\rqv@condense}
% The \cs{rqv@compare@lists} function checks to see if any files
% are found only in the RequireVersions list or only in the
% \cs{general@files} list.
% \begin{macrocode}
\def\rqv@condense#1{%
- \@xp\ifx\csname ver@#1\endcsname\N
- \else
- \edef\L{\L{#1}}%
- \@xp\let\csname ver@#1\endcsname=\N
- \fi
- \rqv@condense
+ \@xp\ifx\csname ver@#1\endcsname\N \else
+ \edef\L{\L{#1}}%
+ \@xp\let\csname ver@#1\endcsname=\N
+ \fi
+ \rqv@condense
}
+
\def\rqv@condend{\endcsname ?\fi
- \@xp\@xp\@xp\@gobbletwo\csname @xp\iftrue}
+ \@xp\@xp\@xp\@gobbletwo\csname @xp\iftrue}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\rqv@overloaded}
% \begin{macrocode}
\def\rqv@overloaded#1{%
- \snap@mismatch{snapshot}{^^J%
- File #1 loaded though not in \noexpand\RequireVersions list%
- }\@ehc
+ \snap@mismatch{snapshot}{^^J%
+ File #1 loaded though not in \noexpand\RequireVersions list%
+ }\@ehc
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\rqv@notloaded}
% \begin{macrocode}
\def\rqv@notloaded#1{%
- \snap@mismatch{snapshot}{^^J%
- File #1 [\csname rqv@#1\endcsname] required but not loaded%
- }\@ehc
+ \snap@mismatch{snapshot}{^^J%
+ File #1 [\csname rqv@#1\endcsname] required but not loaded%
+ }\@ehc
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\rqv@set}
+% \begin{macro}{\rqv@test}
% \begin{macrocode}
\def\rqv@set#1{\@xp\let\csname ver@#1\endcsname\N \rqv@set}
\def\rqv@test#1{\csname ver@#1\endcsname{#1}\rqv@test}
% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
+% \begin{macro}{\rqv@compare@lists}
% \begin{macrocode}
\def\rqv@compare@lists{%
- \begingroup
+ \begingroup
% \end{macrocode}
% Clear up duplicate file names (just in case) to avoid redundant
% warning messages. This should seldom be necessary in practice.
% \begin{macrocode}
- \def\N{1}\let\L\@empty
- \@xp\rqv@condense\rqv@list\rqv@condend
- \global\let\rqv@list=\L
- \def\N{2}\let\L\@empty
- \@xp\rqv@condense\general@files\rqv@condend
- \global\let\general@files=\L
+ \def\N{1}%
+ \let\L\@empty
+ \@xp\rqv@condense\rqv@list\rqv@condend
+ \global\let\rqv@list=\L
+ \def\N{2}%
+ \let\L\@empty
+ \@xp\rqv@condense\general@files\rqv@condend
+ \global\let\general@files=\L
% \end{macrocode}
% Let's make a shorthand for the code that terminates our recursion.
% \begin{macrocode}
- \def\T{\@firstoftwo{\endcsname\@empty\@gobbletwo}}%
+ \def\T{\@firstoftwo{\endcsname\@empty\@gobbletwo}}%
% \end{macrocode}
% Set all the loaded general files to an error function.
% \begin{macrocode}
- \let\N\rqv@overloaded \@xp\rqv@set\general@files \T
+ \let\N\rqv@overloaded \@xp\rqv@set\general@files \T
% \end{macrocode}
% Set all the required files to an ignore function.
% \begin{macrocode}
- \let\N\@gobble \@xp\rqv@set\rqv@list \T
+ \let\N\@gobble
+ \@xp\rqv@set\rqv@list \T
% \end{macrocode}
% Execute all the general files.
% \begin{macrocode}
- \@xp\rqv@test\general@files{\endcsname\csname @gobbletwo}%
+ \@xp\rqv@test\general@files{\endcsname\csname @gobbletwo}%
% \end{macrocode}
% And now do essentially the same thing in the reverse direction.
% \begin{macrocode}
- \let\N\rqv@notloaded \@xp\rqv@set\rqv@list \T
- \let\N\@gobble \@xp\rqv@set\general@files \T
- \@xp\rqv@test\rqv@list{\endcsname\csname @gobbletwo}%
- \endgroup
+ \let\N\rqv@notloaded
+ \@xp\rqv@set\rqv@list \T
+ \let\N\@gobble
+ \@xp\rqv@set\general@files \T
+ \@xp\rqv@test\rqv@list{\endcsname\csname @gobbletwo}%
+ \endgroup
}
% \end{macrocode}
+% \end{macro}
%
% Compensate for a bug in old versions of \fn{amsgen.sty}. This is a
% little tricky.
@@ -958,13 +1189,14 @@
% \begin{macrocode}
%\@namedef{ver@amsgen.sty}{1996/10/29 v1.2b}
\AtBeginDocument{%
- \@ifundefined{ver@amsgen}{}{%
- \@xp\let\csname ver@amsgen.sty\@xp\endcsname
- \csname ver@amsgen\endcsname
- }%
+ \@ifundefined{ver@amsgen}{}{%
+ \@xp\let\csname ver@amsgen.sty\@xp\endcsname
+ \csname ver@amsgen\endcsname
+ }%
}
% \end{macrocode}
%
+% \begin{macro}{\ProvidesFile}
% Because \cs{ProvidesFile} is used in \fn{.fd} files which are
% normally read with special catcodes, there tend to
% be problems with whitespace characters being erroneously lost from
@@ -973,10 +1205,10 @@
% affected some older versions of \latex/.
% \begin{macrocode}
\def\ProvidesFile#1{%
- \def\snap@checker{\snap@check{#1}}%
- \begingroup
- \aftergroup\snap@checker
- \catcode`\ 10
+ \def\snap@checker{\snap@check{#1}}%
+ \begingroup
+ \aftergroup\snap@checker
+ \catcode`\ 10
% \end{macrocode}
% Added guards from 2001/06/01 version of \latex/. These are
% necessary because, for example, \pkg{inputenc} sets
@@ -984,17 +1216,19 @@
% reading input encoding files. The guards prevent an ``invalid
% character'' error.
% \begin{macrocode}
- \ifnum\endlinechar < 256
- \ifnum \endlinechar>\m@ne
- \catcode\endlinechar 10
+ \ifnum\endlinechar < 256
+ \ifnum \endlinechar>\m@ne
+ \catcode\endlinechar 10
+ \fi
\fi
- \fi
- \@makeother\/%
- \@makeother\&%
- \kernel@ifnextchar[{\snap@providesfile{#1}}{\snap@providesfile{#1}[]}%
+ \@makeother\/%
+ \@makeother\&%
+ \kernel@ifnextchar[{\snap@providesfile{#1}}{\snap@providesfile{#1}[]}%
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@graphic@test}
% Normally the string found in the second arg of \cs{ProvidesFile}
% (for a nongraphics file) would begin with the usual date string.
% The \cs{includegraphics} command, however, begins the second arg
@@ -1005,18 +1239,29 @@
% \begin{macrocode}
\def\snap@graphic@test#1#2#3\@nil{r\if G#1#2\else X\fi}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@providesfile}
% \begin{macrocode}
\def\snap@providesfile#1[#2]{%
- \wlog{File: #1 #2}%
- \if\snap@graphic@test#2@@\@nil
- \snap@record@graphic#1\relax #2 (type ??)\@nil
- \else
- \expandafter\xdef\csname ver@#1\endcsname{#2}%
- \fi
- \endgroup
+ \wlog{File: #1 #2}%
+% \end{macrocode}
+% Adopt a suggestion made by user egrep on the \TeX\ stack exchange
+% (\url{https://tex.stackexchange.com/questions/508985}) but
+% without the use of the \cs{expanded} extension. This makes it
+% more likely that \pkg{snapshot} can deal with macros inside the
+% optional arguments of \cs{Provides...} commands.
+% \begin{macrocode}
+ \edef\@tempa{#2}%
+ \if\@xp\snap@graphic@test\@tempa @@\@nil
+ \snap@record@graphic#1\relax #2 (type ??)\@nil
+ \else
+ \@xp\xdef\csname ver@#1\endcsname{#2}%
+ \fi
+ \endgroup
}
% \end{macrocode}
+% \end{macro}
%
% This is what \cn{includegraphics} does to record graphic file
% information.
@@ -1028,77 +1273,90 @@
%#2<-Graphic file (type eps)
%\end{verbatim}
%
+% \begin{macro}{\snap@record@graphic}
% Check the graphics info.
% \begin{macrocode}
\def\snap@record@graphic#1\relax #2(type #3)#4\@nil{%
- \expandafter\xdef\csname ver@#1\endcsname{%
- Graphic%
- \if\snap@bbinfo :bb=\Gin@llx/\Gin@lly/\Gin@urx/\Gin@ury\fi
- \space v0.0%
- }%
+ \expandafter\xdef\csname ver@#1\endcsname{%
+ Graphic%
+ \if\snap@bbinfo :bb=\Gin@llx/\Gin@lly/\Gin@urx/\Gin@ury\fi
+ \space v0.0%
+ }%
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\@pr@videpackage}
% \begin{macrocode}
\def\@pr@videpackage [#1]{%
- \expandafter\xdef\csname ver@\@currname.\@currext\endcsname{#1}%
- \ifx\@currext\@clsextension
- \typeout{Document Class: \@gtempa\space#1}%
- \else
- \wlog{Package: \@gtempa\space#1}%
- \fi
- \snap@check{\@currname.\@currext}%
+ \expandafter\xdef\csname ver@\@currname.\@currext\endcsname{#1}%
+ \ifx\@currext\@clsextension
+ \typeout{Document Class: \@gtempa\space#1}%
+ \else
+ \wlog{Package: \@gtempa\space#1}%
+ \fi
+ \snap@check{\@currname.\@currext}%
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@selfcheck@a}
% \begin{macrocode}
\def\snap@selfcheck@a{\snap@check{snapshot.sty}}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\@nofmt}
% \begin{macrocode}
\def\@nofmt#1.fmt.#2 {#1 }
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@mismatch@a}
% \begin{macrocode}
\def\snap@mismatch@a#1#2#3{%
- \snap@mismatch{snapshot}{^^J%
- \space\space Required version #2 of \@nofmt#1.fmt. and^^J%
- \space\space provided version #3 do not match%
- }\@ehc
+ \snap@mismatch{snapshot}{^^J%
+ \space\space Required version #2 of \@nofmt#1.fmt. and^^J%
+ \space\space provided version #3 do not match%
+ }\@ehc
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@compare@versions}
% When comparing \cs{rqv@foo.sty} (information from a previous
% \latex/ run) with \cs{ver@foo.sty} (information from current run),
% we first call \cs{snap@trim@version} on the latter to clear away
% any idiosyncrasies in the contents.
% \begin{macrocode}
\def\snap@compare@versions#1{%
- \begingroup
- \@ifundefined{rqv@#1}{}{%
- \edef\0{\csname rqv@#1\endcsname}%
- \edef\1{\csname ver@#1\endcsname}%
- \edef\1{\@xp\snap@trim@version\1 v0.0 v0.0 \@nil}%
- \edef\@tempa{\@xp\snap@select\0 v0.0 v0.0 \@nil}%
- \edef\@tempb{\@xp\snap@select\1 v0.0 v0.0 \@nil}%
- \ifx\@tempa\@tempb
- \else
- \edef\@tempd{\@nx\snap@mismatch@a{#1}{\@tempa}{\@tempb}}%
- \@xp\@tempd
- \fi
- }%
- \endgroup
+ \begingroup
+ \@ifundefined{rqv@#1}{}{%
+ \edef\0{\csname rqv@#1\endcsname}%
+ \edef\1{\csname ver@#1\endcsname}%
+ \edef\1{\@xp\snap@trim@version\1 v0.0 v0.0 \@nil}%
+ \edef\@tempa{\@xp\snap@select\0 v0.0 v0.0 \@nil}%
+ \edef\@tempb{\@xp\snap@select\1 v0.0 v0.0 \@nil}%
+ \ifx\@tempa\@tempb \else
+ \edef\@tempd{\@nx\snap@mismatch@a{#1}{\@tempa}{\@tempb}}%
+ \@xp\@tempd
+ \fi
+ }%
+ \endgroup
% \end{macrocode}
% When the \opt{test} option is in effect, jump out of the current
% file instead of continuing.
% \begin{macrocode}
- \snap@test@abort
+ \snap@test@abort
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@test@abort}
% \begin{macrocode}
\let\snap@test@abort=\@empty
% \end{macrocode}
+% \end{macro}
%
% \section{Compatibility}
%
@@ -1122,8 +1380,8 @@
%
% \begin{macrocode}
\ifx\snap@select\@empty
- \let\snap@compare@versions\@gobble
- \let\snap@check\@gobble
+ \let\snap@compare@versions\@gobble
+ \let\snap@check\@gobble
\fi
% \end{macrocode}
%
@@ -1155,13 +1413,13 @@
% \begin{macrocode}
\def\restore@some@catcodes{}
\def\save@some@catcodes{%
- \edef\restore@some@catcodes{%
- \catcode\number`\@=\number\catcode`\@
- \catcode\number`\"=\number\catcode`\"
- \catcode\number`\^=\number\catcode`\^
- \catcode\number`\_=\number\catcode`\_
- \relax
- }%
+ \edef\restore@some@catcodes{%
+ \catcode\number`\@=\number\catcode`\@
+ \catcode\number`\"=\number\catcode`\"
+ \catcode\number`\^=\number\catcode`\^
+ \catcode\number`\_=\number\catcode`\_
+ \relax
+ }%
}
% \end{macrocode}
%
@@ -1187,82 +1445,99 @@
% executed and that the \cs{if@compatibility} switch got set
% accordingly.
%
+% \begin{macro}{\snap@intest}
% \begin{macrocode}
\def\snap@intest#1#2{%
- \message{^^J}%
- \begingroup \edef\0{#1#2}\def\9{latex209.def}%
- \ifx\0\9\global\@compatibilitytrue \fi
- \ifx#2\snapx@format
+ \message{^^J}%
+ \begingroup
+ \edef\0{#1#2}%
+ \def\9{latex209.def}%
+ \ifx\0\9\global\@compatibilitytrue \fi
+ \ifx#2\snapx@format
% \end{macrocode}
% If arg1 + arg2 = ``LaTeX2e.fmt'', the calling function
% \cs{snap@storeb} will run \cs{snap@check} separately.
% This is a crude way of making things work in that case without
% much extra trouble.
% \begin{macrocode}
- \def\snap@test@abort{\endgroup}%
- \else
- \edef\N{%
- \noexpand\snap@intest@b{#1#2}%
- {#1}{\@xp\@gobble#2\@empty}%
- {\csname rqv@#1#2\endcsname}}%
- \expandafter\endgroup\N
- \fi
+ \def\snap@test@abort{\endgroup}%
+ \else
+ \edef\N{%
+ \noexpand\snap@intest@b{#1#2}%
+ {#1}{\@xp\@gobble#2\@empty}%
+ {\csname rqv@#1#2\endcsname}}%
+ \expandafter\endgroup\N
+ \fi
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@intest@b}
% \begin{macrocode}
\def\snap@intest@b#1#2#3#4{%
- \def\@currname{#2}\def\@currext{#3}%
- \begingroup \lccode`\/=`\0\relax\lowercase{\endgroup
- \ifnum\snap@seldate#4 00 0\@nil>\z@
- }% matches \lowercase
- \save@some@catcodes
- \@@input #1 \relax
- \restore@some@catcodes
- \else
- \snap@specialtest{#1}{#4}%
- \fi
+ \def\@currname{#2}%
+ \def\@currext{#3}%
+ \begingroup
+ \lccode`\/=`\0\relax\lowercase{\endgroup
+ \ifnum\snap@seldate#4 00 0\@nil>\z@
+ }% matches \lowercase
+ \save@some@catcodes
+ \@@input #1 \relax
+ \restore@some@catcodes
+ \else
+ \snap@specialtest{#1}{#4}%
+ \fi
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\snap@specialtest}
% \begin{macrocode}
\def\snap@specialtest#1#2{%
- \fake@input{#1}%
+ \fake@input{#1}%
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\fake@input}
% \begin{macrocode}
\def\fake@input#1{%
- \begingroup
- % Ensure that outer \foo or unmatched braces don't trip us up
- \catcode`\\=12 \catcode`\{=12 \catcode`\}=12
- \endinput
+ \begingroup
+ % Ensure that outer \foo or unmatched braces don't trip us up
+ \catcode`\\=12
+ \catcode`\{=12
+ \catcode`\}=12
+ \endinput
% \end{macrocode}
% Note that these definitions of \cs{G} and \cs{?} are local, and
% recall that one-letter cs names don't use up hash table entries.
% \begin{macrocode}
- \def\G{\@car\endgroup}%
- \expandafter\futurelet\expandafter\?\expandafter\G\@@input#1 \relax\@nil
+ \def\G{\@car\endgroup}%
+ \expandafter\futurelet\expandafter\?\expandafter\G\@@input#1 \relax\@nil
}
% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
\let\snap@test@abort=\endinput
\let\snap@selfcheck=\@empty
% \end{macrocode}
%
+% \begin{macro}{\snap@finish}
% There's an extra close-brace left hanging around at the end, but I
% guess we don't care.
% \begin{macrocode}
\def\snap@finish{%%
- \endgroup \message{^^J}%
- \def\X##1{##1,\X}%
- \edef\@filelist{\@xp\X\rqv@list{\@gobbletwo}}%
- \def\X##1,?{##1}\edef\@filelist{\@xp\X\@filelist ?}%
- \@dofilelist
- \@@end
-}%
+ \endgroup
+ \message{^^J}%
+ \def\X##1{##1,\X}%
+ \edef\@filelist{\@xp\X\rqv@list{\@gobbletwo}}%
+ \def\X##1,?{##1}\edef\@filelist{\@xp\X\@filelist ?}%
+ \@dofilelist
+ \@@end
+}
% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
\def\snap@mismatch#1#2#3{}
@@ -1273,25 +1548,24 @@
% \cs{ProvidesFile} at all.
% \begin{macrocode}
\renewcommand{\RequireVersions}[2][]{%
- \begingroup
- \makeatletter
- \def\snap@check{\snap@compare@versions}%%
- \let\snapx@tfm=\snap@ignore
+ \begingroup
+ \makeatletter
+ \def\snap@check{\snap@compare@versions}%%
+ \let\snapx@tfm=\snap@ignore
% \end{macrocode}
% This seems to help, with english.ldf for example, to prevent an
% endless loop when attempting to load babel.def.
% \begin{macrocode}
- \def\ProvidesLanguage##1{\ProvidesFile{##1.ldf}}%
- \iffalse{\fi \futurelet\@let@token\snap@branch #2}%
- \endgroup
+ \def\ProvidesLanguage##1{\ProvidesFile{##1.ldf}}%
+ \iffalse{\fi \futurelet\@let@token\snap@branch #2}%
+ \endgroup
}
% \end{macrocode}
%
+% \section{Finale}
+%
% The usual \cs{endinput} to ensure that random garbage at the end of
% the file doesn't get copied by \fn{docstrip}.
% \begin{macrocode}
\endinput
% \end{macrocode}
-%
-% \CheckSum{1209}
-% \Finale
diff --git a/Master/texmf-dist/source/latex/snapshot/snapshot.ins b/Master/texmf-dist/source/latex/snapshot/snapshot.ins
index 262760e4c9b..289c09b82c9 100644
--- a/Master/texmf-dist/source/latex/snapshot/snapshot.ins
+++ b/Master/texmf-dist/source/latex/snapshot/snapshot.ins
@@ -1,6 +1,6 @@
%% filename: snapshot.ins
-%% version: 1.00
-%% date: 2010/08/13
+%% version: 1.01
+%% date: 2020/06/16
%%
%% American Mathematical Society
%% Technical Support
@@ -13,7 +13,7 @@
%% fax: (401) 331-3842
%% email: tech-support@ams.org
%%
-%% Copyright 2010 American Mathematical Society.
+%% Copyright 2010, 2020 American Mathematical Society.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -38,7 +38,7 @@
\preamble
-Copyright 2001, 2004, 2006, 2007, 2010, 2012 American Mathematical Society.
+Copyright 1999-2003, 2004, 2010, 2012, 2020 American Mathematical Society.
American Mathematical Society
Technical Support
diff --git a/Master/texmf-dist/tex/latex/snapshot/snapshot.sty b/Master/texmf-dist/tex/latex/snapshot/snapshot.sty
index 286ccdce706..4103f4489af 100644
--- a/Master/texmf-dist/tex/latex/snapshot/snapshot.sty
+++ b/Master/texmf-dist/tex/latex/snapshot/snapshot.sty
@@ -6,7 +6,7 @@
%%
%% snapshot.dtx
%%
-%% Copyright 2001, 2004, 2006, 2007, 2010, 2012 American Mathematical Society.
+%% Copyright 1999-2003, 2004, 2010, 2012, 2020 American Mathematical Society.
%%
%% American Mathematical Society
%% Technical Support
@@ -33,7 +33,7 @@
%% Society.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{snapshot}[2012/08/06 v2.13]
+\ProvidesPackage{snapshot}[2020/06/17 v2.14]
\let\@xp=\expandafter \let\@nx=\noexpand
\def\str@cmp#1#2\str@cmp#3{%
\if #1#3\else F\@car\fi \str@cmp#2\str@cmp
@@ -42,73 +42,171 @@
\str@cmp#1\relax\str@cmp#2{\relax\@gobbletwo}\@nil TT%
}
\newcommand{\RequireVersions}[2][]{}%
+
\renewcommand{\RequireVersions}[1][]{%
- \def\snap@check{\snap@compare@versions}%
- \toks@{#1}\afterassignment\snap@storem
- \let\@let@token=
+ \def\snap@check{\snap@compare@versions}%
+ \toks@{#1}%
+ \afterassignment\snap@storem
+ \let\@let@token=
}
+
+\@onlypreamble\RequireVersions
\def\snap@storem{%
- \ifx\@let@token\bgroup
- \else
- \PackageError{snapshot}{Expected a `\@charlb' character here}\@ehc
- \@xp\@gobblefour
- \fi
- \futurelet\@let@token\snap@branch
+ \ifx\@let@token\bgroup \else
+ \PackageError{snapshot}{Expected a `\@charlb' character here}\@ehc
+ \@xp\@gobblefour
+ \fi
+ \futurelet\@let@token\snap@branch
}
-\@onlypreamble\RequireVersions
\let\snap@check\@gobble
\def\snap@finish{\toks@\bgroup}
\def\snap@branch{%
- \ifx\@let@token\egroup
- \@xp\snap@finish
- \else\ifx\@let@token *%
- \let\reserved@c\snap@store@version
- \else\ifx\@let@token\@sptoken
- \lowercase{\def\reserved@c} {\futurelet\@let@token\snap@branch}%
- \else
- \let\reserved@c\snap@store@error
- \fi\fi\fi
- \reserved@c
+ \ifx\@let@token\egroup
+ \@xp\snap@finish
+ \else\ifx\@let@token *%
+ \let\reserved@c\snap@store@version
+ \else\ifx\@let@token\@sptoken
+ \lowercase{\def\reserved@c} {\futurelet\@let@token\snap@branch}%
+ \else
+ \let\reserved@c\snap@store@error
+ \fi\fi\fi
+ \reserved@c
}
\def\snap@store@error#1{%
- \PackageError{snapshot}{Expected '*' here, not '#1'}\@ehc
+ \PackageError{snapshot}{Expected '*' here, not '#1'}\@ehc
}
+
\@onlypreamble\snap@store@error
\def\snap@store@version #1#2#3#4{%
- \@xp\snap@store@b\csname snapx@#2\endcsname{#2}{#3}{#4}%
+ \@xp\snap@store@b\csname snapx@#2\endcsname{#2}{#3}{#4}%
}
+
\@onlypreamble\snap@store@version
-\ifx\OmegaVersion\@@undefined
-\else
- \edef\snapshotApplication{%
- {Omega}\space\space\space
- {0000/00/00 v\OmegaVersion}%
- }%
-\fi
-\ifx\eTeXversion\@@undefined
-\else
- \edef\snapshotApplication{%
- {eTeX}\space\space\space\space
- {0000/00/00 v\number\eTeXversion\eTeXrevision}%
- }%
+
+\let\snapshotApplication\@empty
+
+\ifx\OmegaVersion\@@undefined \else
+ \edef\snapshotApplication{%
+ \ifx\AlephVersion\@@undefined
+ {Omega}\space\space\space
+ {0000/00/00 v\OmegaVersion}%
+ \else
+ {Aleph}\space\space\space
+ {0000/00/00 v\OmegaVersion-\AlephVersion}%
+ \fi
+ }%
\fi
-\ifx\pdftexversion\@@undefined
-\else
- \edef\snapshotApplication{%
- \ifx\eTeXversion\@@undefined
- {pdfTeX}\space\space
+
+\ifx\ptexversion\@@undefined\else
+ \edef\snapshotApplication{%
+ {pTeX}\space\space\space\space
+ {0000/00/00 v\number\ptexversion
+ \ifx\ptexminorversion\undefined \u \else.\number\ptexminorversion\fi
+ \ifx\ptexrevision\undefined \u \else\ptexrevision\fi}%
+ }%
+ \ifx\uptexversion\@@undefined
+ \ifx\epTeXversion\@@undefined\else
+ \edef\snapshotApplication{%
+ {epTeX}\space\space\space
+ {0000/00/00 v\number\epTeXversion}%
+ }%
+ \fi
\else
- {pdfeTeX}\space
+ \ifx\epTeXversion\@@undefined
+ \edef\snapshotApplication{%
+ {upTeX}\space\space\space
+ {0000/00/00 v\number\uptexversion
+ \ifx\uptexrevision\undefined \u \else\uptexrevision\fi}%
+ }%
+ \else
+ \edef\snapshotApplication{%
+ {eupTeX}\space\space
+ {0000/00/00 v\number\uptexversion
+ \ifx\uptexrevision\undefined \u \else\uptexrevision\fi
+ --\number\epTeXversion}%
+ }%
+ \fi
+ \fi
+\fi
+
+\ifx\snapshotApplication\@empty
+ \ifx\XeTeXversion\@@undefined\else
+ \edef\snapshotApplication{%
+ {XeTeX}\space\space\space
+ {0000/00/00 v\number\XeTeXversion
+ \ifx\XeTeXrevision\undefined\else\XeTeXrevision\fi}%
+ }%
+ \fi
+\fi
+
+\ifx\snapshotApplication\@empty
+ \ifx\luatexversion\@@undefined\else
+ \begingroup
+ \@tempcnta\luatexversion
+ \divide\@tempcnta by 100
+ \edef\@tempa{\the\@tempcnta}%
+ \multiply\@tempcnta by 100
+ \@tempcntb\luatexversion
+ \advance\@tempcntb by -\@tempcnta
+ \edef\@tempa{\@tempa.\the\@tempcntb.\luatexrevision}%
+ \xdef\snapshotApplication{%
+ {luaTeX}\space\space
+ {0000/00/00 v\@tempa}%
+ }%
+ \endgroup
+ \fi
+\fi
+
+\ifx\snapshotApplication\@empty
+ \ifx\pdftexversion\@@undefined \else
+ \begingroup
+ \ifx\eTeXversion\@@undefined
+ \@tempswafalse
+ \else
+ \@tempswatrue
+ \fi
+ \@tempcnta\pdftexversion
+ \divide\@tempcnta by 100
+ \edef\@tempa{\the\@tempcnta}%
+ \multiply\@tempcnta by 100
+ \@tempcntb\pdftexversion
+ \advance\@tempcntb by -\@tempcnta
+ \ifnum\@tempcntb > 39
+ \@tempswafalse
+ \fi
+ \edef\@tempa{\@tempa.\the\@tempcntb.\pdftexrevision}%
+ \xdef\snapshotApplication{%
+ \if@tempswa
+ {pdfeTeX}\space
+ \else
+ {pdfTeX}\space\space
+ \fi
+ {0000/00/00 v\@tempa}%
+ }%
+ \endgroup
\fi
- {0000/00/00 v0.\number\pdftexversion\pdftexrevision}%
- }%
\fi
-\@ifundefined{snapshotApplication}{%
- \edef\snapshotApplication{%
- {TeX}\space\space\space\space\space
- {1990/03/25 v3.x}%
- }%
-}{}
+
+\ifx\snapshotApplication\@empty
+ \ifx\eTeXversion\@@undefined \else
+ \edef\snapshotApplication{%
+ {eTeX}\space\space\space\space
+ {0000/00/00 v\number\eTeXversion
+ \ifx\eTeXrevision\undefined
+ \ifx\eTeXminorversion\undefined\else.\number\eTeXminorversion\fi
+ \else
+ \eTeXrevision
+ \fi
+ }%
+ }%
+ \fi
+\fi
+\ifx\snapshotApplication\@empty
+ \edef\snapshotApplication{%
+ {TeX}\space\space\space\space\space
+ {1990/03/25 v3.x}%
+ }%
+\fi
\def\@fmtextension{fmt}
\def\@tfmextension{tfm}
\edef\snapx@package{.\@pkgextension}
@@ -121,51 +219,51 @@
\let\snapx@end\@@end
\expandafter\let\csname snapx@-------\endcsname\snapx@end
\def\snap@store@b#1#2#3#4{%
- \ifx#1\snapx@end
- \@xp\snap@finish
- \else
- \ifx#1\relax \let#1\@empty\fi
- \def\@tempa##1 ##2 ##3\@nil{##1 ##2}%
- \ifx#1\snapx@application
- \@xp\xdef\csname rqv@#3#1\endcsname{\@tempa#4 v?.? ? \relax\@nil}%
+ \ifx#1\snapx@end
+ \@xp\snap@finish
\else
- \xdef\rqv@list{\rqv@list{#3#1}}%
- \@xp\xdef\csname rqv@#3#1\endcsname{\@tempa#4 v?.? ? \relax\@nil}%
- \snap@intest{#3}{#1}%
- \ifx#1\snapx@format \snap@check{#3.fmt}%
- \else
- \edef\@tempa{\@nx\string@equal{snapshot.sty}{#3#1}}%
- \if\@tempa \snap@selfcheck \fi
- \fi
+ \ifx#1\relax \let#1\@empty\fi
+ \def\@tempa##1 ##2 ##3\@nil{##1 ##2}%
+ \ifx#1\snapx@application
+ \@xp\xdef\csname rqv@#3#1\endcsname{\@tempa#4 v?.? ? \relax\@nil}%
+ \else
+ \xdef\rqv@list{\rqv@list{#3#1}}%
+ \@xp\xdef\csname rqv@#3#1\endcsname{\@tempa#4 v?.? ? \relax\@nil}%
+ \snap@intest{#3}{#1}%
+ \ifx#1\snapx@format \snap@check{#3.fmt}\else
+ \edef\@tempa{\@nx\string@equal{snapshot.sty}{#3#1}}%
+ \if\@tempa \snap@selfcheck \fi
+ \fi
+ \fi
\fi
- \fi
- \futurelet\@let@token\snap@branch
+ \futurelet\@let@token\snap@branch
}
+
\@onlypreamble\snap@store@b
\def\snap@write{\immediate\write\snap@out}
\let\snap@out\sixt@@n % fallback, probably never used
\DeclareOption{dep}{%
- \def\snap@write{\immediate\write\snap@out}%
+ \def\snap@write{\immediate\write\snap@out}%
}
\DeclareOption{log}{%
- \let\snap@write\typeout
+ \let\snap@write\typeout
}
\let\snap@intest=\@gobbletwo
\DeclareOption{test}{\def\snap@intest{True}}
\DeclareOption{tfm}{%
- \typeout{Option 'tfm' not implemented yet [1999/09/23]}%
+ \typeout{Option 'tfm' not implemented yet [1999/09/23]}%
}
\def\snap@mismatch@warning#1#2#3{\PackageWarningNoLine{#1}{#2}}
\def\snap@mismatch{\snap@mismatch@warning}
\DeclareOption{error}{%
- \def\snap@mismatch{\PackageError}%
- \def\snap@selfcheck{\snap@selfcheck@a}%
- \ifx\snap@select\@empty \let\snap@select\snap@select@all \fi
+ \def\snap@mismatch{\PackageError}%
+ \def\snap@selfcheck{\snap@selfcheck@a}%
+ \ifx\snap@select\@empty \let\snap@select\snap@select@all \fi
}
\DeclareOption{warning}{%
- \def\snap@mismatch{\snap@mismatch@warning}%
- \def\snap@selfcheck{\snap@selfcheck@a}%
- \ifx\snap@select\@empty \let\snap@select\snap@select@all \fi
+ \def\snap@mismatch{\snap@mismatch@warning}%
+ \def\snap@selfcheck{\snap@selfcheck@a}%
+ \ifx\snap@select\@empty \let\snap@select\snap@select@all \fi
}
\def\snap@select@all#1#2 #3#4 #5\@nil{#1#2 #3#4}
\let\snap@select\@empty
@@ -187,23 +285,23 @@
\DeclareOption{bbinfo}{\def\snap@bbinfo{00}}
\let\snap@splitter=?
\AtBeginDocument{%
- \xdef\@filelist{\@filelist\snap@splitter}%
+ \xdef\@filelist{\@filelist\snap@splitter}%
}
\let\snap@selfcheck\@empty
\let\snap@selfcheck@a\@empty
\DeclareOption{self-warning}{%
- \def\snap@selfcheck{%
- \begingroup
- \def\snap@mismatch{\snap@mismatch@warning}%
- \snap@selfcheck@a
- \endgroup
- }
+ \def\snap@selfcheck{%
+ \begingroup
+ \def\snap@mismatch{\snap@mismatch@warning}%
+ \snap@selfcheck@a
+ \endgroup
+ }
}
\ExecuteOptions{warning}
\ProcessOptions\relax
\edef\snap@restore@extensions{%
- \def\@nx\@pkgextension{\@pkgextension}%
- \def\@nx\@clsextension{\@clsextension}%
+ \def\@nx\@pkgextension{\@pkgextension}%
+ \def\@nx\@clsextension{\@clsextension}%
}
\def\snap@pad#1#2#3#4#5#6#7#8#9{\snap@pad@a{#1#2#3#4#5#6#7#8#9}}
\def\snap@pad@a#1#2#3#4#5\@nil{\snap@pad@b#1#2#3#4\space\@nil}
@@ -215,300 +313,315 @@
\edef\@tempc#1\fmtname{#1\fmtname}\@tempc
\def\@tempa#1,\fmtname.fmt,#2#3\@nil{#2}
\edef\@tempb{\@nx\@tempa,\@filelist,\fmtname.fmt,}
+
\if ?\@tempb?\@nil
- \edef\@filelist{\fmtname.fmt,\@filelist}%
- \def\@tempc{LaTeX2e}%
- \@xp\edef\csname ver@\fmtname.fmt\endcsname{%
- \fmtversion\space
- v\ifx\@tempc\fmtname 2.e\else ?.?\fi
- }%
+ \edef\@filelist{\fmtname.fmt,\@filelist}%
+ \def\@tempc{LaTeX2e}%
+ \@xp\edef\csname ver@\fmtname.fmt\endcsname{%
+ \fmtversion\space
+ v\ifx\@tempc\fmtname 2.e\else ?.?\fi
+ }%
\fi
\listfiles
\def\snap@doit#1{%
- \begingroup
- \ifx\delimiter#1\delimiter
- \else
- \filename@parse{#1}%
- \let\@tempd\@empty
- \ifx\filename@ext\relax
- \def\@tempa{file}\def\@tempb{~~~}%
- \else\ifx\filename@ext\@pkgextension
- \def\@tempa{package}\let\@tempb\@empty
- \else\ifx\filename@ext\@clsextension
- \def\@tempa{class}\def\@tempb{~~}%
- \else\ifx\filename@ext\@fmtextension
- \def\@tempa{format}\def\@tempb{~}%
- \else\ifx\filename@ext\@tfmextension
- \def\@tempa{tfm}\def\@tempb{~~~~}%
- \else
- \def\@tempa{file}\edef\@tempd{.\filename@ext}%
- \def\@tempb{~~~}%
- \fi\fi\fi\fi\fi
- \@xp\let\@xp\@tempe
- \csname ver@\filename@base %
- \ifx\filename@ext\relax\else.\filename@ext\fi\endcsname
- \ifx\@tempe\@empty \let\@tempe\relax \fi
- \edef\@tempe{%
- \ifx\@tempe\relax 0000/00/00 v0.0%
- \else
- \@xp\@xp\@xp\snap@trim@version\@xp\@tempe\space v0.0 v0.0 \@nil
- \fi
- }%
- \edef\@tempc{\filename@area\filename@base\@tempd}% full file name
- \@xp\snap@pad\@tempc\space~~~~~~~~~~~~~~~~\@nil\@tempd
- \let~\space
- \snap@write{\space\space *{\@tempa}\@tempb{\@tempc}\@tempd{\@tempe}}%
- \fi
- \aftergroup\snap@doit
- \endgroup
-}%
+ \begingroup
+ \ifx\delimiter#1\delimiter \else
+ \filename@parse{#1}%
+ \let\@tempd\@empty
+ \ifx\filename@ext\relax
+ \def\@tempa{file}\def\@tempb{~~~}%
+ \else\ifx\filename@ext\@pkgextension
+ \def\@tempa{package}\let\@tempb\@empty
+ \else\ifx\filename@ext\@clsextension
+ \def\@tempa{class}\def\@tempb{~~}%
+ \else\ifx\filename@ext\@fmtextension
+ \def\@tempa{format}\def\@tempb{~}%
+ \else\ifx\filename@ext\@tfmextension
+ \def\@tempa{tfm}\def\@tempb{~~~~}%
+ \else
+ \def\@tempa{file}%
+ \edef\@tempd{.\filename@ext}%
+ \def\@tempb{~~~}%
+ \fi\fi\fi\fi\fi
+ \@xp\let\@xp\@tempe
+ \csname ver@\filename@base %
+ \ifx\filename@ext\relax\else.\filename@ext\fi\endcsname
+ \ifx\@tempe\@empty \let\@tempe\relax \fi
+ \edef\@tempe{%
+ \ifx\@tempe\relax 0000/00/00 v0.0%
+ \else
+ \@xp\@xp\@xp\snap@trim@version\@xp\@tempe\space v0.0 v0.0 \@nil
+ \fi
+ }%
+ \edef\@tempc{\filename@area\filename@base\@tempd}% full file name
+ \@xp\snap@pad\@tempc\space~~~~~~~~~~~~~~~~\@nil\@tempd
+ \let~\space
+ \snap@write{\space\space *{\@tempa}\@tempb{\@tempc}\@tempd{\@tempe}}%
+ \fi
+ \aftergroup\snap@doit
+ \endgroup
+}
\def\snap@bracify#1#2,{%
\ifx\@empty#1\expandafter\@gobble\else {#1#2}\fi \snap@bracify
}
\def\snap@splitter@a{%
- \iffalse{{\fi }}% close current file name, end definition
- \xdef\specific@files{%
- \iffalse}\fi
- \specific@files
- \expandafter\@gobble\string % discard one closing brace
+ \iffalse{{\fi }}% close current file name, end definition
+ \xdef\specific@files{%
+ \iffalse}\fi
+ \specific@files
+ \expandafter\@gobble\string % discard one closing brace
}
\def\snap@fdcheck#1{%
- \ifx\delimiter#1\@xp\@gobble
- \else\snap@fda#1\@empty.fd\@empty ?\@nil
- \fi
- \snap@fdcheck
+ \ifx\delimiter#1%
+ \@xp\@gobble
+ \else
+ \snap@fda#1\@empty.fd\@empty ?\@nil
+ \fi
+ \snap@fdcheck
}
+
\def\snap@fda#1.fd\@empty#2#3\@nil{%
- \if ?#2%
- \xdef\specific@files{\specific@files {#1}}%
- \else
- \xdef\general@files{\general@files {#1.fd}}%
- \fi
+ \if ?#2%
+ \xdef\specific@files{\specific@files {#1}}%
+ \else
+ \xdef\general@files{\general@files {#1.fd}}%
+ \fi
}
\let\general@files\@empty
\let\specific@files\@empty
\newcommand{\SpecialInput}[1]{%
- \xdef\specific@files{\specific@files{#1}}%
- \@@input#1\relax
+ \xdef\specific@files{\specific@files{#1}}%
+ \@@input#1\relax
}
\def\@dofilelist{%
- \snap@restore@extensions
- \xdef\general@files{\@xp\snap@bracify \@filelist \@empty,\@empty,}%
- \let\snap@splitter\snap@splitter@a
- \xdef\general@files{\general@files}%
- \let\@tempa\specific@files \global\let\specific@files\@empty
- \@xp\snap@fdcheck\@tempa{\delimiter}%
- \ifx\rqv@list\@empty
- \else \rqv@compare@lists
- \fi
- \ifx\snap@write\typeout
- \else
- \newwrite\snap@out
- \immediate\openout\snap@out=\jobname.dep \relax
- \fi
- \snap@write{\string\RequireVersions\@charlb}%
- \snap@write{\space\space *{application}%
- \snapshotApplication
- }%
- \@xp\snap@doit\general@files{\delimiter\aftergroup\@gobble\@gobble}%
- \ifx\specific@files\@empty
- \else
- \snap@specific
- \fi
- \snap@write{\@charrb}%
- \ifx\snap@write\typeout
- \else \immediate\closeout\snap@out
- \typeout{Dependency list written on \jobname.dep.}%
- \fi
-}%
+ \snap@restore@extensions
+ \xdef\general@files{\@xp\snap@bracify \@filelist \@empty,\@empty,}%
+ \let\snap@splitter\snap@splitter@a
+ \xdef\general@files{\general@files}%
+ \let\@tempa\specific@files
+ \global\let\specific@files\@empty
+ \@xp\snap@fdcheck\@tempa{\delimiter}%
+ \ifx\rqv@list\@empty \else
+ \rqv@compare@lists
+ \fi
+ \ifx\snap@write\typeout \else
+ \newwrite\snap@out
+ \immediate\openout\snap@out=\jobname.dep \relax
+ \fi
+ \snap@write{\string\RequireVersions\@charlb}%
+ \snap@write{\space\space *{application}%
+ \snapshotApplication
+ }%
+ \@xp\snap@doit\general@files{\delimiter\aftergroup\@gobble\@gobble}%
+ \ifx\specific@files\@empty \else
+ \snap@specific
+ \fi
+ \snap@write{\@charrb}%
+ \ifx\snap@write\typeout \else
+ \immediate\closeout\snap@out
+ \typeout{Dependency list written on \jobname.dep.}%
+ \fi
+}
\def\snap@specific{%
- \snap@write{ \space *{-------}{Document-specific files:}{----}}%
- \@xp\snap@doit\specific@files{\delimiter\aftergroup\@gobble\@gobble}%
+ \snap@write{ \space *{-------}{Document-specific files:}{----}}%
+ \@xp\snap@doit\specific@files{\delimiter\aftergroup\@gobble\@gobble}%
}
\def\rqv@condense#1{%
- \@xp\ifx\csname ver@#1\endcsname\N
- \else
- \edef\L{\L{#1}}%
- \@xp\let\csname ver@#1\endcsname=\N
- \fi
- \rqv@condense
+ \@xp\ifx\csname ver@#1\endcsname\N \else
+ \edef\L{\L{#1}}%
+ \@xp\let\csname ver@#1\endcsname=\N
+ \fi
+ \rqv@condense
}
+
\def\rqv@condend{\endcsname ?\fi
- \@xp\@xp\@xp\@gobbletwo\csname @xp\iftrue}
+ \@xp\@xp\@xp\@gobbletwo\csname @xp\iftrue}
\def\rqv@overloaded#1{%
- \snap@mismatch{snapshot}{^^J%
- File #1 loaded though not in \noexpand\RequireVersions list%
- }\@ehc
+ \snap@mismatch{snapshot}{^^J%
+ File #1 loaded though not in \noexpand\RequireVersions list%
+ }\@ehc
}
\def\rqv@notloaded#1{%
- \snap@mismatch{snapshot}{^^J%
- File #1 [\csname rqv@#1\endcsname] required but not loaded%
- }\@ehc
+ \snap@mismatch{snapshot}{^^J%
+ File #1 [\csname rqv@#1\endcsname] required but not loaded%
+ }\@ehc
}
\def\rqv@set#1{\@xp\let\csname ver@#1\endcsname\N \rqv@set}
\def\rqv@test#1{\csname ver@#1\endcsname{#1}\rqv@test}
\def\rqv@compare@lists{%
- \begingroup
- \def\N{1}\let\L\@empty
- \@xp\rqv@condense\rqv@list\rqv@condend
- \global\let\rqv@list=\L
- \def\N{2}\let\L\@empty
- \@xp\rqv@condense\general@files\rqv@condend
- \global\let\general@files=\L
- \def\T{\@firstoftwo{\endcsname\@empty\@gobbletwo}}%
- \let\N\rqv@overloaded \@xp\rqv@set\general@files \T
- \let\N\@gobble \@xp\rqv@set\rqv@list \T
- \@xp\rqv@test\general@files{\endcsname\csname @gobbletwo}%
- \let\N\rqv@notloaded \@xp\rqv@set\rqv@list \T
- \let\N\@gobble \@xp\rqv@set\general@files \T
- \@xp\rqv@test\rqv@list{\endcsname\csname @gobbletwo}%
- \endgroup
+ \begingroup
+ \def\N{1}%
+ \let\L\@empty
+ \@xp\rqv@condense\rqv@list\rqv@condend
+ \global\let\rqv@list=\L
+ \def\N{2}%
+ \let\L\@empty
+ \@xp\rqv@condense\general@files\rqv@condend
+ \global\let\general@files=\L
+ \def\T{\@firstoftwo{\endcsname\@empty\@gobbletwo}}%
+ \let\N\rqv@overloaded \@xp\rqv@set\general@files \T
+ \let\N\@gobble
+ \@xp\rqv@set\rqv@list \T
+ \@xp\rqv@test\general@files{\endcsname\csname @gobbletwo}%
+ \let\N\rqv@notloaded
+ \@xp\rqv@set\rqv@list \T
+ \let\N\@gobble
+ \@xp\rqv@set\general@files \T
+ \@xp\rqv@test\rqv@list{\endcsname\csname @gobbletwo}%
+ \endgroup
}
\AtBeginDocument{%
- \@ifundefined{ver@amsgen}{}{%
- \@xp\let\csname ver@amsgen.sty\@xp\endcsname
- \csname ver@amsgen\endcsname
- }%
+ \@ifundefined{ver@amsgen}{}{%
+ \@xp\let\csname ver@amsgen.sty\@xp\endcsname
+ \csname ver@amsgen\endcsname
+ }%
}
\def\ProvidesFile#1{%
- \def\snap@checker{\snap@check{#1}}%
- \begingroup
- \aftergroup\snap@checker
- \catcode`\ 10
- \ifnum\endlinechar < 256
- \ifnum \endlinechar>\m@ne
- \catcode\endlinechar 10
+ \def\snap@checker{\snap@check{#1}}%
+ \begingroup
+ \aftergroup\snap@checker
+ \catcode`\ 10
+ \ifnum\endlinechar < 256
+ \ifnum \endlinechar>\m@ne
+ \catcode\endlinechar 10
+ \fi
\fi
- \fi
- \@makeother\/%
- \@makeother\&%
- \kernel@ifnextchar[{\snap@providesfile{#1}}{\snap@providesfile{#1}[]}%
+ \@makeother\/%
+ \@makeother\&%
+ \kernel@ifnextchar[{\snap@providesfile{#1}}{\snap@providesfile{#1}[]}%
}
\def\snap@graphic@test#1#2#3\@nil{r\if G#1#2\else X\fi}
\def\snap@providesfile#1[#2]{%
- \wlog{File: #1 #2}%
- \if\snap@graphic@test#2@@\@nil
- \snap@record@graphic#1\relax #2 (type ??)\@nil
- \else
- \expandafter\xdef\csname ver@#1\endcsname{#2}%
- \fi
- \endgroup
+ \wlog{File: #1 #2}%
+ \edef\@tempa{#2}%
+ \if\@xp\snap@graphic@test\@tempa @@\@nil
+ \snap@record@graphic#1\relax #2 (type ??)\@nil
+ \else
+ \@xp\xdef\csname ver@#1\endcsname{#2}%
+ \fi
+ \endgroup
}
\def\snap@record@graphic#1\relax #2(type #3)#4\@nil{%
- \expandafter\xdef\csname ver@#1\endcsname{%
- Graphic%
- \if\snap@bbinfo :bb=\Gin@llx/\Gin@lly/\Gin@urx/\Gin@ury\fi
- \space v0.0%
- }%
+ \expandafter\xdef\csname ver@#1\endcsname{%
+ Graphic%
+ \if\snap@bbinfo :bb=\Gin@llx/\Gin@lly/\Gin@urx/\Gin@ury\fi
+ \space v0.0%
+ }%
}
\def\@pr@videpackage [#1]{%
- \expandafter\xdef\csname ver@\@currname.\@currext\endcsname{#1}%
- \ifx\@currext\@clsextension
- \typeout{Document Class: \@gtempa\space#1}%
- \else
- \wlog{Package: \@gtempa\space#1}%
- \fi
- \snap@check{\@currname.\@currext}%
+ \expandafter\xdef\csname ver@\@currname.\@currext\endcsname{#1}%
+ \ifx\@currext\@clsextension
+ \typeout{Document Class: \@gtempa\space#1}%
+ \else
+ \wlog{Package: \@gtempa\space#1}%
+ \fi
+ \snap@check{\@currname.\@currext}%
}
\def\snap@selfcheck@a{\snap@check{snapshot.sty}}
\def\@nofmt#1.fmt.#2 {#1 }
\def\snap@mismatch@a#1#2#3{%
- \snap@mismatch{snapshot}{^^J%
- \space\space Required version #2 of \@nofmt#1.fmt. and^^J%
- \space\space provided version #3 do not match%
- }\@ehc
+ \snap@mismatch{snapshot}{^^J%
+ \space\space Required version #2 of \@nofmt#1.fmt. and^^J%
+ \space\space provided version #3 do not match%
+ }\@ehc
}
\def\snap@compare@versions#1{%
- \begingroup
- \@ifundefined{rqv@#1}{}{%
- \edef\0{\csname rqv@#1\endcsname}%
- \edef\1{\csname ver@#1\endcsname}%
- \edef\1{\@xp\snap@trim@version\1 v0.0 v0.0 \@nil}%
- \edef\@tempa{\@xp\snap@select\0 v0.0 v0.0 \@nil}%
- \edef\@tempb{\@xp\snap@select\1 v0.0 v0.0 \@nil}%
- \ifx\@tempa\@tempb
- \else
- \edef\@tempd{\@nx\snap@mismatch@a{#1}{\@tempa}{\@tempb}}%
- \@xp\@tempd
- \fi
- }%
- \endgroup
- \snap@test@abort
+ \begingroup
+ \@ifundefined{rqv@#1}{}{%
+ \edef\0{\csname rqv@#1\endcsname}%
+ \edef\1{\csname ver@#1\endcsname}%
+ \edef\1{\@xp\snap@trim@version\1 v0.0 v0.0 \@nil}%
+ \edef\@tempa{\@xp\snap@select\0 v0.0 v0.0 \@nil}%
+ \edef\@tempb{\@xp\snap@select\1 v0.0 v0.0 \@nil}%
+ \ifx\@tempa\@tempb \else
+ \edef\@tempd{\@nx\snap@mismatch@a{#1}{\@tempa}{\@tempb}}%
+ \@xp\@tempd
+ \fi
+ }%
+ \endgroup
+ \snap@test@abort
}
\let\snap@test@abort=\@empty
\ifx\snap@select\@empty
- \let\snap@compare@versions\@gobble
- \let\snap@check\@gobble
+ \let\snap@compare@versions\@gobble
+ \let\snap@check\@gobble
\fi
\providecommand{\controldates}[1]{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifx\snap@intest\@gobbletwo \endinput \fi
\def\restore@some@catcodes{}
\def\save@some@catcodes{%
- \edef\restore@some@catcodes{%
- \catcode\number`\@=\number\catcode`\@
- \catcode\number`\"=\number\catcode`\"
- \catcode\number`\^=\number\catcode`\^
- \catcode\number`\_=\number\catcode`\_
- \relax
- }%
+ \edef\restore@some@catcodes{%
+ \catcode\number`\@=\number\catcode`\@
+ \catcode\number`\"=\number\catcode`\"
+ \catcode\number`\^=\number\catcode`\^
+ \catcode\number`\_=\number\catcode`\_
+ \relax
+ }%
}
\def\snap@intest#1#2{%
- \message{^^J}%
- \begingroup \edef\0{#1#2}\def\9{latex209.def}%
- \ifx\0\9\global\@compatibilitytrue \fi
- \ifx#2\snapx@format
- \def\snap@test@abort{\endgroup}%
- \else
- \edef\N{%
- \noexpand\snap@intest@b{#1#2}%
- {#1}{\@xp\@gobble#2\@empty}%
- {\csname rqv@#1#2\endcsname}}%
- \expandafter\endgroup\N
- \fi
+ \message{^^J}%
+ \begingroup
+ \edef\0{#1#2}%
+ \def\9{latex209.def}%
+ \ifx\0\9\global\@compatibilitytrue \fi
+ \ifx#2\snapx@format
+ \def\snap@test@abort{\endgroup}%
+ \else
+ \edef\N{%
+ \noexpand\snap@intest@b{#1#2}%
+ {#1}{\@xp\@gobble#2\@empty}%
+ {\csname rqv@#1#2\endcsname}}%
+ \expandafter\endgroup\N
+ \fi
}
\def\snap@intest@b#1#2#3#4{%
- \def\@currname{#2}\def\@currext{#3}%
- \begingroup \lccode`\/=`\0\relax\lowercase{\endgroup
- \ifnum\snap@seldate#4 00 0\@nil>\z@
- }% matches \lowercase
- \save@some@catcodes
- \@@input #1 \relax
- \restore@some@catcodes
- \else
- \snap@specialtest{#1}{#4}%
- \fi
+ \def\@currname{#2}%
+ \def\@currext{#3}%
+ \begingroup
+ \lccode`\/=`\0\relax\lowercase{\endgroup
+ \ifnum\snap@seldate#4 00 0\@nil>\z@
+ }% matches \lowercase
+ \save@some@catcodes
+ \@@input #1 \relax
+ \restore@some@catcodes
+ \else
+ \snap@specialtest{#1}{#4}%
+ \fi
}
\def\snap@specialtest#1#2{%
- \fake@input{#1}%
+ \fake@input{#1}%
}
\def\fake@input#1{%
- \begingroup
- % Ensure that outer \foo or unmatched braces don't trip us up
- \catcode`\\=12 \catcode`\{=12 \catcode`\}=12
- \endinput
- \def\G{\@car\endgroup}%
- \expandafter\futurelet\expandafter\?\expandafter\G\@@input#1 \relax\@nil
+ \begingroup
+ % Ensure that outer \foo or unmatched braces don't trip us up
+ \catcode`\\=12
+ \catcode`\{=12
+ \catcode`\}=12
+ \endinput
+ \def\G{\@car\endgroup}%
+ \expandafter\futurelet\expandafter\?\expandafter\G\@@input#1 \relax\@nil
}
\let\snap@test@abort=\endinput
\let\snap@selfcheck=\@empty
\def\snap@finish{%%
- \endgroup \message{^^J}%
- \def\X##1{##1,\X}%
- \edef\@filelist{\@xp\X\rqv@list{\@gobbletwo}}%
- \def\X##1,?{##1}\edef\@filelist{\@xp\X\@filelist ?}%
- \@dofilelist
- \@@end
-}%
+ \endgroup
+ \message{^^J}%
+ \def\X##1{##1,\X}%
+ \edef\@filelist{\@xp\X\rqv@list{\@gobbletwo}}%
+ \def\X##1,?{##1}\edef\@filelist{\@xp\X\@filelist ?}%
+ \@dofilelist
+ \@@end
+}
\def\snap@mismatch#1#2#3{}
\renewcommand{\RequireVersions}[2][]{%
- \begingroup
- \makeatletter
- \def\snap@check{\snap@compare@versions}%%
- \let\snapx@tfm=\snap@ignore
- \def\ProvidesLanguage##1{\ProvidesFile{##1.ldf}}%
- \iffalse{\fi \futurelet\@let@token\snap@branch #2}%
- \endgroup
+ \begingroup
+ \makeatletter
+ \def\snap@check{\snap@compare@versions}%%
+ \let\snapx@tfm=\snap@ignore
+ \def\ProvidesLanguage##1{\ProvidesFile{##1.ldf}}%
+ \iffalse{\fi \futurelet\@let@token\snap@branch #2}%
+ \endgroup
}
\endinput
%%