summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-09-06 23:22:51 +0000
committerKarl Berry <karl@freefriends.org>2009-09-06 23:22:51 +0000
commitac1fc30e3b72fa74dd581a3ebda79152734b638d (patch)
treebe8a1bab85b9ac042ce39c66c281ed655298bea4 /Master/texmf-dist/tex
parentbfb16a7c8d3c77987590435854c647b54bc6450b (diff)
tablenotes.sty now mynotes.sty? 0.2 (5sep09)
git-svn-id: svn://tug.org/texlive/trunk@15165 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/tablenotes/mynotes.sty699
-rw-r--r--Master/texmf-dist/tex/latex/tablenotes/tablenotes.sty348
2 files changed, 699 insertions, 348 deletions
diff --git a/Master/texmf-dist/tex/latex/tablenotes/mynotes.sty b/Master/texmf-dist/tex/latex/tablenotes/mynotes.sty
new file mode 100644
index 00000000000..d79cbbf4f59
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tablenotes/mynotes.sty
@@ -0,0 +1,699 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% ****************************************
+% * myNOTES x1
+% ****************************************
+%
+% Date of this version: Sun Sep 6 00:25:59 2009
+
+% Matthias Borck-Elsner
+%
+%% Based on endnotes.sty Copyright 2002 John Lavagnino
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% 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.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%
+% Uses an extra external file, with .mnt extension, to hold the
+% text of the mynotes. This may be deleted after the run; a new
+% version is generated each time--it doesn't require information
+% collected from the previous run.
+%
+% This code does not obey \nofiles. Perhaps it should.
+%
+%
+% To turn all the footnotes in your documents into mynotes, say
+%
+% \let\footnote=\mynote
+%
+% in your preamble, and then add something like
+%
+% \newpage
+% \begingroup
+% \parindent 0pt
+% \parskip 2ex
+% \def\mntnotesize{\normalsize}
+% \themynotes
+% \endgroup
+%
+% as the last thing in your document. (But \themynotes all
+% by itself will work.)
+%
+
+%
+%
+% ****************************************
+% * myNOTE COMMANDS *
+% ****************************************
+%
+%
+% \mynote{NOTE} : User command to insert a mynote.
+%
+% \mynote[NUM]{NOTE} : User command to insert a mynote numbered
+% NUM, where NUM is a number -- 1, 2,
+% etc. For example, if mynotes are numbered
+% *, **, etc. within pages, then \mynote[2]{...}
+% produces mynote '**'. This command does not
+% step the mynote counter.
+%
+% \mynotemark[NUM] : Command to produce just the mynote mark in
+% the text, but no mynote. With no argument,
+% it steps the mynote counter before generating
+% the mark.
+%
+% \mynotetext[NUM]{TEXT} : Command to produce the mynote but no
+% mark. \mynote is equivalent to
+% \mynotemark \mynotetext .
+%
+% \addtomynotes{TEXT} : Command to add text or commands to current
+% mynotes file: for inserting headings,
+% pagebreaks, and the like into mynotes
+% sections. TEXT a moving argument:
+% \protect required for fragile commands.
+%
+% ****************************************
+% * myNOTE USER COMMANDS *
+% ****************************************
+%
+% mynotes use the following parameters, similar to those relating
+% to footnotes:
+%
+% \mntnotesize : Size-changing command for mynotes.
+%
+% \themynote : In usual LaTeX style, produces the mynote number.
+%
+% \themntmark : Holds the current mynote's mark--e.g., \dag or '1' or 'a'.
+% (You don't want to set this yourself, as it comes
+% either from the autonumbering of notes or from
+% the optional argument to \mynote. But you'll need
+% to use it if you define your own \makemntmark.)
+%
+% \makemntmark : A macro to generate the mynote marker from \themntmark
+% The default definition is \hbox{$^\themntmark$}.
+%
+% \@makemnttext{NOTE} :
+% Must produce the actual mynote, using \themntmark as the mark
+% of the mynote and NOTE as the text. It is called when effectively
+% inside a \parbox, with \hsize = \columnwidth. For example, it might
+% be as simple as
+% $^{\themntmark}$ NOTE
+%
+%
+% ****************************************
+% * myNOTE PSEUDOCODE *
+% ****************************************
+%
+% \mynote{NOTE} ==
+% BEGIN
+% \stepcounter{mynote}
+% \@themntmark :=G eval (\themynote)
+% \@mynotemark
+% \@mynotetext{NOTE}
+% END
+%
+% \mynote[NUM]{NOTE} ==
+% BEGIN
+% begingroup
+% counter mynote :=L NUM
+% \@themntmark :=G eval (\themynote)
+% endgroup
+% \@mynotemark
+% \@mynotetext{NOTE}
+% END
+%
+% \@mynotetext{NOTE} ==
+% BEGIN
+% write to \@mntnotes file: "\@doanmntnote{myNOTE MARK}"
+% begingroup
+% \next := NOTE
+% set \newlinechar for \write to \space
+% write to \@mntnotes file: \meaning\next
+% (that is, "macro:->NOTE)
+% endgroup
+% END
+%
+% \addtomynotes{TEXT} ==
+% BEGIN
+% open mynotes file if not already open
+% begingroup
+% let \protect to \string
+% set \newlinechar for \write to \space
+% write TEXT to \@mntnotes file
+% endgroup
+% END
+%
+% \mynotemark ==
+% BEGIN \stepcounter{mynote}
+% \@themntmark :=G eval(\themynote)
+% \@mynotemark
+% END
+%
+% \mynotemark[NUM] ==
+% BEGIN
+% begingroup
+% mynote counter :=L NUM
+% \@themntmark :=G eval(\themynote)
+% endgroup
+% \@mynotemark
+% END
+%
+% \@mynotemark ==
+% BEGIN
+% \leavevmode
+% IF hmode THEN \@x@sf := \the\spacefactor FI
+% \makemntmark % put number in main text
+% IF hmode THEN \spacefactor := \@x@sf FI
+% END
+%
+% \mynotetext ==
+% BEGIN \@themntmark :=G eval (\themynote)
+% \@mynotetext
+% END
+%
+% \mynotetext[NUM] ==
+% BEGIN begingroup counter mynote :=L NUM
+% \@themntmark :=G eval (\themynote)
+% endgroup
+% \@mynotetext
+% END
+%
+% ****************************************
+% * myNOTE MACROS *
+% ****************************************
+%
+
+\@definecounter{mynote}
+\def\themynote{\@arabic\c@mynote}
+
+\def\@makemntmark{\hbox{\@textsuperscript{\begin{tiny}\@themntmark\end{tiny}}}}
+\def\makemntmark{\@makemntmark}
+
+\def\themntmark{\@themntmark}
+
+\newdimen\mynotesep
+
+\def\mynote{\@ifnextchar[\@xmynote{\stepcounter{mynote}%
+ \protected@xdef\@themntmark{\themynote}%
+ \@mynotemark\@mynotetext}}
+
+\def\@xmynote[#1]{
+ \begingroup
+ \c@mynote=#1\relax
+ \unrestored@protected@xdef\@themntmark{\themynote}%
+ \endgroup
+ \@mynotemark\@mynotetext }
+
+% Here begins a section of mynote code that's really different from
+% the footnote code of LaTeX.
+
+\let\@doanmntnote=0
+\let\@endanmntnote=0
+
+\newwrite\@mntnotes
+\newif\if@mntnotesopen \global\@mntnotesopenfalse
+
+\def\@openmntnotes{\immediate\openout\@mntnotes=\jobname.mnt\relax
+ \global\@mntnotesopentrue}
+
+% The stuff with \next and \meaning is a trick from the TeXbook, 382,
+% there intended for setting verbatim text, but here used to avoid
+% macro expansion when the footnote text is written. \next will have
+% the entire text of the footnote as one long line, which might well
+% overflow limits on output line length; the business with \newlinechar
+% makes every space become a newline in the \@mntnotes file, so that all
+% of the lines wind up being quite short.
+
+\long\def\@mynotetext#1{%
+ \if@mntnotesopen \else \@openmntnotes \fi
+ \immediate\write\@mntnotes{\@doanmntnote{\@themntmark}}%
+ \begingroup
+ \def\next{#1}%
+ \newlinechar='40
+ \immediate\write\@mntnotes{\meaning\next}%
+ \endgroup
+ \immediate\write\@mntnotes{\@endanmntnote}}
+
+% \addtomynotes works the way the other mynote macros probably should
+% have, requiring the use of \protect for fragile commands.
+
+\long\def\addtomynotes#1{%
+ \if@mntnotesopen \else \@openmntnotes \fi
+ \begingroup
+ \newlinechar='40
+ \let\protect\string
+ \immediate\write\@mntnotes{#1}%
+ \endgroup}
+
+% End of unique mynote code
+
+\def\mynotemark{%
+ \@ifnextchar[\@xmynotemark
+ {\stepcounter{mynote}%
+ \protected@xdef\@themntmark{\themynote}%
+ \@mynotemark}}
+
+\def\@xmynotemark[#1]{%
+ \begingroup
+ \c@mynote #1\relax
+ \unrestored@protected@xdef\@themntmark{\themynote}%
+ \endgroup
+ \@mynotemark}
+
+\def\@mynotemark{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
+ \makemntmark
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax}
+
+\def\mynotetext{
+ \@ifnextchar [\@xmynotenext
+ {\protected@xdef\@themntmark{\themynote}%
+ \@mynotetext}}
+
+\def\@xmynotenext[#1]{\begingroup \c@mynote=#1\relax
+ \xdef\@themntmark{\themynote}\endgroup \@mynotetext}
+
+\def\@xmynotenext[#1]{%
+ \begingroup
+ \c@mynote=#1\relax
+ \unrestored@protected@xdef\@themntmark{\themynote}%
+ \endgroup
+ \@mynotetext}
+
+
+% \themynotes actually prints out the mynotes.
+
+% The user may want separate mynotes for each chapter, or a big
+% block of them at the end of the whole document. As it stands,
+% either will work; you just say \themynotes wherever you want the
+% mynotes so far to be inserted. However, you must add
+% \setcounter{mynote}{0} after that if you want subsequent mynotes
+% to start numbering at 1 again.
+
+% \mntnoteformat is provided so user can specify some special formatting
+% for the mynotes. It needs to set up the paragraph parameters, start
+% the paragraph, and print the label. The \mbox stuff in \mntnoteheading
+% is to make and undo a dummy paragraph, to get around the games \section*
+% plays with paragraph indenting and instead give us uniform
+% indenting for all notes.
+
+\def\mntnotesname{ mynotes }
+\def\mntnoteheading{ \subsubsection*{\mntnotesname
+ \@mkboth{\MakeUppercase{\mntnotesname}}{\MakeUppercase{\mntnotesname}}}
+ \mbox{ }\par\vskip-\baselineskip}
+
+\def\mntnoteformat{\rightskip\z@ \leftskip\z@ \parindent=1.8em
+ \leavevmode\llap{\makemntmark}}
+
+\def\mntnotesize{\footnotesize}
+
+\def\themynotes{\immediate\closeout\@mntnotes \global\@mntnotesopenfalse
+ \begingroup
+ \makeatletter
+ %
+ % The machinery with \@ResetGT and > here ensures that
+ % \@doanmntnote works properly even if > is an active character
+ % at the point where \themynotes is invoked. > needs to have
+ % catcode 12 when the arguments of \@doanmntnote are scanned, so
+ % that the > in the string "macro:->" is matched. The actual
+ % footnote text is not an argument to \@doanmntnote, but just
+ % follows it in the .mnt file; so \@ResetGT can reset the
+ % category code for > that should be used when processing
+ % that text. That resetting takes place within a
+ % \begingroup-\endgroup block set up by \@doanmntnote and
+ % \@endanmntnote, so the catcode for > is back to 12 for the
+ % next note.
+ %
+ \edef\@tempa{`\string >}%
+ \ifnum\catcode\@tempa=12%
+ \let\@ResetGT\relax
+ \else
+ \edef\@ResetGT{\noexpand\catcode\@tempa=\the\catcode\@tempa}%
+ \@makeother\>%
+ \fi
+ \def\@doanmntnote##1##2>{\def\@themntmark{##1}\par\begingroup
+ \@ResetGT
+ \edef\@currentlabel{\csname p@mynote\endcsname\@themntmark}%
+ \mntnoteformat}
+ \def\@endanmntnote{\par\endgroup}%
+ \mntnoteheading
+ \mntnotesize
+ \input{\jobname.mnt}%
+ \endgroup}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% ****************************************
+% * noNOTES x2
+% ****************************************
+%
+% Date of this version: 28 August 2009.
+% Matthias Borck-Elsner
+%
+%% Based on endnotes.sty Copyright 2002 John Lavagnino
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% 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.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%
+% Uses an extra external file, with .not extension, to hold the
+% text of the nonotes. This may be deleted after the run; a new
+% version is generated each time--it doesn't require information
+% collected from the previous run.
+%
+% This code does not obey \nofiles. Perhaps it should.
+%
+%
+% To turn all the footnotes in your documents into nonotes, say
+%
+% \let\footnote=\nonote
+%
+% in your preamble, and then add something like
+%
+% \newpage
+% \begingroup
+% \parindent 0pt
+% \parskip 2ex
+% \def\notnotesize{\normalsize}
+% \thenonotes
+% \endgroup
+%
+% as the last thing in your document. (But \thenonotes all
+% by itself will work.)
+%
+
+%
+%
+% ****************************************
+% * noNOTE COMMANDS *
+% ****************************************
+%
+%
+% \nonote{NOTE} : User command to insert a nonote.
+%
+% \nonote[NUM]{NOTE} : User command to insert a nonote numbered
+% NUM, where NUM is a number -- 1, 2,
+% etc. For example, if nonotes are numbered
+% *, **, etc. within pages, then \nonote[2]{...}
+% produces nonote '**'. This command does not
+% step the nonote counter.
+%
+% \nonotemark[NUM] : Command to produce just the nonote mark in
+% the text, but no nonote. With no argument,
+% it steps the nonote counter before generating
+% the mark.
+%
+% \nonotetext[NUM]{TEXT} : Command to produce the nonote but no
+% mark. \nonote is equivalent to
+% \nonotemark \nonotetext .
+%
+% \addtononotes{TEXT} : Command to add text or commands to current
+% nonotes file: for inserting headings,
+% pagebreaks, and the like into nonotes
+% sections. TEXT a moving argument:
+% \protect required for fragile commands.
+%
+% ****************************************
+% * noNOTE USER COMMANDS *
+% ****************************************
+%
+% nonotes use the following parameters, similar to those relating
+% to footnotes:
+%
+% \notnotesize : Size-changing command for nonotes.
+%
+% \thenonote : In usual LaTeX style, produces the nonote number.
+%
+% \thenotmark : Holds the current nonote's mark--e.g., \dag or '1' or 'a'.
+% (You don't want to set this yourself, as it comes
+% either from the autonumbering of notes or from
+% the optional argument to \nonote. But you'll need
+% to use it if you define your own \makenotmark.)
+%
+% \makenotmark : A macro to generate the nonote marker from \thenotmark
+% The default definition is \hbox{$^\thenotmark$}.
+%
+% \@makenottext{NOTE} :
+% Must produce the actual nonote, using \thenotmark as the mark
+% of the nonote and NOTE as the text. It is called when effectively
+% inside a \parbox, with \hsize = \columnwidth. For example, it might
+% be as simple as
+% $^{\thenotmark}$ NOTE
+%
+%
+% ****************************************
+% * noNOTE PSEUDOCODE *
+% ****************************************
+%
+% \nonote{NOTE} ==
+% BEGIN
+% \stepcounter{nonote}
+% \@thenotmark :=G eval (\thenonote)
+% \@nonotemark
+% \@nonotetext{NOTE}
+% END
+%
+% \nonote[NUM]{NOTE} ==
+% BEGIN
+% begingroup
+% counter nonote :=L NUM
+% \@thenotmark :=G eval (\thenonote)
+% endgroup
+% \@nonotemark
+% \@nonotetext{NOTE}
+% END
+%
+% \@nonotetext{NOTE} ==
+% BEGIN
+% write to \@notnotes file: "\@doannotnote{noNOTE MARK}"
+% begingroup
+% \next := NOTE
+% set \newlinechar for \write to \space
+% write to \@notnotes file: \meaning\next
+% (that is, "macro:->NOTE)
+% endgroup
+% END
+%
+% \addtononotes{TEXT} ==
+% BEGIN
+% open nonotes file if not already open
+% begingroup
+% let \protect to \string
+% set \newlinechar for \write to \space
+% write TEXT to \@notnotes file
+% endgroup
+% END
+%
+% \nonotemark ==
+% BEGIN \stepcounter{nonote}
+% \@thenotmark :=G eval(\thenonote)
+% \@nonotemark
+% END
+%
+% \nonotemark[NUM] ==
+% BEGIN
+% begingroup
+% nonote counter :=L NUM
+% \@thenotmark :=G eval(\thenonote)
+% endgroup
+% \@nonotemark
+% END
+%
+% \@nonotemark ==
+% BEGIN
+% \leavevmode
+% IF hmode THEN \@x@sf := \the\spacefactor FI
+% \makenotmark % put number in main text
+% IF hmode THEN \spacefactor := \@x@sf FI
+% END
+%
+% \nonotetext ==
+% BEGIN \@thenotmark :=G eval (\thenonote)
+% \@nonotetext
+% END
+%
+% \nonotetext[NUM] ==
+% BEGIN begingroup counter nonote :=L NUM
+% \@thenotmark :=G eval (\thenonote)
+% endgroup
+% \@nonotetext
+% END
+%
+% ****************************************
+% * noNOTE MACROS *
+% ****************************************
+%
+
+\@definecounter{nonote}
+\def\thenonote{\@arabic\c@nonote}
+
+\def\@makenotmark{\hbox{\@textsuperscript{\begin{tiny}\@thenotmark\end{tiny}}}}
+\def\makenotmark{\@makenotmark}
+
+\def\thenotmark{\@thenotmark}
+
+\newdimen\nonotesep
+
+\def\nonote{\@ifnextchar[\@xnonote{\stepcounter{nonote}%
+ \protected@xdef\@thenotmark{\thenonote}%
+ \@nonotemark\@nonotetext}}
+
+\def\@xnonote[#1]{
+ \begingroup
+ \c@nonote=#1\relax
+ \unrestored@protected@xdef\@thenotmark{\thenonote}%
+ \endgroup
+ \@nonotemark\@nonotetext }
+
+% Here begins a section of nonote code that's really different from
+% the footnote code of LaTeX.
+
+\let\@doannotnote=0
+\let\@endannotnote=0
+
+\newwrite\@notnotes
+\newif\if@notnotesopen \global\@notnotesopenfalse
+
+\def\@opennotnotes{\immediate\openout\@notnotes=\jobname.not\relax
+ \global\@notnotesopentrue}
+
+% The stuff with \next and \meaning is a trick from the TeXbook, 382,
+% there intended for setting verbatim text, but here used to avoid
+% macro expansion when the footnote text is written. \next will have
+% the entire text of the footnote as one long line, which might well
+% overflow limits on output line length; the business with \newlinechar
+% makes every space become a newline in the \@notnotes file, so that all
+% of the lines wind up being quite short.
+
+\long\def\@nonotetext#1{
+ \if@notnotesopen \else \@opennotnotes \fi
+ \immediate\write\@notnotes{\@doannotnote{\@thenotmark}}%
+ \begingroup
+ \def\next{#1}%
+ \newlinechar='40
+ \immediate\write\@notnotes{\meaning\next}%
+ \endgroup
+ \immediate\write\@notnotes{\@endannotnote}}
+
+% \addtononotes works the way the other nonote macros probably should
+% have, requiring the use of \protect for fragile commands.
+
+\long\def\addtononotes#1{%
+ \if@notnotesopen \else \@opennotnotes \fi
+ \begingroup
+ \newlinechar='40
+ \let\protect\string
+ \immediate\write\@notnotes{#1}%
+ \endgroup}
+
+% End of unique nonote code
+
+\def\nonotemark{%
+ \@ifnextchar[\@xnonotemark
+ {\stepcounter{nonote}%
+ \protected@xdef\@thenotmark{\thenonote}%
+ \@nonotemark}}
+
+\def\@xnonotemark[#1]{%
+ \begingroup
+ \c@nonote #1\relax
+ \unrestored@protected@xdef\@thenotmark{\thenonote}%
+ \endgroup
+ \@nonotemark}
+
+\def\@nonotemark{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
+ \makenotmark
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax}
+
+\def\nonotetext{%
+ \@ifnextchar [\@xnonotenext
+ {\protected@xdef\@thenotmark{\thenonote}%
+ \@nonotetext}}
+
+\def\@xnonotenext[#1]{\begingroup \c@nonote=#1\relax
+ \xdef\@thenotmark{\thenonote}\endgroup \@nonotetext}
+
+\def\@xnonotenext[#1]{%
+ \begingroup
+ \c@nonote=#1\relax
+ \unrestored@protected@xdef\@thenotmark{\thenonote}%
+ \endgroup
+ \@nonotetext}
+
+
+% \thenonotes actually prints out the nonotes.
+
+% The user may want separate nonotes for each chapter, or a big
+% block of them at the end of the whole document. As it stands,
+% either will work; you just say \thenonotes wherever you want the
+% nonotes so far to be inserted. However, you must add
+% \setcounter{nonote}{0} after that if you want subsequent nonotes
+% to start numbering at 1 again.
+
+% \notnoteformat is provided so user can specify some special formatting
+% for the nonotes. It needs to set up the paragraph parameters, start
+% the paragraph, and print the label. The \mbox stuff in \notnoteheading
+% is to make and undo a dummy paragraph, to get around the games \section*
+% plays with paragraph indenting and instead give us uniform
+% indenting for all notes.
+
+\def\notnotesname{ nonotes }
+\def\notnoteheading{\subsubsection*{\notnotesname
+ \@mkboth{\MakeUppercase{\notnotesname}}{\MakeUppercase{\notnotesname}}}
+ \mbox{}\par\vskip-\baselineskip}
+
+\def\notnoteformat{\rightskip\z@ \leftskip\z@ \parindent=1.8em
+ \leavevmode\llap{\makenotmark}}
+
+\def\notnotesize{\footnotesize}
+
+\def\thenonotes{\immediate\closeout\@notnotes \global\@notnotesopenfalse
+ \begingroup
+ \makeatletter
+ %
+ % The machinery with \@ResetGT and > here ensures that
+ % \@doannotnote works properly even if > is an active character
+ % at the point where \thenonotes is invoked. > needs to have
+ % catcode 12 when the arguments of \@doannotnote are scanned, so
+ % that the > in the string "macro:->" is matched. The actual
+ % footnote text is not an argument to \@doannotnote, but just
+ % follows it in the .not file; so \@ResetGT can reset the
+ % category code for > that should be used when processing
+ % that text. That resetting takes place within a
+ % \begingroup-\endgroup block set up by \@doannotnote and
+ % \@endannotnote, so the catcode for > is back to 12 for the
+ % next note.
+ %
+ \edef\@tempa{`\string >}%
+ \ifnum\catcode\@tempa=12%
+ \let\@ResetGT\relax
+ \else
+ \edef\@ResetGT{\noexpand\catcode\@tempa=\the\catcode\@tempa}%
+ \@makeother\>%
+ \fi
+ \def\@doannotnote##1##2>{\def\@thenotmark{##1}\par\begingroup
+ \@ResetGT
+ \edef\@currentlabel{\csname p@nonote\endcsname\@thenotmark}%
+ \notnoteformat}
+ \def\@endannotnote{\par\endgroup}%
+ \notnoteheading
+ \notnotesize
+ \input{\jobname.not}
+ \endgroup}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
diff --git a/Master/texmf-dist/tex/latex/tablenotes/tablenotes.sty b/Master/texmf-dist/tex/latex/tablenotes/tablenotes.sty
deleted file mode 100644
index 13a601f9a3e..00000000000
--- a/Master/texmf-dist/tex/latex/tablenotes/tablenotes.sty
+++ /dev/null
@@ -1,348 +0,0 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% ****************************************
-% * TABNOTES *
-% ****************************************
-%
-% Date of this version: 28 August 2009.
-% Matthias Borck-Elsner
-%
-%% Based on endnotes.sty Copyright 2002 John Lavagnino
-%%
-%% This file may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.2
-%% 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.2 or later is part of all distributions of LaTeX
-%% version 1999/12/01 or later.
-%
-% Uses an extra external file, with .tne extension, to hold the
-% text of the tabnotes. This may be deleted after the run; a new
-% version is generated each time--it doesn't require information
-% collected from the previous run.
-%
-% This code does not obey \nofiles. Perhaps it should.
-%
-%
-% To turn all the footnotes in your documents into tabnotes, say
-%
-% \let\footnote=\tabnote
-%
-% in your preamble, and then add something like
-%
-% \newpage
-% \begingroup
-% \parindent 0pt
-% \parskip 2ex
-% \def\tnotesize{\normalsize}
-% \thetabnotes
-% \endgroup
-%
-% as the last thing in your document. (But \thetabnotes all
-% by itself will work.)
-%
-
-%
-%
-% ****************************************
-% * TABNOTE COMMANDS *
-% ****************************************
-%
-%
-% \tabnote{NOTE} : User command to insert a tabnote.
-%
-% \tabnote[NUM]{NOTE} : User command to insert a tabnote numbered
-% NUM, where NUM is a number -- 1, 2,
-% etc. For example, if tabnotes are numbered
-% *, **, etc. within pages, then \tabnote[2]{...}
-% produces tabnote '**'. This command does not
-% step the tabnote counter.
-%
-% \tabnotemark[NUM] : Command to produce just the tabnote mark in
-% the text, but no tabnote. With no argument,
-% it steps the tabnote counter before generating
-% the mark.
-%
-% \tabnotetext[NUM]{TEXT} : Command to produce the tabnote but no
-% mark. \tabnote is equivalent to
-% \tabnotemark \tabnotetext .
-%
-% \addtotabnotes{TEXT} : Command to add text or commands to current
-% tabnotes file: for inserting headings,
-% pagebreaks, and the like into tabnotes
-% sections. TEXT a moving argument:
-% \protect required for fragile commands.
-%
-% ****************************************
-% * TABNOTE USER COMMANDS *
-% ****************************************
-%
-% Tabnotes use the following parameters, similar to those relating
-% to footnotes:
-%
-% \tnotesize : Size-changing command for tabnotes.
-%
-% \thetabnote : In usual LaTeX style, produces the tabnote number.
-%
-% \thetnmark : Holds the current tabnote's mark--e.g., \dag or '1' or 'a'.
-% (You don't want to set this yourself, as it comes
-% either from the autonumbering of notes or from
-% the optional argument to \tabnote. But you'll need
-% to use it if you define your own \maketnmark.)
-%
-% \maketnmark : A macro to generate the tabnote marker from \thetnmark
-% The default definition is \hbox{$^\thetnmark$}.
-%
-% \@makeentext{NOTE} :
-% Must produce the actual tabnote, using \thetnmark as the mark
-% of the tabnote and NOTE as the text. It is called when effectively
-% inside a \parbox, with \hsize = \columnwidth. For example, it might
-% be as simple as
-% $^{\thetnmark}$ NOTE
-%
-%
-% ****************************************
-% * TABNOTE PSEUDOCODE *
-% ****************************************
-%
-% \tabnote{NOTE} ==
-% BEGIN
-% \stepcounter{tabnote}
-% \@thetnmark :=G eval (\thetabnote)
-% \@tabnotemark
-% \@tabnotetext{NOTE}
-% END
-%
-% \tabnote[NUM]{NOTE} ==
-% BEGIN
-% begingroup
-% counter tabnote :=L NUM
-% \@thetnmark :=G eval (\thetabnote)
-% endgroup
-% \@tabnotemark
-% \@tabnotetext{NOTE}
-% END
-%
-% \@tabnotetext{NOTE} ==
-% BEGIN
-% write to \@tnotes file: "\@doantnote{TABNOTE MARK}"
-% begingroup
-% \next := NOTE
-% set \newlinechar for \write to \space
-% write to \@tnotes file: \meaning\next
-% (that is, "macro:->NOTE)
-% endgroup
-% END
-%
-% \addtotabnotes{TEXT} ==
-% BEGIN
-% open tabnotes file if not already open
-% begingroup
-% let \protect to \string
-% set \newlinechar for \write to \space
-% write TEXT to \@tnotes file
-% endgroup
-% END
-%
-% \tabnotemark ==
-% BEGIN \stepcounter{tabnote}
-% \@thetnmark :=G eval(\thetabnote)
-% \@tabnotemark
-% END
-%
-% \tabnotemark[NUM] ==
-% BEGIN
-% begingroup
-% tabnote counter :=L NUM
-% \@thetnmark :=G eval(\thetabnote)
-% endgroup
-% \@tabnotemark
-% END
-%
-% \@tabnotemark ==
-% BEGIN
-% \leavevmode
-% IF hmode THEN \@x@sf := \the\spacefactor FI
-% \maketnmark % put number in main text
-% IF hmode THEN \spacefactor := \@x@sf FI
-% END
-%
-% \tabnotetext ==
-% BEGIN \@thetnmark :=G eval (\thetabnote)
-% \@tabnotetext
-% END
-%
-% \tabnotetext[NUM] ==
-% BEGIN begingroup counter tabnote :=L NUM
-% \@thetnmark :=G eval (\thetabnote)
-% endgroup
-% \@tabnotetext
-% END
-%
-% ****************************************
-% * ENDNOTE MACROS *
-% ****************************************
-%
-
-\@definecounter{tabnote}
-\def\thetabnote{\@arabic\c@tabnote}
-
-\def\@maketnmark{\hbox{\@textsuperscript{\normalfont\@thetnmark}}}
-\def\maketnmark{\@maketnmark}
-
-\def\thetnmark{\@thetnmark}
-
-\newdimen\tabnotesep
-
-\def\tabnote{\@ifnextchar[\@xtabnote{\stepcounter{tabnote}%
- \protected@xdef\@thetnmark{\thetabnote}%
- \@tabnotemark\@tabnotetext}}
-
-\def\@xtabnote[#1]{%
- \begingroup
- \c@tabnote=#1\relax
- \unrestored@protected@xdef\@thetnmark{\thetabnote}%
- \endgroup
- \@tabnotemark\@tabnotetext}
-
-% Here begins a section of tabnote code that's really different from
-% the footnote code of LaTeX.
-
-\let\@doantnote=0
-\let\@endantnote=0
-
-\newwrite\@tnotes
-\newif\if@tnotesopen \global\@tnotesopenfalse
-
-\def\@opentnotes{\immediate\openout\@tnotes=\jobname.tne\relax
- \global\@tnotesopentrue}
-
-% The stuff with \next and \meaning is a trick from the TeXbook, 382,
-% there intended for setting verbatim text, but here used to avoid
-% macro expansion when the footnote text is written. \next will have
-% the entire text of the footnote as one long line, which might well
-% overflow limits on output line length; the business with \newlinechar
-% makes every space become a newline in the \@tnotes file, so that all
-% of the lines wind up being quite short.
-
-\long\def\@tabnotetext#1{%
- \if@tnotesopen \else \@opentnotes \fi
- \immediate\write\@tnotes{\@doantnote{\@thetnmark}}%
- \begingroup
- \def\next{#1}%
- \newlinechar='40
- \immediate\write\@tnotes{\meaning\next}%
- \endgroup
- \immediate\write\@tnotes{\@endantnote}}
-
-% \addtotabnotes works the way the other tabnote macros probably should
-% have, requiring the use of \protect for fragile commands.
-
-\long\def\addtotabnotes#1{%
- \if@tnotesopen \else \@opentnotes \fi
- \begingroup
- \newlinechar='40
- \let\protect\string
- \immediate\write\@tnotes{#1}%
- \endgroup}
-
-% End of unique tabnote code
-
-\def\tabnotemark{%
- \@ifnextchar[\@xtabnotemark
- {\stepcounter{tabnote}%
- \protected@xdef\@thetnmark{\thetabnote}%
- \@tabnotemark}}
-
-\def\@xtabnotemark[#1]{%
- \begingroup
- \c@tabnote #1\relax
- \unrestored@protected@xdef\@thetnmark{\thetabnote}%
- \endgroup
- \@tabnotemark}
-
-\def\@tabnotemark{%
- \leavevmode
- \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
- \maketnmark
- \ifhmode\spacefactor\@x@sf\fi
- \relax}
-
-\def\tabnotetext{%
- \@ifnextchar [\@xtabnotenext
- {\protected@xdef\@thetnmark{\thetabnote}%
- \@tabnotetext}}
-
-\def\@xtabnotenext[#1]{\begingroup \c@tabnote=#1\relax
- \xdef\@thetnmark{\thetabnote}\endgroup \@tabnotetext}
-
-\def\@xtabnotenext[#1]{%
- \begingroup
- \c@tabnote=#1\relax
- \unrestored@protected@xdef\@thetnmark{\thetabnote}%
- \endgroup
- \@tabnotetext}
-
-
-% \thetabnotes actually prints out the tabnotes.
-
-% The user may want separate tabnotes for each chapter, or a big
-% block of them at the end of the whole document. As it stands,
-% either will work; you just say \thetabnotes wherever you want the
-% tabnotes so far to be inserted. However, you must add
-% \setcounter{tabnote}{0} after that if you want subsequent tabnotes
-% to start numbering at 1 again.
-
-% \tnoteformat is provided so user can specify some special formatting
-% for the tabnotes. It needs to set up the paragraph parameters, start
-% the paragraph, and print the label. The \mbox stuff in \tnoteheading
-% is to make and undo a dummy paragraph, to get around the games \section*
-% plays with paragraph indenting and instead give us uniform
-% indenting for all notes.
-
-\def\tnotesname{Tablenotes}%
-\def\tnoteheading{\subsection*{\tnotesname
- \@mkboth{\MakeUppercase{\tnotesname}}{\MakeUppercase{\tnotesname}}}%
- \mbox{}\par\vskip-\baselineskip}
-
-\def\tnoteformat{\rightskip\z@ \leftskip\z@ \parindent=1.8em
- \leavevmode\llap{\maketnmark}}
-
-\def\tnotesize{\footnotesize}
-
-\def\thetabnotes{\immediate\closeout\@tnotes \global\@tnotesopenfalse
- \begingroup
- \makeatletter
- %
- % The machinery with \@ResetGT and > here ensures that
- % \@doantnote works properly even if > is an active character
- % at the point where \thetabnotes is invoked. > needs to have
- % catcode 12 when the arguments of \@doantnote are scanned, so
- % that the > in the string "macro:->" is matched. The actual
- % footnote text is not an argument to \@doantnote, but just
- % follows it in the .tne file; so \@ResetGT can reset the
- % category code for > that should be used when processing
- % that text. That resetting takes place within a
- % \begingroup-\endgroup block set up by \@doantnote and
- % \@endantnote, so the catcode for > is back to 12 for the
- % next note.
- %
- \edef\@tempa{`\string >}%
- \ifnum\catcode\@tempa=12%
- \let\@ResetGT\relax
- \else
- \edef\@ResetGT{\noexpand\catcode\@tempa=\the\catcode\@tempa}%
- \@makeother\>%
- \fi
- \def\@doantnote##1##2>{\def\@thetnmark{##1}\par\begingroup
- \@ResetGT
- \edef\@currentlabel{\csname p@tabnote\endcsname\@thetnmark}%
- \tnoteformat}
- \def\@endantnote{\par\endgroup}%
- \tnoteheading
- \tnotesize
- \input{\jobname.tne}%
- \endgroup}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%