diff options
author | Karl Berry <karl@freefriends.org> | 2012-07-30 22:41:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-07-30 22:41:07 +0000 |
commit | d3885abf094e492f24813fe3ec1147cb4b4e73a6 (patch) | |
tree | 6cb4420fb21aa9088ecd5c7cd3871e27d7773514 /Master/texmf-dist/tex/latex/tablefootnote | |
parent | 8868bf00c8ec0ac5ca965d6e13f3a3a7f2fdb483 (diff) |
tablefootnote (30jul12)
git-svn-id: svn://tug.org/texlive/trunk@27256 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tablefootnote')
-rw-r--r-- | Master/texmf-dist/tex/latex/tablefootnote/tablefootnote.sty | 145 |
1 files changed, 129 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/tablefootnote/tablefootnote.sty b/Master/texmf-dist/tex/latex/tablefootnote/tablefootnote.sty index ee680d0fe5f..ba844aa9b72 100644 --- a/Master/texmf-dist/tex/latex/tablefootnote/tablefootnote.sty +++ b/Master/texmf-dist/tex/latex/tablefootnote/tablefootnote.sty @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: tablefootnote -%% Version: 2012/01/14 v1.0g +%% Version: 2012/07/29 v1.0h %% %% Copyright (C) 2011 - 2012 by %% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de> @@ -40,14 +40,15 @@ %% tablefootnote-example.tex, tablefootnote-example.pdf. %% \NeedsTeXFormat{LaTeX2e}[2011/06/27] -\ProvidesPackage{tablefootnote}[2012/01/14 v1.0g +\ProvidesPackage{tablefootnote}[2012/07/29 v1.0h Table foot notes (HMM)] %% Provides the \tablefootnote{...} command %% for footnotes in (sideways)tables. -\RequirePackage{ltxcmds}[2011/04/18]% v1.20 -%% tablefootnote may work with earlier versions of LaTeX and that -%% package, but this was not tested. Please consider updating +\RequirePackage{ltxcmds}[2011/11/09]% v1.22 +\RequirePackage{letltxmacro}[2010/09/02]% v1.4 +%% 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). @@ -73,9 +74,62 @@ \def\tfn@fnt{0} \def\tfn@swt{0}% _s_ide_w_ays_t_able \def\tfn@fmpw{\relax}% f_oot_m_isc_p_ara_w_arn-switch +\def\tfn@fnbr{0}% f_oot_n_ote_b_ack_r_ef(erence package) + +\ltx@ifpackageloaded{footnotebackref}{% + \gdef\tfn@fnbr{1}% + \ifx\FootnoteBackref@symbol\empty% + \ifFootnoteBackref@numberlinked% + \newcommand\tablemakefntext[1]{% + \noindent\makebox[1.634em][r]{% + \mbox{\textsuperscript{\normalfont% + \hyperlink{tfn:\theHfootnote}{\@thefnmark}% + }}}% + \,#1% + } + \else + \newcommand\tablemakefntext[1]{% + \noindent\makebox[1.8em][r]{%1.634 + \mbox{\textsuperscript{\normalfont% + \@thefnmark% + }}}% + #1% + } + \fi + \else + \newcommand\tablemakefntext[1]{% + \noindent\makebox[1.8em][r]{% + \mbox{\textsuperscript{\normalfont% + \ifFootnoteBackref@numberlinked% + \hyperlink{tfn:\theHfootnote}{\@thefnmark}\,% + \else% + \@thefnmark% + \fi% + }}}% + \hyperlink{tfn:\theHfootnote}{\FootnoteBackref@symbol}% + #1% + } + \fi +}{ + \newcommand\tablemakefntext[1]{% + \noindent\makebox[1.8em][r]{%1.634 + \mbox{\textsuperscript{\normalfont% + \@thefnmark% + }}}% + #1% + } +} + +\newcommand\swtablemakefntext[1]{\noindent\ #1} \newcommand{\tfn@footnotemarks}{% + \hbox{% \footnotemark% + \ltx@ifpackageloaded{footnotebackref}{% + \raisebox{\ht\strutbox}{\hypertarget{tfn:\theHfootnote}{}}% + }{% footnotebackref not loaded + }% + }% \@tempcnta=\tfn@footnotetablecount\relax% \advance\@tempcnta by -1% \xdef\tfn@footnotetablecount{\the\@tempcnta}% @@ -104,8 +158,8 @@ \addtocounter{footnote}{+1}% \ltx@ifpackageloaded{hyperref}{% \addtocounter{Hfootnote}{+1}% - % Code form the hyperref package, 2011/10/01, v6.82j, newer versions available - % by Heiko Oberdiek + % 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% @@ -121,8 +175,21 @@ \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}% + }% \fi% \gdef\tfn@footnotetableprint{1}% \@tempcnta=\tfn@footnotetablecount\relax% @@ -156,9 +223,16 @@ \IfFileExists{etoolbox.sty}{% \RequirePackage{etoolbox}[2011/01/03]% v2.1 \AfterEndEnvironment{table}{% - \tfn@tablefootnoteprintout% - \gdef\tfn@fnt{0}% - } + \ltx@ifpackageloaded{footnotebackref}{% + \LetLtxMacro{\tfncurrentmft}{\@makefntext}% + \LetLtxMacro{\@makefntext}{\tablemakefntext}% + \tfn@tablefootnoteprintout% + \LetLtxMacro{\@makefntext}{\tfncurrentmft}% + }{% footnotebackref not loaded + \tfn@tablefootnoteprintout% + }% + \gdef\tfn@fnt{0}% + }% \ltx@ifpackageloaded{rotating}{% \AtBeginEnvironment{sidewaystable}{% \gdef\tfn@swt{1}% @@ -166,7 +240,14 @@ \AtEndEnvironment{sidewaystable}{% \ifx\tfn@fnt\tfn@footnotezero% \relax \else% - \tfn@swtbox% + \ltx@ifpackageloaded{footnotebackref}{% + \LetLtxMacro{\tfncurrentmft}{\@makefntext}% + \LetLtxMacro{\@makefntext}{\tablemakefntext}% + \tfn@swtbox% + \LetLtxMacro{\@makefntext}{\tfncurrentmft}% + }{% footnotebackref not loaded + \tfn@swtbox% + }% \fi% \gdef\tfn@swt{0}% \gdef\tfn@fnt{0}% @@ -180,7 +261,6 @@ \string\AfterEndEnvironment\space for tablefootnotes% \MessageBreak% }% - \RequirePackage{letltxmacro}[2010/09/02]% v1.4 \@ifpackagelater{letltxmacro}{2010/09/02}% {% >= 2010/09/02, OK \GlobalLetLtxMacro{\tfnorigtable}{\table} @@ -209,14 +289,28 @@ \renewenvironment{table}{% \ltx@ifpackageloaded{float}{% \ltx@LocalAppendToMacro{\float@endH}{% - \tfn@tablefootnoteprintout% - \gdef\tfn@fnt{0}% + \ltx@ifpackageloaded{footnotebackref}{% + \LetLtxMacro{\tfncurrentmft}{\@makefntext}% + \LetLtxMacro{\@makefntext}{\tablemakefntext}% + \tfn@tablefootnoteprintout% + \LetLtxMacro{\@makefntext}{\tfncurrentmft}% + }{% footnotebackref not loaded + \tfn@tablefootnoteprintout% + }% + \gdef\tfn@fnt{0}% }% }{\relax} \tfnorigtable% }{% \tfnendorigtable% - \tfn@tablefootnoteprintout% + \ltx@ifpackageloaded{footnotebackref}{% + \LetLtxMacro{\tfncurrentmft}{\@makefntext}% + \LetLtxMacro{\@makefntext}{\tablemakefntext}% + \tfn@tablefootnoteprintout% + \LetLtxMacro{\@makefntext}{\tfncurrentmft}% + }{% footnotebackref not loaded + \tfn@tablefootnoteprintout% + }% \gdef\tfn@fnt{0}% }% \ltx@ifpackageloaded{rotating}{% @@ -228,7 +322,14 @@ }{% \ifx\tfn@fnt\tfn@footnotezero% \relax \else% - \tfn@swtbox% + \ltx@ifpackageloaded{footnotebackref}{% + \LetLtxMacro{\tfncurrentmft}{\@makefntext}% + \LetLtxMacro{\@makefntext}{\tablemakefntext}% + \tfn@swtbox% + \LetLtxMacro{\@makefntext}{\tfncurrentmft}% + }{% footnotebackref not loaded + \tfn@swtbox% + }% \fi% \gdef\tfn@swt{0}% \gdef\tfn@fnt{0}% @@ -238,6 +339,18 @@ } \AtBeginDocument{% + \ltx@ifpackageloaded{footnotebackref}{% + \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% + }% + \fi% + }{% else \relax + } \ltx@ifpackageloaded{rotating}{% \ifx\tfn@rotating\tfn@footnotezero% \PackageError{tablefootnote}{% |