%%
%% This is file `snapshot.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% snapshot.dtx 
%% 
%% Copyright 2001, 2004, 2006, 2007, 2010, 2012 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
%% 
%% 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.
%% 
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{snapshot}[2012/08/06 v2.13]
\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
}
\def\string@equal#1#2{%
  \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@storem{%
  \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
}
\def\snap@store@error#1{%
  \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}%
}
\@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}%
  }%
\fi
\ifx\pdftexversion\@@undefined
\else
  \edef\snapshotApplication{%
    \ifx\eTeXversion\@@undefined
      {pdfTeX}\space\space
    \else
      {pdfeTeX}\space
    \fi
      {0000/00/00 v0.\number\pdftexversion\pdftexrevision}%
  }%
\fi
\@ifundefined{snapshotApplication}{%
  \edef\snapshotApplication{%
    {TeX}\space\space\space\space\space
    {1990/03/25 v3.x}%
  }%
}{}
\def\@fmtextension{fmt}
\def\@tfmextension{tfm}
\edef\snapx@package{.\@pkgextension}
\edef\snapx@class{.\@clsextension}
\edef\snapx@format{.\@fmtextension}
\edef\snapx@tfm{.\@tfmextension}
\long\def\snapx@ignore{}
\let\snapx@application=\snapx@ignore
\let\snapx@file=\@empty
\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}%
    \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
  \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}%
}
\DeclareOption{log}{%
  \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]}%
}
\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
}
\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@select@all#1#2 #3#4 #5\@nil{#1#2 #3#4}
\let\snap@select\@empty
\def\snap@seldate#1#2 #3\@nil{#1#2}%
\def\snap@selversion#1#2 #3{\snap@select@version #3}%
\def\snap@selmajor#1#2 #3{\snap@select@major #3}%
\DeclareOption{date}{\let\snap@select=\snap@seldate}
\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}
\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}
\DeclareOption{version}{\let\snap@select\snap@selversion}
\DeclareOption{major-version}{\let\snap@select\snap@selmajor}
\def\snap@bbinfo{01}
\DeclareOption{bbinfo}{\def\snap@bbinfo{00}}
\let\snap@splitter=?
\AtBeginDocument{%
  \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
  }
}
\ExecuteOptions{warning}
\ProcessOptions\relax
\edef\snap@restore@extensions{%
  \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}
\def\snap@pad@b#1\space#2\@nil#3{\def#3{#2}}
\def\snap@trim@version#1#2 #3{#1#2 \snap@trim@b #3}
\def\snap@trim@b#1{\ifodd 0#11 v#1\@xp\snap@trim@c\fi \snap@trim@b}
\def\snap@trim@c#1#2 #3\@nil{#2}
\let\rqv@list=\@empty
\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
  }%
\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
}%
\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
}
\def\snap@fdcheck#1{%
  \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
}
\let\general@files\@empty
\let\specific@files\@empty
\newcommand{\SpecialInput}[1]{%
  \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
}%
\def\snap@specific{%
  \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
}
\def\rqv@condend{\endcsname ?\fi
  \@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
}
\def\rqv@notloaded#1{%
  \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
}
\AtBeginDocument{%
  \@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
        \fi
    \fi
    \@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
}
\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%
  }%
}
\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}%
}
\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
}
\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
}
\let\snap@test@abort=\@empty
\ifx\snap@select\@empty
  \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
  }%
}
\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
}
\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\snap@specialtest#1#2{%
  \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
}
\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
}%
\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
}
\endinput
%%
%% End of file `snapshot.sty'.
