summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tablefootnote
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-11-03 18:20:24 +0000
committerKarl Berry <karl@freefriends.org>2011-11-03 18:20:24 +0000
commit101b8dbc25eea15d8e82c6a3aa17c1fcea572759 (patch)
tree8a227d2794f0f9367ae184c6f1f33c64fc34cc5e /Master/texmf-dist/tex/latex/tablefootnote
parent2b46076210d9d0b7ffec3cd884329f5ea6b86bb1 (diff)
new latex package tablefootnote (29oct11)
git-svn-id: svn://tug.org/texlive/trunk@24478 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tablefootnote')
-rw-r--r--Master/texmf-dist/tex/latex/tablefootnote/tablefootnote.sty207
1 files changed, 207 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/tablefootnote/tablefootnote.sty b/Master/texmf-dist/tex/latex/tablefootnote/tablefootnote.sty
new file mode 100644
index 00000000000..c2135189c59
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tablefootnote/tablefootnote.sty
@@ -0,0 +1,207 @@
+%%
+%% This is file `tablefootnote.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% tablefootnote.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Project: tablefootnote
+%% Version: 2011/10/29 v1.0b
+%%
+%% Copyright (C) 2011 by
+%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
+%%
+%% The usual disclaimer applys:
+%% If it doesn't work right that's your problem.
+%% (Nevertheless, send an e-mail to the maintainer
+%% when you find an error in this package.)
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. This version of this license is in
+%% http://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and 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 H.-Martin Muench.
+%%
+%% This work consists of the main source file tablefootnote.dtx,
+%% the README, and the derived files
+%% tablefootnote.sty, tablefootnote.pdf,
+%% tablefootnote.ins, tablefootnote.drv,
+%% tablefootnote-example.tex, tablefootnote-example.pdf.
+%%
+\NeedsTeXFormat{LaTeX2e}[2011/06/27]
+\ProvidesPackage{tablefootnote}[2011/10/29 v1.0b
+ Table foot notes (HMM)]
+
+%% Provides the \tablefootnoteote{...} command
+%% for footnotes in (sideways)tables.
+
+\RequirePackage{ltxcmds}[2011/04/18]% v1.20
+
+\@ifpackageloaded{rotating}{%
+ \gdef\tfn@rotating{1}
+ \@ifpackagelater{rotating}{2009/03/28}% 2009/03/28 v2.16a
+ {% >= 2009/03/28, OK
+ }{% else
+ \PackageWarningNoLine{tablefootnote}{%
+ It is required version\MessageBreak
+ 2009/03/28 v2.16a (or later) of package rotating,\MessageBreak
+ but only version\MessageBreak
+ `\csname ver@rotating.sty\endcsname'\MessageBreak
+ is available}%
+ }%
+ \RequirePackage{amstext}[2000/06/29]% v2.01
+ \RequirePackage{setspace}[2000/12/01]% v6.7
+ \RequirePackage{subcaption}[2011/09/12]% v1.1b
+ }{% else
+ \gdef\tfn@rotating{0}%
+ }
+
+%% tablefootnote may work with earlier versions of LaTeX and those
+%% packages, but this was not tested. Please consider updating
+%% your LaTeX and packages to the most recent version
+%% (if they are not already the most recent version).
+
+\def\tfn@footnotetablecount{0}
+\def\tfn@footnotetableprint{0}
+\def\tfn@footnotezero{0}
+\def\tfn@fnt{0}
+\def\tfn@swt{0}% _s_ide_w_ays_t_able
+
+\newcommand{\tfn@footnotemarks}{%
+ \footnotemark%
+ \count255=\tfn@footnotetablecount \relax%
+ \count255=\numexpr \count255 - 1 \relax%
+ \xdef\tfn@footnotetablecount{\the\count255}%
+}
+
+\newcommand{\tfn@footnotetext}[1]{%
+ \ifx\tfn@footnotetableprint\tfn@footnotezero%
+ % This is the first footnotetext after the (sideways)table.
+ \addtocounter{footnote}{\tfn@footnotetablecount}%
+ \ltx@ifpackageloaded{hyperref}{%
+ \addtocounter{Hfootnote}{\tfn@footnotetablecount}%
+ }{}%
+ \gdef\tfn@footnotetableprint{1}%
+ \fi%
+ \addtocounter{footnote}{+1}%
+ \ltx@ifpackageloaded{hyperref}{%
+ \addtocounter{Hfootnote}{+1}%
+ % Code form the hyperref package, 2011/10/01, v6.82j,
+ % by Heiko Oberdiek
+ \global\let\Hy@saved@currentHref\@currentHref%
+ \hyper@makecurrent{Hfootnote}%
+ \global\let\Hy@footnote@currentHref\@currentHref%
+ \global\let\@currentHref\Hy@saved@currentHref%
+ % End of code form the hyperref package
+ }{}%
+ \ifx\tfn@swt\tfn@footnotezero%
+ \footnotetext{#1}%
+ \else%
+ \footnotetext{$^{\text{\thefootnote}}$\thinspace #1}%
+ \fi%
+ \count255=\tfn@footnotetablecount \relax%
+ \count255=\numexpr \count255 + 1 \relax%
+ \xdef\tfn@footnotetablecount{\the\count255}%
+ \ifx\tfn@footnotetablecount\tfn@footnotezero% all footnotes placed
+ \gdef\tfn@footnotetableprint{0}%
+ \global\let\tfn@tablefootnoteprintout\relax% brute force
+ %\else there is at least one \footnotemark which needs \footnotetext
+ \fi
+}
+
+\newcommand{\tfn@tablefootnoteprintout}{\relax}
+
+\newcommand{\tablefootnote}[1]{%
+\tfn@footnotemarks%
+\ltx@GlobalAppendToMacro{%
+\tfn@tablefootnoteprintout}{\tfn@footnotetext{#1}}%
+\gdef\tfn@fnt{1}%
+}
+
+\newcommand{\tfn@swtbox}{%
+\vspace{0.8cm}%
+\begin{spacing}{0.1}%
+\subcaptionbox*{}[\linewidth][l]{\tfn@tablefootnoteprintout}%
+\end{spacing}%
+}
+
+\IfFileExists{etoolbox.sty}{%
+ \RequirePackage{etoolbox}
+ \AfterEndEnvironment{table}{%
+ \tfn@tablefootnoteprintout%
+ \gdef\tfn@fnt{0}%
+ }
+ \ltx@ifpackageloaded{rotating}{%
+ \AtBeginEnvironment{sidewaystable}{%
+ \gdef\tfn@swt{1}%
+ }
+ \AtEndEnvironment{sidewaystable}{%
+ \ifx\tfn@fnt\tfn@footnotezero% \relax
+ \else%
+ \tfn@swtbox%
+ \fi%
+ \gdef\tfn@swt{0}%
+ \gdef\tfn@fnt{0}%
+ }%
+ }{}%
+}{%
+ \PackageWarning{tablefootnote}{%
+ Package etoolbox not available, therefore\MessageBreak%
+ substituting commands \string\AtEndEnvironment\space %
+ and\MessageBreak%
+ \string\AfterEndEnvironment\space for tablefootnotes%
+ }%
+ \let\tfnorigtable\table
+ \let\tfnendorigtable\endtable
+ \renewenvironment{table}{%
+ \tfnorigtable%
+ }{%
+ \tfnendorigtable%
+ \tfn@tablefootnoteprintout%
+ }
+ \ltx@ifpackageloaded{rotating}{%
+ \let\tfnorigsidewaystable\sidewaystable
+ \let\tfnendorigsidewaystable\endsidewaystable
+ \renewenvironment{sidewaystable}{%
+ \gdef\tfn@swt{1}%
+ \tfnorigsidewaystable%
+ }{%
+ \ifx\tfn@fnt\tfn@footnotezero% \relax
+ \else%
+ \tfn@swtbox%
+ \fi%
+ \gdef\tfn@swt{0}%
+ \gdef\tfn@fnt{0}%
+ \tfnendorigsidewaystable%
+ }%
+ }{}%
+}
+
+\AtBeginDocument{%
+ \ltx@ifpackageloaded{rotating}{%
+ \ifx\tfn@rotating\tfn@footnotezero%
+ \PackageError{tablefootnote}{%
+ Package rotating loaded after package tablefootnote}{%
+ When using both the rotating and the tablefootnote package,%
+ \MessageBreak%
+ the rotating package must be loaded before the tablefootnote%
+ package!%
+ }%
+ \fi%
+ }{}
+ }
+
+\endinput
+%%
+%% End of file `tablefootnote.sty'.