summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tablefootnote
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-01-08 22:45:08 +0000
committerKarl Berry <karl@freefriends.org>2014-01-08 22:45:08 +0000
commit1ffe0fb9a53db45d97308792ed99bf6beb2b19ca (patch)
treeccb8ae4bf3c954409a573daa2c8fa5b0fd0c0be8 /Master/texmf-dist/tex/latex/tablefootnote
parentfed7194263a54d728638502089d1ec5afe88a886 (diff)
tablefootnote (8jan14)
git-svn-id: svn://tug.org/texlive/trunk@32609 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tablefootnote')
-rw-r--r--Master/texmf-dist/tex/latex/tablefootnote/tablefootnote.sty264
1 files changed, 208 insertions, 56 deletions
diff --git a/Master/texmf-dist/tex/latex/tablefootnote/tablefootnote.sty b/Master/texmf-dist/tex/latex/tablefootnote/tablefootnote.sty
index ba844aa9b72..4d958b32486 100644
--- a/Master/texmf-dist/tex/latex/tablefootnote/tablefootnote.sty
+++ b/Master/texmf-dist/tex/latex/tablefootnote/tablefootnote.sty
@@ -9,9 +9,9 @@
%% This is a generated file.
%%
%% Project: tablefootnote
-%% Version: 2012/07/29 v1.0h
+%% Version: 2014/01/08 v1.1a
%%
-%% Copyright (C) 2011 - 2012 by
+%% Copyright (C) 2011 - 2014 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
%%
%% The usual disclaimer applies:
@@ -39,14 +39,17 @@
%% tablefootnote.ins, tablefootnote.drv,
%% tablefootnote-example.tex, tablefootnote-example.pdf.
%%
+%% In memoriam Tommy Muench + 2014/01/02.
+%%
\NeedsTeXFormat{LaTeX2e}[2011/06/27]
-\ProvidesPackage{tablefootnote}[2012/07/29 v1.0h
+\ProvidesPackage{tablefootnote}[2014/01/08 v1.1a
Table foot notes (HMM)]
%% Provides the \tablefootnote{...} command
%% for footnotes in (sideways)tables.
\RequirePackage{ltxcmds}[2011/11/09]% v1.22
\RequirePackage{letltxmacro}[2010/09/02]% v1.4
+\RequirePackage{xifthen}[2009/04/17]% v1.3
%% 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
@@ -83,13 +86,13 @@
\newcommand\tablemakefntext[1]{%
\noindent\makebox[1.634em][r]{%
\mbox{\textsuperscript{\normalfont%
- \hyperlink{tfn:\theHfootnote}{\@thefnmark}%
+ \hyperlink{tfn:m\theHfootnote}{\@thefnmark}%
}}}%
- \,#1%
+ \ #1%
}
\else
\newcommand\tablemakefntext[1]{%
- \noindent\makebox[1.8em][r]{%1.634
+ \noindent\makebox[1.8em][r]{%
\mbox{\textsuperscript{\normalfont%
\@thefnmark%
}}}%
@@ -101,18 +104,18 @@
\noindent\makebox[1.8em][r]{%
\mbox{\textsuperscript{\normalfont%
\ifFootnoteBackref@numberlinked%
- \hyperlink{tfn:\theHfootnote}{\@thefnmark}\,%
+ \hyperlink{tfn:m\theHfootnote}{\@thefnmark}\ %
\else%
\@thefnmark%
\fi%
}}}%
- \hyperlink{tfn:\theHfootnote}{\FootnoteBackref@symbol}%
+ \hyperlink{tfn:m\theHfootnote}{\FootnoteBackref@symbol}%
#1%
}
\fi
-}{
+}{%
\newcommand\tablemakefntext[1]{%
- \noindent\makebox[1.8em][r]{%1.634
+ \noindent\makebox[1.8em][r]{%
\mbox{\textsuperscript{\normalfont%
\@thefnmark%
}}}%
@@ -122,14 +125,29 @@
\newcommand\swtablemakefntext[1]{\noindent\ #1}
-\newcommand{\tfn@footnotemarks}{%
+\newcommand{\tfn@footnotemarks}[1][]{%
\hbox{%
- \footnotemark%
- \ltx@ifpackageloaded{footnotebackref}{%
- \raisebox{\ht\strutbox}{\hypertarget{tfn:\theHfootnote}{}}%
- }{% footnotebackref not loaded
+ \ifthenelse{\isempty{#1}}%
+ {\footnotemark%
+ \ltx@ifpackageloaded{footnotebackref}%
+ {\raisebox{\ht\strutbox}{\hypertarget{tfn:m\theHfootnote}{}}}%
+ {% footnotebackref not loaded
+ }%
+ }%
+ {\ltx@ifpackageloaded{hyperref}%
+ {\ifHy@hyperfootnotes%
+ \hyperlink{tfn:#1}{\footnotemark[#1]}%
+ \else%
+ \footnotemark[#1]%
+ \fi%
+ }%
+ {\footnotemark[#1]}%
+ \ltx@ifpackageloaded{footnotebackref}%
+ {\raisebox{\ht\strutbox}{\hypertarget{tfn:m#1}{}}}%
+ {% footnotebackref not loaded
+ }%
+ }%
}%
- }%
\@tempcnta=\tfn@footnotetablecount\relax%
\advance\@tempcnta by -1%
\xdef\tfn@footnotetablecount{\the\@tempcnta}%
@@ -142,32 +160,53 @@
Unfortunately package tablefootnote is not yet\MessageBreak%
able to regard this in sidewaystables.\MessageBreak%
Here the footnotes are printed one below\MessageBreak%
- the other. Sorry.\MessageBreak%
+ the other. Sorry!\MessageBreak%
}%
\fi%
}
-\newcommand{\tfn@footnotetext}[1]{%
+\newcommand{\tfn@updateHyper}{%
+ % The code of this command is partly from the
+ % hyperref package by Heiko Oberdiek, 2011/10/01, v6.82j.
+ % Newer versions of that package are available at CTAN.
+ \global\let\Hy@saved@currentHref\@currentHref%
+ \ifHy@hyperfootnotes%
+ \hyper@makecurrent{Hfootnote}%
+ \fi%
+ \global\let\Hy@footnote@currentHref\@currentHref%
+ \global\let\@currentHref\Hy@saved@currentHref%
+ }
+
+\newcommand{\tfn@footnotetext}[2][]{%
\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}%
+ \ifHy@hyperfootnotes%
+ \addtocounter{Hfootnote}{\tfn@footnotetablecount}%
+ \fi%
+ \tfn@updateHyper%
}{}%
\fi%
\addtocounter{footnote}{+1}%
\ltx@ifpackageloaded{hyperref}{%
- \addtocounter{Hfootnote}{+1}%
- % Code from the hyperref package by Heiko Oberdiek,
- % 2011/10/01, v6.82j, newer versions available
- \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
- }{}% else \relax
+ \ifHy@hyperfootnotes%
+ \addtocounter{Hfootnote}{+1}%
+ \fi%
+ \tfn@updateHyper%
+ }{}%
\ifx\tfn@swt\tfn@footnotezero%
- \footnotetext{#1}%
+ \ifthenelse{\isempty{#1}}%
+ {\footnotetext{#2}}%
+ {\ltx@ifpackageloaded{hyperref}%
+ {\ifHy@hyperfootnotes%
+ \footnotetext[#1]{%
+ \raisebox{\ht\strutbox}{\hypertarget{tfn:#1}{}}#2}%
+ \else%
+ \footnotetext[#1]{#2}%
+ \fi%
+ }{\footnotetext[#1]{#2}}%
+ }%
\else%
\ifx\tfn@footnotetableprint\tfn@footnotezero%
\gdef\tfn@fmpw{\tfn@footmiscparawarn}%
@@ -175,21 +214,84 @@
\ltx@ifpackageloaded{footmisc}{\tfn@fmpw}{\relax}%
\gdef\tfn@fmpw{\relax}%
\fi%
- \ltx@ifpackageloaded{footnotebackref}{%
- \LetLtxMacro{\tfncurrentmft}{\@makefntext}%
- \LetLtxMacro{\@makefntext}{\swtablemakefntext}%
- \footnotetext{\hbox {\@textsuperscript {\normalfont %
- \hyperlink{tfn:\theHfootnote}{\thefootnote}%
- }}\thinspace %
- \ifx\FootnoteBackref@symbol\empty%
- \else\hyperlink{tfn:\theHfootnote}{\FootnoteBackref@symbol}%
- \fi%
- #1}%
- \LetLtxMacro{\@makefntext}{\tfncurrentmft}%
- }{% footnotebackref not loaded
- \footnotetext{\hbox {\@textsuperscript {\normalfont \thefootnote %
- }}\thinspace #1}%
- }%
+ \ltx@ifpackageloaded{footnotebackref}{%
+ \LetLtxMacro{\tfncurrentmft}{\@makefntext}%
+ \LetLtxMacro{\@makefntext}{\swtablemakefntext}%
+ \ifthenelse{\isempty{#1}}%
+ {\footnotetext{%
+ \raisebox{\ht\strutbox}{\hypertarget{tfn:\theHfootnote}{}}%
+ \hbox{\@textsuperscript{\normalfont%
+ \hyperlink{tfn:m\theHfootnote}{\thefootnote}}}\thinspace%
+ \ifx\FootnoteBackref@symbol\empty%
+ \else\hyperlink{tfn:m\theHfootnote}{\FootnoteBackref@symbol}%
+ \fi%
+ #2}%
+ }{\edef\tfn@tfn{\arabic{footnote}}%
+ \edef\tfn@thn{\arabic{Hfootnote}}%
+ \setcounter{footnote}{#1}%
+ \setcounter{Hfootnote}{#1}%
+ \tfn@updateHyper%
+ \footnotetext{%
+ \raisebox{\ht\strutbox}{\hypertarget{tfn:#1}{}}%
+ \hbox{\@textsuperscript{\normalfont%
+ \hyperlink{tfn:m#1}{#1}}}%
+ \thinspace%
+ \ifx\FootnoteBackref@symbol\empty%
+ \else%
+ \raisebox{\ht\strutbox}{%
+ \hyperlink{tfn:m#1}{\FootnoteBackref@symbol}}%
+ \fi%
+ #2%
+ }%
+ \setcounter{footnote}{\tfn@tfn}%
+ \setcounter{Hfootnote}{\tfn@thn}%
+ \tfn@updateHyper%
+ }%
+ \LetLtxMacro{\@makefntext}{\tfncurrentmft}%
+ }{% footnotebackref not loaded
+ \ifthenelse{\isempty{#1}}%
+ {\footnotetext{%
+ \hbox{\@textsuperscript{\normalfont\thefootnote}}%
+ \ltx@ifpackageloaded{hyperref}%
+ {\ifHy@hyperfootnotes%%
+ \raisebox{\ht\strutbox}{%
+ \hypertarget{tfn:\theHfootnote}{}}%
+ \fi%
+ }%
+ {\relax}%
+ \thinspace%
+ #2}%
+ }{\edef\tfn@tfn{\arabic{footnote}}%
+ \ltx@ifpackageloaded{hyperref}{%
+ \ifHy@hyperfootnotes%
+ \edef\tfn@thn{\arabic{Hfootnote}}%
+ \fi%
+ }{}% else \relax
+ \setcounter{footnote}{#1}
+ \ltx@ifpackageloaded{hyperref}{%
+ \ifHy@hyperfootnotes%
+ \setcounter{Hfootnote}{#1}%
+ \fi%
+ \tfn@updateHyper%
+ }{}%
+ \footnotetext{%
+ \hbox{\@textsuperscript{\normalfont #1}}%
+ \ltx@ifpackageloaded{hyperref}%
+ {\ifHy@hyperfootnotes%
+ \raisebox{\ht\strutbox}{\hypertarget{tfn:#1}{}}%
+ \fi%
+ }{}%
+ \thinspace%
+ #2}%
+ \setcounter{footnote}{\tfn@tfn}%
+ \ltx@ifpackageloaded{hyperref}{%
+ \ifHy@hyperfootnotes%
+ \setcounter{Hfootnote}{\tfn@thn}%
+ \fi%
+ \tfn@updateHyper%
+ }{}%
+ }%
+ }%
\fi%
\gdef\tfn@footnotetableprint{1}%
\@tempcnta=\tfn@footnotetablecount\relax%
@@ -204,11 +306,32 @@
\newcommand{\tfn@tablefootnoteprintout}{\relax}
-\newcommand{\tablefootnote}[1]{%
-\tfn@footnotemarks%
-\ltx@GlobalAppendToMacro{%
-\tfn@tablefootnoteprintout}{\tfn@footnotetext{#1}}%
-\gdef\tfn@fnt{1}%
+\newcommand{\tablefootnote}[2][]{%
+ \tfn@footnotemarks[#1]%
+ \ifthenelse{\isempty{#1}}{\relax}{%
+ \ltx@GlobalPrependToMacro{\tfn@tablefootnoteprintout}{%
+ \addtocounter{footnote}{+1}%
+ \ltx@ifpackageloaded{hyperref}{%
+ \ifHy@hyperfootnotes%
+ \addtocounter{Hfootnote}{+1}%
+ \fi%
+ \tfn@updateHyper%
+ }{}%
+ }%
+ }%
+ \ltx@GlobalAppendToMacro{\tfn@tablefootnoteprintout}{%
+ \tfn@footnotetext[#1]{#2}%
+ \ifthenelse{\isempty{#1}}{\relax}{%
+ \addtocounter{footnote}{-1}%
+ \ltx@ifpackageloaded{hyperref}{%
+ \ifHy@hyperfootnotes%
+ \addtocounter{Hfootnote}{-1}%
+ \fi%
+ \tfn@updateHyper%
+ }{}%
+ }%
+ }%
+ \gdef\tfn@fnt{1}%
}
\newcommand{\tfn@swtbox}{%
@@ -217,7 +340,7 @@
\else%
\vskip \skip\footins%
\fi%
-\parbox[b][][t]{\linewidth}{\raggedright \tfn@tablefootnoteprintout}%
+\parbox[b][][t]{\linewidth}{\raggedright\tfn@tablefootnoteprintout}%
}
\IfFileExists{etoolbox.sty}{%
@@ -343,10 +466,10 @@
\ifx\tfn@fnbr\tfn@footnotezero%
\PackageError{tablefootnote}{%
Package footnotebackref loaded after tablefootnote}{%
- When using both the footnotebackref and the tablefootnote package,%
- \MessageBreak%
- the footnotebackref package MUST be loaded before the tablefootnote%
- \space package!\MessageBreak%
+ When using both the footnotebackref and the tablefootnote %
+ package,\MessageBreak%
+ the footnotebackref package MUST be loaded before the %
+ tablefootnote package!\MessageBreak%
}%
\fi%
}{% else \relax
@@ -364,18 +487,47 @@
}{% else \relax
}
\ltx@ifpackageloaded{hyperref}{%
+ \ifHy@hyperfootnotes%
\ifluatex%
\PackageWarningNoLine{tablefootnote}{%
- LuaTeX & hyperref used:\MessageBreak%
+ LuaTeX and hyperref package used:\MessageBreak%
Hyperreferences in rotated content\MessageBreak%
will be misplaced\MessageBreak%
regardless of tablefootnote package.\MessageBreak%
The text to be printed will be OK%
}%
\fi%
+ \fi%
}{% else \relax
}%
- }
+ \ltx@ifpackageloaded{footnotebackref}{%
+ \ltx@ifpackageloaded{hyperref}{
+ \ifHy@hyperfootnotes%
+ \relax%
+ \else%
+ \PackageError{tablefootnote}{%
+ footnotebackref but not hyperfootnotes}{%
+ The footnotebackref package is used\MessageBreak%
+ but the hyperfootnotes option of the hyperref package%
+ \MessageBreak%
+ was set to false.\MessageBreak%
+ Either enable hyperfootnotes or do not use footnotebackref.%
+ \MessageBreak%
+ Loading of the tablefootnote package will be aborted.%
+ }%
+ \endinput%
+ \fi%
+ }{\PackageError{tablefootnote}{footnotebackref but not hyperref}{%
+ The footnotebackref package is used\MessageBreak%
+ but not the hyperref package.\MessageBreak%
+ Either load hyperref or do not use footnotebackref.%
+ \MessageBreak%
+ Loading of the tablefootnote package will be aborted.%
+ }%
+ \endinput
+ }%
+ }{}
+}
\endinput
%%