summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-09-03 18:10:02 +0000
committerKarl Berry <karl@freefriends.org>2009-09-03 18:10:02 +0000
commitdaeaddcef56178dd571d9c813fbdde669ec40f34 (patch)
treebdb4801c0ab27619f47e1db59dc51fd643f05088
parent6fc6b33771dcc310a66db1b577203a8db6ff3388 (diff)
new latex package tablenotes (30aug09)
git-svn-id: svn://tug.org/texlive/trunk@15031 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/tablenotes/README14
-rw-r--r--Master/texmf-dist/doc/latex/tablenotes/tablenotes.pdfbin0 -> 49858 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tablenotes/tablenotes.tex43
-rw-r--r--Master/texmf-dist/tex/latex/tablenotes/tablenotes.sty348
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check3
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/tablenotes.tlpsrc0
7 files changed, 408 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/tablenotes/README b/Master/texmf-dist/doc/latex/tablenotes/README
new file mode 100644
index 00000000000..e8ddd90102b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tablenotes/README
@@ -0,0 +1,14 @@
+
+\tablenote
+\thetablenotes
+
+
+ tablenotes.sty setzt mit \tabnote{} Anmerkungen in Tabellen zeigt diese später in "Tablenotes" an.
+ Die Anwendung entspricht der von "endnotes.sty"
+
+
+ tablenotes.sty sets with \tabnote{} notes into tables and shows these later in "Tablenotes" .
+ Usage similar to "endnotes.sty"
+
+
+Matthias Borck-Elsner (August 2009) \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/tablenotes/tablenotes.pdf b/Master/texmf-dist/doc/latex/tablenotes/tablenotes.pdf
new file mode 100644
index 00000000000..cedb5c28d23
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tablenotes/tablenotes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tablenotes/tablenotes.tex b/Master/texmf-dist/doc/latex/tablenotes/tablenotes.tex
new file mode 100644
index 00000000000..ebbe9445923
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tablenotes/tablenotes.tex
@@ -0,0 +1,43 @@
+\documentclass[a4paper,10pt]{article}
+\usepackage{longtable,tablenotes,tabularx,booktabs,endnotes}
+\usepackage[utf-8]{inputenc}
+%opening
+\title{Tablenotes}
+\author{Matthias Borck-Elsner}
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+\begin{tabularx}{7cm}{lll}
+Name of contribution:& \bf{Tablenotes} \\
+Version number:& 0.1 \\
+Author's name:& Matthias Borck-Elsner \\
+Author's email:& matthias@kleinesnetzwerk.net \\
+Location on CTAN:& / \\
+Summary description:& Notes in Tables, like footnotes and endnotes \\
+License type:& lppl \\
+Announcement text:& sty. file to place notes in tables and list them, \\ similar to endnotes and footnotes \\
+\\ \bottomrule
+\end{tabularx} \\
+\end{abstract}
+\begin{small}
+\begin{longtable}{p{3cm}|p{8cm}}
+ \caption{Example}
+ \tabnote{Nr in caption} \\ \endfirsthead \endhead \endfoot \endlastfoot
+ \hline \\
+
+ \textbf{Deutsch} \tabnote{Diese in der linken Spalte}& \textbf{tablenotes.sty} setzt mit \texttt{\char92 tabnote\char123 \char125} Anmerkungen in Tabellen zeigt diese später in Tablenotes \tabnote{Diese ist in rechten Spalte} \\ \\
+ Anwendung & Die Anwendung entspricht der von $\rightarrow$Endnotes \\
+ &Hier eine zweite \tabnote{Diese in der rechten Spalte} \\
+
+ \hrule &\hrule \\
+ \textbf{English} \tabnote{in theleft column}& \textbf{tablenotes.sty} , sets with \texttt{\char92 tabnote \char123 \char125} notes in tables and shows these later in Tablenotes \tabnote{in the right column} \\ \\
+ Usage & similar to $\rightarrow$endnotes \\
+ &here another one \tabnote{in the right column}\\
+&\thetabnotes \setcounter{tabnote}{0}\\
+\end{longtable}
+
+\end{small}
+\end{document}
diff --git a/Master/texmf-dist/tex/latex/tablenotes/tablenotes.sty b/Master/texmf-dist/tex/latex/tablenotes/tablenotes.sty
new file mode 100644
index 00000000000..13a601f9a3e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tablenotes/tablenotes.sty
@@ -0,0 +1,348 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% ****************************************
+% * 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}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 42d2ce7fd8d..dd1d441a56f 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -235,7 +235,8 @@ my @WorkingTLP = qw(
supertabular susy svgcolor svn svn-multi svn-prov svninfo
swebib syllogism syntax synproof syntrace synttree
t-angles t2 Tabbing
- tableaux tablists tablor tabularcalc tabularew tabulary tabvar talk
+ tableaux tablenotes tablists tablor tabularcalc tabularew
+ tabulary tabvar talk
tamethebeast tdclock tdsfrmath
ted templates-fenn templates-sommer tengwarscript
tensor termcal termlist teubner tex-ewd tex-gyre texcount
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index ea6848023c4..83030364ddf 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -521,6 +521,7 @@ depend syntax
depend syntrace
depend synttree
depend tableaux
+depend tablenotes
depend tablists
depend tabto-ltx
depend tabularcalc
diff --git a/Master/tlpkg/tlpsrc/tablenotes.tlpsrc b/Master/tlpkg/tlpsrc/tablenotes.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/tablenotes.tlpsrc