From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/tablefootnote/README | 192 ++ .../tablefootnote/tablefootnote-example.pdf | Bin 0 -> 146215 bytes .../latex/contrib/tablefootnote/tablefootnote.dtx | 1859 ++++++++++++++++++++ .../latex/contrib/tablefootnote/tablefootnote.pdf | Bin 0 -> 358656 bytes 4 files changed, 2051 insertions(+) create mode 100644 macros/latex/contrib/tablefootnote/README create mode 100644 macros/latex/contrib/tablefootnote/tablefootnote-example.pdf create mode 100644 macros/latex/contrib/tablefootnote/tablefootnote.dtx create mode 100644 macros/latex/contrib/tablefootnote/tablefootnote.pdf (limited to 'macros/latex/contrib/tablefootnote') diff --git a/macros/latex/contrib/tablefootnote/README b/macros/latex/contrib/tablefootnote/README new file mode 100644 index 0000000000..9f208c1ddb --- /dev/null +++ b/macros/latex/contrib/tablefootnote/README @@ -0,0 +1,192 @@ +README for tablefootnote package, 2014/01/26, v1.1c + + +TABLE OF CONTENTS +================= + +1 Introduction +2 Download +3 Installation +4 Additional Packages +5 Package Compatibility +6 Author/Maintainer +7 Bug Reports +8 Known Problems + + +1 INTRODUCTION +============== + +This LaTeX package provides the command \tablefootnote{...} +to be used in a table or sidewaystable environment. +In those environments \footnote{...} would not work and +would need to be replaced by \footnotemark in the +(sideways)table and \footnotetext{...} after the +(sideways)table environment ended. Additionally the counters +for footnote and (when the hyperref package with option +hyperfootnotes=true is used) Hfootnote would need to be +adjusted manually. Then still the hyperlinks in a +(sideways)table would not work. +When the footnotebackref package is used, \footnotemark and +\footnotetext{...} would need to be redefined. +Just using \tablefootnote{...} in the (sideways)table does +all this automatically. (Compatibility with the +footnotebackref package was achieved without redefining +\footnotemark or \footnotetext.) +Redefining \footnote was not done as to not create conflicts +with other packages. +This material is subject to the LaTeX Project Public License +(LPPL). See http://www.ctan.org/license/lppl1.3 +for the details of that license. + + +2 DOWNLOAD +========== + +`tablefootnote' is available on CTAN: + http://www.ctan.org/pkg/tablefootnote + +Running +tex tablefootnote.dtx +generates the files +tablefootnote.ins, tablefootnote.drv, tablefootnote.sty, +and tablefootnote-example.tex. + +Also a ZIP file is provided that contains these files, +the manual (tablefootnote.pdf), the compiled example +(tablefootnote-example.pdf), and this README, already +sorted in a TDS tree: + http://www.ctan.org/install/macros/latex/contrib/ + tablefootnote.tds.zip + +3 INSTALLATION +============== + +Installation with ZIP file in TDS format +---------------------------------------- +The ZIP file `tablefootnote.tds.zip' contains the files +sorted in a TDS tree. Thus you can directly unpack the +ZIP file inside a TDS tree. +(See CTAN:tds.zip for an explanation of TDS.) +Example: + cd /...somewhere.../texmf + unzip /...downloadpath.../tablefootnote.tds.zip +Do not forget to refresh the file name database of this +TDS tree. +Example: + texhash /...somewhere.../texmf + +Manual installation +------------------- +a) Download the tablefootnote files from CTAN. + If necessary, unpack them. +b) Generate the package and driver files: + tex tablefootnote.dtx +c) Install the file `*.sty' in your TDS tree: + cp *.sty TDS:tex/latex/tablefootnote/ + Replace `TDS:' by the prefix of your TDS tree + (texmf directory). +d) Create the documentation (if necessary), e.g. + pdflatex tablefootnote.dtx + makeindex -s gind.ist tablefootnote.idx + pdflatex tablefootnote.dtx + makeindex -s gind.ist tablefootnote.idx + pdflatex tablefootnote.dtx +e) Update the databases if necessary, e.g. for teTeX: + mktexlsr .../texmf +f) Create the tablefootnote-example.pdf (if necessary), e.g. + pdflatex tablefootnote-example.tex + pdflatex tablefootnote-example.tex + pdflatex tablefootnote-example.tex +g) Copy the documentation files to + "TDS:doc/latex/tablefootnote/": + README, tablefootnote.pdf, tablefootnote-example.tex, + tablefootnote-example.pdf. + + +4 ADDITIONAL PACKAGES +===================== + +tablefootnote loads other packages: +* letltxmacro, http://www.ctan.org/pkg/letltxmacro +* ltxcmds, http://www.ctan.org/pkg/ltxcmds +When the etoolbox package is available, it is used: +* etoolbox, http://www.ctan.org/pkg/etoolbox +(All packages possibly load further packages. +See the result of the \listfiles command in the log-file +of the example.) + + +5 PACKAGE COMPATIBILITY +======================= + +- Using the hyperref-option pdfview=FitH or FitBH makes the + hyperlinks of footnotes in sidewaystables to not lead + to the footnotes, due to a bug in pdfTeX, + computing wrong anchor coordinates (Heiko Oberdiek, + 29. October 2011). The printed version is OK. +- Footnotes in sidewaystables are printed one below the + other, even if the footmisc package with option "para" + is used. +- When LuaTeX is used to compile a document with + rotated content, the hyperreferences therein are + misplaced (regardless of loaded tablefootnote-package + or footnotes at all - all hyperreferences in + rotated content are misplaced). Using pdflatex does not + result in any problem here. + + +6 AUTHOR/MAINTAINER +===================== + +* H.-Martin Münch + + +7 BUG REPORTS +============== + +A bug report should contain: +* Comprehensive problem description. This includes error or + warning messages. +* \errorcontextlines=\maxdimen can be added in the + TeX code to get more information in TeX error messages. +* Minimal test file that shows the problem, but does not + contain any unnecessary packages and code. +* Used drivers/programs. +* Version information about used packages and programs. +* If you are using LaTeX, then add "\listfiles". Then + a list of version information is printed at the end + of the LaTeX run. +* Please no other files than the minimal test file. + The other files .log, .dvi, .ps, .pdf are seldom + necessary, so send them only on request. +* Please .zip or .tar.gz your file(s) before sending them! + +Bug address +----------- +Bug reports can be send to the maintainer: + H.-Martin Münch + + + +8 KNOWN PROBLEMS +================= + +- Using the hyperref-option "pdfview=FitH" or "pdfview=FitBH" + makes the hyperlinks of footnotes in sidewaystables + to not lead to the footnotes, due to a bug in pdfTeX, + computing wrong anchor coordinates (Heiko Oberdiek, + 2011/10/29). The printed version is OK. +- Footnotes in sidewaystables are printed one below the other, + even if the footmisc package with option para is used. +- When a table with (table)footnotes floates to another place, + its footnotenumbers are not automatically adapted. +- When LuaTeX is used to compile a document with + rotated content, the hyperreferences therein are + misplaced (regardless of loaded tablefootnote-package + or footnotes at all - all hyperreferences in + rotated content are misplaced). + Using pdflatex does not result in any problem here. + Problem found by Arno Trautmann, 2011/11/15. + +Ideas for solutions are welcome! \ No newline at end of file diff --git a/macros/latex/contrib/tablefootnote/tablefootnote-example.pdf b/macros/latex/contrib/tablefootnote/tablefootnote-example.pdf new file mode 100644 index 0000000000..138a83ab62 Binary files /dev/null and b/macros/latex/contrib/tablefootnote/tablefootnote-example.pdf differ diff --git a/macros/latex/contrib/tablefootnote/tablefootnote.dtx b/macros/latex/contrib/tablefootnote/tablefootnote.dtx new file mode 100644 index 0000000000..7834581d29 --- /dev/null +++ b/macros/latex/contrib/tablefootnote/tablefootnote.dtx @@ -0,0 +1,1859 @@ +% \iffalse meta-comment +% +% File: tablefootnote.dtx +% Version: 2014/01/26 v1.1c +% +% Copyright (C) 2011 - 2014 by +% H.-Martin M"unch +% +% 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. +% +% Distribution: +% http://mirror.ctan.org/macros/latex/contrib/tablefootnote/tablefootnote.dtx +% http://mirror.ctan.org/macros/latex/contrib/tablefootnote/tablefootnote.pdf +% http://mirror.ctan.org/install/macros/latex/contrib/tablefootnote.tds.zip +% +% See http://www.ctan.org/pkg/tablefootnote (Catalogue) +% +% Unpacking: +% (a) If tablefootnote.ins is present: +% tex tablefootnote.ins +% (b) Without tablefootnote.ins: +% tex tablefootnote.dtx +% (c) If you insist on using LaTeX +% latex \let\install=y\input{tablefootnote.dtx} +% (quote the arguments according to the demands of your shell) +% +% Documentation: +% (a) If tablefootnote.drv is present: +% (pdf)latex tablefootnote.drv +% makeindex -s gind.ist tablefootnote.idx +% (pdf)latex tablefootnote.drv +% makeindex -s gind.ist tablefootnote.idx +% (pdf)latex tablefootnote.drv +% (b) Without tablefootnote.drv: +% (pdf)latex tablefootnote.dtx +% makeindex -s gind.ist tablefootnote.idx +% (pdf)latex tablefootnote.dtx +% makeindex -s gind.ist tablefootnote.idx +% (pdf)latex tablefootnote.dtx +% +% The class ltxdoc loads the configuration file ltxdoc.cfg +% if available. Here you can specify further options, e.g. +% use DIN A4 as paper format: +% \PassOptionsToClass{a4paper}{article} +% +% Installation: +% TDS:tex/latex/tablefootnote/tablefootnote.sty +% TDS:doc/latex/tablefootnote/tablefootnote.pdf +% TDS:doc/latex/tablefootnote/tablefootnote-example.tex +% TDS:doc/latex/tablefootnote/tablefootnote-example.pdf +% TDS:source/latex/tablefootnote/tablefootnote.dtx +% +%<*ignore> +\begingroup + \catcode123=1 % + \catcode125=2 % + \def\x{LaTeX2e}% +\expandafter\endgroup +\ifcase 0\ifx\install y1\fi\expandafter + \ifx\csname processbatchFile\endcsname\relax\else1\fi + \ifx\fmtname\x\else 1\fi\relax +\else\csname fi\endcsname +% +%<*install> +\input docstrip.tex +\Msg{******************************************************************} +\Msg{* Installation *} +\Msg{* Package: tablefootnote 2014/01/26 v1.1c Table foot notes (HMM) *} +\Msg{******************************************************************} + +\keepsilent +\askforoverwritefalse + +\let\MetaPrefix\relax +\preamble + +This is a generated file. + +Project: tablefootnote +Version: 2014/01/26 v1.1c + +Copyright (C) 2011 - 2014 by + H.-Martin M"unch + +The usual disclaimer applies: +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. + +In memoriam Tommy Muench + 2014/01/02. + +\endpreamble +\let\MetaPrefix\DoubleperCent + +\generate{% + \file{tablefootnote.ins}{\from{tablefootnote.dtx}{install}}% + \file{tablefootnote.drv}{\from{tablefootnote.dtx}{driver}}% + \usedir{tex/latex/tablefootnote}% + \file{tablefootnote.sty}{\from{tablefootnote.dtx}{package}}% + \usedir{doc/latex/tablefootnote}% + \file{tablefootnote-example.tex}{\from{tablefootnote.dtx}{example}}% +} + +\catcode32=13\relax% active space +\let =\space% +\Msg{************************************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* file into a directory searched by TeX:} +\Msg{*} +\Msg{* tablefootnote.sty} +\Msg{*} +\Msg{* To produce the documentation run the file `tablefootnote.drv'} +\Msg{* through (pdf)LaTeX, e.g.} +\Msg{* pdflatex tablefootnote.drv} +\Msg{* makeindex -s gind.ist tablefootnote.idx} +\Msg{* pdflatex tablefootnote.drv} +\Msg{* makeindex -s gind.ist tablefootnote.idx} +\Msg{* pdflatex tablefootnote.drv} +\Msg{*} +\Msg{* At least three runs are necessary e.g. to get the} +\Msg{* references right!} +\Msg{*} +\Msg{* Happy TeXing!} +\Msg{*} +\Msg{************************************************************************} + +\endbatchfile +% +%<*ignore> +\fi +% +% +% \section{The documentation driver file} +% +% The next bit of code contains the documentation driver file for +% \TeX{}, i.\,e., the file that will produce the documentation you +% are currently reading. It will be extracted from this file by the +% \texttt{docstrip} programme. That is, run \LaTeX{} on \texttt{docstrip} +% and specify the \texttt{driver} option when \texttt{docstrip} +% asks for options. +% +% \begin{macrocode} +%<*driver> +\NeedsTeXFormat{LaTeX2e}[2011/06/27] +\ProvidesFile{tablefootnote.drv}% + [2014/01/26 v1.1c Table foot notes (HMM)] +\documentclass{ltxdoc}[2007/11/11]% v2.0u +\usepackage{holtxdoc}[2012/03/21]% v0.24 +%% tablefootnote may work with earlier versions of LaTeX2e and those +%% class and package, but this was not tested. +%% Please consider updating your LaTeX, class, and package +%% to the most recent version (if they are not already the most +%% recent version). +\hypersetup{% + pdfsubject={Footnotes in Tables (HMM)},% + pdfkeywords={LaTeX, tablefootnote, footnote, table, H.-Martin Muench},% + pdfencoding=auto,% + pdflang={en},% + breaklinks=true,% + linktoc=all,% + pdfstartview=FitH,% + pdfpagelayout=OneColumn,% + bookmarksnumbered=true,% + bookmarksopen=true,% + bookmarksopenlevel=3,% + pdfmenubar=true,% + pdftoolbar=true,% + pdfwindowui=true,% + pdfnewwindow=true% +} +\CodelineIndex +\hyphenation{printing docu-ment} +\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}% +\makeatletter +\@ifundefined{eTeX}{\gdef\eTeX{$\m@th \varepsilon $-\TeX }}{% else \relax +} +\makeatother +\begin{document} + \DocInput{tablefootnote.dtx}% +\end{document} +% +% \end{macrocode} +% +% \fi +% +% \CheckSum{584} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \GetFileInfo{tablefootnote.drv} +% +% \begingroup +% \def\x{\#,\$,\^,\_,\~,\ ,\&,\{,\},\%}% +% \makeatletter +% \@onelevel@sanitize\x +% \expandafter\endgroup +% \expandafter\DoNotIndex\expandafter{\x} +% \expandafter\DoNotIndex\expandafter{\string\ } +% \begingroup +% \makeatletter +% \lccode`9=32\relax +% \lowercase{%^^A +% \edef\x{\noexpand\DoNotIndex{\@backslashchar9}}%^^A +% }%^^A +% \expandafter\endgroup\x +% +% \DoNotIndex{\\,\,} +% \DoNotIndex{\documentclass,\usepackage,\ProvidesPackage,\begin,\end} +% \DoNotIndex{\MessageBreak,\message} +% \DoNotIndex{\NeedsTeXFormat,\DoNotIndex,\verb} +% \DoNotIndex{\def,\edef,\gdef,\global} +% \DoNotIndex{\ifx,\listfiles,\mathord,\mathrm} +% \DoNotIndex{\kvoptions,\SetupKeyvalOptions,\ProcessKeyvalOptions} +% \DoNotIndex{\bigskip,\space,\thinspace,\ldots} +% \DoNotIndex{\indent,\noindent,\newline,\linebreak,\pagebreak} +% \DoNotIndex{\textbf,\textit,\textsf,\texttt,\textsc,\textquotedblleft,\textquotedblright} +% \DoNotIndex{\plainTeX,\TeX,\LaTeX,\pdfLaTeX} +% \DoNotIndex{\chapter,\section,\the,\csname,\endscname} +% \DoNotIndex{\value,\arabic,\hline,\text,\caption,\centering,\clear,\url} +% +% \title{The \xpackage{tablefootnote} package} +% \date{2014/01/26 v1.1c} +% \author{H.-Martin M\"{u}nch\\\xemail{Martin.Muench at Uni-Bonn.de}} +% +% \maketitle +% +% \begin{abstract} +% This \LaTeX{} package provides the command |\tablefootnote| to be used +% in a \texttt{table} or \texttt{sidewaystable} environment, +% where |\footnote| will not work and when using |\footnotemark| and +% |\footnotetext| and adjusting the counters (including \texttt{Hfootnote}) +% manually is either too much work or would not even work (\texttt{sidewaystable}). +% \end{abstract} +% +% \bigskip +% +% \noindent Disclaimer for web links: The author is not responsible for any contents +% referred to in this work unless he has full knowledge of illegal contents. +% If any damage occurs by the use of information presented there, only the +% author of the respective pages might be liable, not the one who has referred +% to these pages. +% +% \bigskip +% +% \noindent {\color{green} Save per page about $200\unit{ml}$ water, +% $2\unit{g}$ CO$_{2}$ and $2\unit{g}$ wood:\\ +% Therefore please print only if this is really necessary.} +% +% \pagebreak +% +% \tableofcontents +% +% \pagebreak +% +% \section{Introduction\label{sec:Introduction}} +% +% \indent This \LaTeX{} package provides the command |\tablefootnote{...}| to be +% used in a \texttt{table} or \texttt{sidewaystable} environment. In those +% environments |\footnote{...}| would not work and would need to be replaced +% by |\footnotemark| in the \texttt{(sideways)\allowbreak table} and +% |\footnotetext{...}| after the \texttt{(sideways)table} environment ended. +% Additionally the counters for \texttt{footnote} and +% (when the \xpackage{hyperref} package is used) \texttt{Hfootnote} +% would need to be adjusted manually. Then still the hyperlinks +% in a \texttt{(sideways)table} would not work. +% When the \xpackage{footnotebackref} package is used, +% |\footnotemark| and |\footnotetext{...}| would need to be redefined. +% Just using |\tablefootnote{...}| (with optional argument for custom foot note +% marks) in the (sideways)table does all this automatically. +% (Compatibility with the \xpackage{footnotebackref} package +% was achieved without redefining |\footnotemark| or |\footnotetext|.) +% Redefining |\footnote| was \emph{not} done as to not create conflicts with +% other packages. +% +% \section{Usage} +% +% \indent Just load the package placing +% \begin{quote} +% |\usepackage{tablefootnote}| +% \end{quote} +% \noindent in the preamble of your \LaTeXe{} source file and use\newline +% |\tablefootnote{...}| instead of |\footnote{...}| and\newline +% |\tablefootnote[...]{...}| instead of |\footnote[...]{...}| +% in (sideways)\allowbreak tables.\\ +% When the \xpackage{footnotebackref} package is used, +% it must be loaded before the \xpackage{tablefootnote} package +% and the \xpackage{hyperrefpackage} with option |hyperfootnotes=true| +% must be loaded, too. (Backreference{-}links without links do not make sense.)\\ +% When the \xpackage{rotating} package (for |sidewaystable|s) is used, +% it must be loaded before the \xpackage{tablefootnote} package and it must be +% a recent version (v2.16a, 2009/03/28, or newer).\\ +% If |\tablefootnote{...}| is used in a tabular environment, which is inside +% of a (sideways)table environment, everything is fine, but when the tabular +% environment is not inside of a (sideways)table, the \textbf{table}footnote +% will not work.\\ +% +% Pages with tables with footnotes, which are rotated with the \xpackage{lscape}- +% or with the \xpackage{pdflscape}-package (|\begin{landscape}|, table, |\end{landscape}|), +% are possible. But when the \xpackage{footmisc}-package is used, \xpackage{(pdf)lscape} +% should be loaded before \xpackage{footmisc}.\\ +% +% When the \xpackage{footmisc}-package is used with option \texttt{para}, +% this is regarded with the exception of a \texttt{sidewaystable}. There the footnotes +% are printed one below the other. (Well, this is better than no footnote in a +% \texttt{sidewaystable} at all, isn't it?)\\ +% +% When the (sideways)table floats, the footnotes are set and (when \xpackage{hyperref} +% is used) hyperlinked, but they are not automatically adapted when the table floats +% over/under another footnote. Thus either do not use a footnote between original and +% float position of the (sideways)table, or place the (sideways)table in +% \textquotedblleft here\textquotedblright\ position. |\clear(double)page|, |h(!)|, +% |H|~from the \xpackage{float} package (\url{http://www.ctan.org/pkg/float}), +% or |\FloatBarrier| from the \xpackage{picins} package +% (\url{http://www.ctan.org/pkg/picins}) might help, too. +% (Or after finishing the document, move the (sideways)table in the source code +% near the position where it floats to or use the optional footnote marks.) +% +% \pagebreak +% +% \section{Alternatives\label{sec:Alternatives}} +% +% \begin{description} +% \item[-] The \xpackage{longtable} package provides the \texttt{longtable} environment +% as replacement for the combined \texttt{table} and \texttt{tabular} environments. +% Footnotes are real footnotes (not just tablenotes), are continuously numbered and +% hyperlinked (when using the \xpackage{hyperref} package), and the hyperlinks really +% work. As drawback the appearance of the caption changes slightly (e.\,g.~distance +% to the table, width of the caption), which can probably be changed back manually. +% Furthermore, longtables are meaned to break over more than one page. If that is not +% wished, it must be prevented by |\nopagebreak|-commands and by ending the longtable +% lines with |\\*| instead of |\\|. longtables do not float. (Therefore using the +% \xpackage{tablefootnote} package and |\FloatBarrier| from the \xpackage{picins} package +% before and after the table environment is similar~- but \xpackage{tablefootnote} does not +% change the table-caption!) \texttt{sidewaystable} does not work with it.\\ +% \url{http://www.ctan.org/pkg/longtable} +% +% \item[-] The \xpackage{supertabular} package provides the \texttt{mpsupertabular} +% environment as replacement for the combined \texttt{table} and \texttt{tabular} +% environments. Footnotes are just tablenotes (with working hyperlinks when using the +% \xpackage{hyperref} package), i.\,e. numbered a, b, c and placed below the table +% and not at the end of the page. Therefore there is no float problem (because the +% tablenotes numbering is not included in the continuous numbering of the footnotes). +% Placing the \texttt{supertabular} inside of a \texttt{sidewaystable} breaks the +% hyperlinks to the tablenotes.\\ +% \url{http://www.ctan.org/pkg/supertabular} +% +% \item[-] The \xpackage{ctable} package has its very own notation for defining tables. +% It can create tablenotes and sideways-tables. The tablenotes are not automatically +% hyperlinked. The \texttt{ctable}s float. Because the tablenotes numbering is not +% included in the continuous numbering of the footnotes there is no float problem.\\ +% \url{http://www.ctan.org/pkg/ctable} +% +% \item[-] The \xpackage{footnote} package provides |\makesavenoteenv{table}|. After +% loading the package and using that command in the preamble, in tables |\footnote{...}| +% can be used. Using |\makesavenoteenv{tabular}| and \\ +% |\makesavenoteenv{sidewaystable}| +% is possible, but it neither solves the float problem, nor do the created hyperlinks +% work (i.\,e.~they aim at wrong locations). The \xpackage{mdwtab} from the same bundle +% is incompatible with other table-related packages (e.\,g. \xpackage{supertabular}, +% \xpackage{array}) and not $100\,\%$ compatible with the \texttt{tabular} environment.\\ +% \url{http://www.ctan.org/pkg/footnote}\\ +% \url{http://www.ctan.org/pkg/mdwtab} +% +% \item[-] The \xpackage{tabularx} package does produce footnotes for sidewaystables, +% but uses a, b, c instead of 1, 2, 3. The hyperlinks to the footnotes do not work. +% Because the footnotes numbering is not included in the continuous numbering of +% the other footnotes there is no float problem.\\ +% \url{http://www.ctan.org/pkg/tabularx} +% +% \item[-] Placing a tabular inside a minipage inside a table produces tablenotes. +% Therefore there is no float problem (because the footnotes are not continuously +% numbered). The hyperlinks to the table notes indeed work. +% +% \pagebreak +% +% \item[-] The \xpackage{threeparttable} package creates tablenotes again. Therefore +% there is no float problem (because the tablenotes are not continuously numbered with +% the footnotes). There are no hyperlinks to the table notes (at least not automatically). +% Using |sidewaystable| (with table notes) works.\\ +% \url{http://www.ctan.org/pkg/threeparttable} +% +% \item[-] The \xpackage{threeparttablex} package creates tablenotes again. Therefore there +% is no float problem (because the tablenotes are not continuously numbered with the +% footnotes). With option \texttt{referable} the tablenotes are hyperlinked. Use of +% a |sidewaystable| (with table notes) did not work for me. When using the +% \texttt{referable} option according to the example in the \xpackage{threeparttablex} +% manual the \xpackage{longtable} package is used, therefore that package could be used +% directly without \xpackage{threeparttablex} (see above).\\ +% \url{http://www.ctan.org/pkg/threeparttablex} +% +% \item[-] One can manually use |\footnotemark| in the table and |\footnotetext{...}| +% after the table environment ended and manually change the |footnote| and +% (when the \xpackage{hyperref} package is used) |Hfootnote| counters and needs +% to insert +% \begin{verbatim} +% \makeatletter +% \global\let\Hy@saved@currentHref\@currentHref +% \hyper@makecurrent{Hfootnote}% +% \global\let\Hy@footnote@currentHref\@currentHref +% \global\let\@currentHref\Hy@saved@currentHref +% \makeatother +% \end{verbatim} +% before each |\footnotetext{...}|, but with more than very few footnotes this can become +% much work (and is prone to produce errors). And this does not even work with +% sidewaystables. (And it does not work with the \xpackage{footnotebackref} package +% without redefining |\footnotemark| and |\footnotetext{...}|.) +% \end{description} +% +% \bigskip +% +% \noindent (You programmed or found another alternative, +% which is available at \CTAN{}?\\ +% OK, send an e-mail to me with the name, location at \CTAN{}, +% and a short notice, and I will probably include it in +% the list above.) +% +% \newpage +% +% \section{Example} +% +% \begin{macrocode} +%<*example> +\documentclass[british]{article}[2007/10/19]% v1.4h +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{float}[2001/11/08]% v1.3d +\usepackage{placeins}[2005/04/18]% v2.2 ; for \FloatBarrier +\usepackage{rotating}[2009/03/28]% v2.16a; for sidewaystable-environment +\usepackage[% + hyperfootnotes=true,% + extension=pdf,% + plainpages=false,% + pdfpagelabels=true,% + hyperindex=false,% + pdflang={en},% + pdftitle={tablefootnote package example},% + pdfauthor={H.-Martin Muench},% + pdfsubject={Example for the tablefootnote package},% + pdfkeywords={LaTeX, tablefootnote, footnote, table, H.-Martin Muench},% + % pdfview=FitH and FitBH do not work: hyperlinks in sidewaystables + % do no lead to the footnotes, due to a bug in pdfTeX, + % computing wrong anchor coordinates (Heiko Oberdiek, 29. October 2011) + % pdfview=Fit, FitV, FitR, FitB, FitBV work + % print is OK for all those options + pdfstartview=FitH,% + pdfpagelayout=OneColumn% +]{hyperref}[2012/11/06]% v6.83m + % Due to the urls used in the example, either the hyperref or the url + % package are needed (or the urls must be removed before compiling). + +\usepackage{footnotebackref}[2012/07/01]% v1.0 +\usepackage{tablefootnote}[2014/01/26]% v1.1c + +\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}% +\listfiles +\begin{document} +\pagenumbering{arabic} +\section*{Example for tablefootnote} + +This example demonstrates the use of package\newline +\textsf{tablefootnote}, v1.1c as of 2014/01/26 (HMM).\newline +There were no options used. (The package provides no options.)\newline + +\textbf{The \texttt{tablefootnote-example.tex} needs to be compiled +at least twice to get the references right!}\newline + +If the etoolbox-package is found, it is automatically used.\newline + +For more details please see the documentation!\newline + +\noindent Save per page about $200\unit{ml}$ water, +$2\unit{g}$ CO$_{2}$ and $2\unit{g}$ wood:\newline +Therefore please print only if this is really necessary.\newline + +Here is some text.\footnote{And this is a text footnote.}\newline + +Tables \ref{tab.symbol}, \ref{tab.normal}, \ref{tab.another} and +\ref{tab.floatH} show normal tables, table~\ref{tab.sideways} depicts +a sidewaystable. Table~\ref{tab.floatH} uses the float +specifier~\texttt{H} from the float package.\newline + +\texttt{Hyperref} option \verb|pdfview=FitH| and \verb|FitBH| do +not work due to a bug in pdf\TeX{}, computing wrong +anchor coordinates (\textsc{Heiko Oberdiek}, 29.~October 2011). +Depending on used pdf-viewer, hyperlinks in sidewaystables lead +e.\,g.~at the end of the document, not at the footnote. +\verb|pdfview=Fit|, \verb|FitV|, \verb|FitR|, \verb|FitB|, +\verb|FitBV| work, print is OK for all those options. + +\bigskip + +\listoftables + +\pagebreak + +\renewcommand{\thefootnote}{\fnsymbol{footnote}} +\verb|\renewcommand{\thefootnote}{\fnsymbol{footnote}}| +causes footnote{-}symbol{-}footnotes, which are possible +(see Table~\ref{tab.symbol}). + +\begin{table} +\centering +\begin{tabular}{ccc} +Another\tablefootnote{A table footnote.} & % +text\tablefootnote{Another table footnote.} & % +in a table\tablefootnote{A third table footnote.} +\end{tabular} +\caption[A footnotesymbol table]{% +A table with footnote-symbol-footnotes.\label{tab.symbol}} +\end{table} + +Some text.\footnote{A text footnote.} + +\renewcommand{\thefootnote}{\arabic{footnote}} +\verb|\renewcommand{\thefootnote}{\arabic{footnote}}| +switches back to normal footnote numbers again. + +\pagebreak + +\begin{table} +\centering +\begin{tabular}{ccc} +Some\tablefootnote{A table footnote.} & % +text\tablefootnote[99]{A table footnote with custom footnote number.} & % +in a table\tablefootnote{A third table footnote.} +\end{tabular} +\caption[A table]{A normal table.\label{tab.normal}} +\end{table} + +Some text.\footnote{Another text footnote.} + +\pagebreak + +% \end{macrocode} +% +% \pagebreak +% +% \begin{macrocode} +More text.\footnote{And yet another text footnote.} + +\begin{table}[t] +\centering +\begin{tabular}{|c|c|c|} +\hline +Another\tablefootnote{A $3^{rd}$ table footnote.} & % +text\tablefootnote{Another $3^{rd}$ table footnote.} & % +in a table\tablefootnote{A $3^{rd}$ third table footnote.}\\ \hline +\end{tabular} +\caption[Another table]{Another table (third one)\label{tab.another}} +\end{table} + +Please note that Table~\ref{tab.another} floated to the top of the page. +While the footnotes are set and (when hyperref is used) hyperlinked, +they are not automatically adapted. Thus either do not use a footnote +at the same page before the table, or place the table in +\textquotedblleft here\textquotedblright\ or +\textquotedblleft bottom\textquotedblright\ position. +\verb|\clear(double)page|, \verb|h(!)|, \verb|H|~from the +\texttt{float} package, or \verb|\FloatBarrier| from the +\texttt{picins} package might help, too. (Or move the table in the +source code near the position where it floats to +or use the optional footnote marks.) + +Table~\ref{tab.floatH} (page~\pageref{tab.floatH}) uses float specifier +\texttt{H} from the float package and does not float. + +Some text.\footnote{This is just another text footnote.} + +\pagebreak + +\FloatBarrier + +\begin{sidewaystable} +\centering% +\begin{tabular}{ccc} +Text\tablefootnote{Please rotate the view for testing the % +hyperlinks.} & % +in a\tablefootnote[98]{Another sidewaystable footnote % +with optional footnote mark.} & % +sidewaystable% +\tablefootnote{Sidewaystable-environment provided by % +\url{http://www.ctan.org/pkg/rotating} package.} +\end{tabular} +\caption[A sideways table]{A table in the \texttt{sideways} % +environment\label{tab.sideways}}% +\end{sidewaystable}% + +\FloatBarrier + +\pagebreak + +% \end{macrocode} +% +% \pagebreak +% +% \begin{macrocode} +A last table, here with float specifier \texttt{H} from the +float\footnote{\url{http://www.ctan.org/pkg/float}} package. + +\begin{table}[H] +\centering +\begin{tabular}{ccc} +Another\tablefootnote{A $5^{th}$ table footnote.} & % +text\tablefootnote{Another $5^{th}$ table footnote.} & % +in a table\tablefootnote{A $5^{th}$ third table footnote.} +\end{tabular} +\caption[A last table]{A very last table\label{tab.floatH}} +\end{table} + +Some text.\footnote{This is just another text footnote.} + +\pagebreak + +End of the example for the +tablefootnote\footnote{\url{http://www.ctan.org/pkg/tablefootnote}} +package. + +\end{document} +% +% \end{macrocode} +% +% \StopEventually{} +% +% \newpage +% +% \section{The implementation} +% +% We start off by checking that we are loading into \LaTeXe{} and +% announcing the name and version of this package. +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e}[2011/06/27] +\ProvidesPackage{tablefootnote}[2014/01/26 v1.1c + Table foot notes (HMM)] +% \end{macrocode} +% +% A short description of the \xpackage{tablefootnote} package: +% +% \begin{macrocode} +%% Provides the \tablefootnote[...]{...} command +%% for footnotes in (sideways)tables. + +% \end{macrocode} +% +% We need the \xpackage{ltxcmds} and \xpackage{letltxmacro} packages +% by \textsc{Heiko Oberdiek}: +% +% \begin{macrocode} +\RequirePackage{ltxcmds}[2011/11/09]% v1.22 +\RequirePackage{letltxmacro}[2010/09/02]% v1.4 +\RequirePackage{xifthen}[2009/04/17]% v1.3 +% \end{macrocode} +% +% A last information for the user: +% +% \begin{macrocode} +%% 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). + +% \end{macrocode} +% +% \indent See subsection~\ref{ss:Downloads} about how to get them.\\ +% +% When the \xpackage{rotating} package (for |sidewaystable|s) is used, +% it must be loaded before the \xpackage{tablefootnote} package and it must be +% a recent version: +% +% \begin{macrocode} +\@ifpackageloaded{rotating}{% + \gdef\tfn@rotating{1} + \@ifpackagelater{rotating}{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}% + }% + }{% else + \gdef\tfn@rotating{0}% + } + +% \end{macrocode} +% +% There are no options to be processed.\\ +% +% We need some definitions: +% +% \begin{macrocode} +\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 +\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) + +% \end{macrocode} +% +% \begin{macro}{\tfn@hyperfootnotes} +% We need a wrapper for the used |\ifHy@hyperfootnotes|, +% which is not defined when the \xpackage{hyperref} package has not been loaded: +% +% \begin{macrocode} +\DeclareRobustCommand{\tfn@hyperfootnotes}[2]{% + \ifHy@hyperfootnotes% + #1% + \else% + #2% + \fi% + } + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tablemakefntext} +% |\tablemakefntext| makes the footnotetext for a footnote in a table. +% +% \begin{macrocode} +\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:m\theHfootnote}{\@thefnmark}% + }}}% + \ #1% + } + \else + \newcommand\tablemakefntext[1]{% + \noindent\makebox[1.8em][r]{% + \mbox{\textsuperscript{\normalfont% + \@thefnmark% + }}}% + #1% + } + \fi + \else + \newcommand\tablemakefntext[1]{% + \noindent\makebox[1.8em][r]{% + \mbox{\textsuperscript{\normalfont% + \ifFootnoteBackref@numberlinked% + \hyperlink{tfn:m\theHfootnote}{\@thefnmark}\ % + \else% + \@thefnmark% + \fi% + }}}% + \hyperlink{tfn:m\theHfootnote}{\FootnoteBackref@symbol}% + #1% + } + \fi +}{% + \newcommand\tablemakefntext[1]{% + \noindent\makebox[1.8em][r]{% + \mbox{\textsuperscript{\normalfont% + \@thefnmark% + }}}% + #1% + } +} + +% \end{macrocode} +% +% \end{macro} +% +% \pagebreak +% +% \begin{macro}{\swtablemakefntext} +% \begin{macrocode} +\newcommand\swtablemakefntext[1]{\noindent\ #1} + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tfn@footnotemarks} +% |\tfn@footnotemarks| uses the |\footnotemark| command to place a foot note mark +% and decreases the |\tfn@footnotetablecount| (i.\,e.~increases the negative value) +% of the number of footnote(marks) in the table. If the \xpackage{footnotebackref} +% package is used, it is also necessary to create an according |\hypertarget| for +% the back reference. +% +% \begin{macrocode} +\newcommand{\tfn@footnotemarks}[1][]{% + \hbox{% + \ifthenelse{\isempty{#1}}% + {\footnotemark% + \ltx@ifpackageloaded{footnotebackref}% + {\raisebox{\ht\strutbox}{\hypertarget{tfn:m\theHfootnote}{}}}% + {% footnotebackref not loaded + }% + }% + {\ltx@ifpackageloaded{hyperref}% + {\tfn@hyperfootnotes{% + \hyperlink{tfn:#1}{\footnotemark[#1]}% + }{\footnotemark[#1]}}% + {\footnotemark[#1]}% + \ltx@ifpackageloaded{footnotebackref}% + {\raisebox{\ht\strutbox}{\hypertarget{tfn:m#1}{}}}{}% + }% + }% + \@tempcnta=\tfn@footnotetablecount\relax% + \advance\@tempcnta by -1\relax% + \xdef\tfn@footnotetablecount{\the\@tempcnta}% +} + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tfn@footmiscparawarn} +% When the \xpackage{footmisc} package is used with option |para|, +% we need to issue a warning. (Any idea how to resolve this issue?)\\ +% It must be given inside of it's own command, because |\ifFN@para| is not +% defined when \xpackage{footmisc} has not been loaded, and then the +% |\fi| would be a |\fi| without |\if| (and \TeX{} does not like single +% |\fi|s). +% +% \begin{macrocode} +\newcommand{\tfn@footmiscparawarn}{% + \ifFN@para% + \PackageWarning{tablefootnote}{% + Package footmisc with option para used.\MessageBreak% + 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% + }% + \fi% + } + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tfn@updateHyper} +% |\tfn@updateHyper| updates some \xpackage{hyperref} internals. +% +% \begin{macrocode} +\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.org. + \global\let\Hy@saved@currentHref\@currentHref% + \tfn@hyperfootnotes{\hyper@makecurrent{Hfootnote}}{}% + \global\let\Hy@footnote@currentHref\@currentHref% + \global\let\@currentHref\Hy@saved@currentHref% + } + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tfn@footnotetext} +% |\tfn@footnotetext| contains the |\footnotetext[...]{...}| command and handles +% the numbering. |\tfn@footnotetext| will be executed after the table. +% The foot note counter has been increased automatically with each |\footnotemark|, +% therefore it must be reset to its value before the table began. +% +% \begin{macrocode} +\newcommand{\tfn@footnotetext}[2][]{% + \ifx\tfn@footnotetableprint\tfn@footnotezero% + % This is the first footnotetext after the (sideways)table. + \addtocounter{footnote}{\tfn@footnotetablecount}% +% \end{macrocode} +% +% When the \xpackage{hyperref} package is used, also its |Hfootnote| counter must +% be reset (when the footnotes are hyperlinked). +% +% \begin{macrocode} + \ltx@ifpackageloaded{hyperref}{% + \tfn@hyperfootnotes{% + \addtocounter{Hfootnote}{\tfn@footnotetablecount}}{}% + \tfn@updateHyper% + }{}% + \fi% +% \end{macrocode} +% +% For issuing the text for the next footnote the footnote-counter +% (and |Hfootnote| counter in case of links) are increased by one. +% +% \begin{macrocode} + \addtocounter{footnote}{+1}% + \ltx@ifpackageloaded{hyperref}{% + \tfn@hyperfootnotes{\addtocounter{Hfootnote}{+1}}{}% +% \end{macrocode} +% +% The \xpackage{hyperref} package was not expecting this kind of change of the +% |(H)footnote| numbers, therefore some code-lines are missing here which can be +% found at other places in that same package and are called by this command. +% +% \begin{macrocode} + \tfn@updateHyper% +% \end{macrocode} +% +% When \xpackage{hyperref} is not loaded, nothing is to be done here. +% +% \begin{macrocode} + }{}% +% \end{macrocode} +% +% The |\footnotetext[...]{...}| places the foot note text as usual. +% +% \begin{macrocode} + \ifx\tfn@swt\tfn@footnotezero% + \ifthenelse{\isempty{#1}}% + {\footnotetext{#2}}% + {\ltx@ifpackageloaded{hyperref}% + {\tfn@hyperfootnotes{% + \footnotetext[#1]{% + \raisebox{\ht\strutbox}{\hypertarget{tfn:#1}{}}#2}% + }{\footnotetext[#1]{#2}% + }% + }{\footnotetext[#1]{#2}}% + }% + \else% +% \end{macrocode} +% +% If there is more than one tablefootnote in the |sidewaystable|, \\ +% the |\tfn@footmiscparawarn| shall be given, +% +% \begin{macrocode} + \ifx\tfn@footnotetableprint\tfn@footnotezero% + \gdef\tfn@fmpw{\tfn@footmiscparawarn}% + \else% + \ltx@ifpackageloaded{footmisc}{\tfn@fmpw}{\relax}% +% \end{macrocode} +% +% but we do not want to repeat the message for a third(, forth,\ldots) +% tablefootnote in the |sidewaystable|. +% +% \begin{macrocode} + \gdef\tfn@fmpw{\relax}% + \fi% +% \end{macrocode} +% +% |\@makefnmark| is \\ +% |\hbox {\@textsuperscript {\normalfont \@thefnmark }}|, \\ +% but according to |\show\@thefnmark| here |\@thefnmark| is +% |{\protect \itshape}| instead of |\thefootnote| (Why?!).\\ +% If the \xpackage{footnotebackref} package is used, +% back references must be created for the table footnotes, too. +% +% \begin{macrocode} + \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}% + {\tfn@hyperfootnotes{% + \raisebox{\ht\strutbox}{% + \hypertarget{tfn:\theHfootnote}{}}}{}% + }{}% + \thinspace% + #2}% + }{% +% \end{macrocode} +% +% \pagebreak +% +% \begin{macrocode} + \edef\tfn@tfn{\arabic{footnote}}% + \ltx@ifpackageloaded{hyperref}{% + \tfn@hyperfootnotes{\xdef\tfn@thn{\arabic{Hfootnote}}}{}% + }{}% + \setcounter{footnote}{#1} + \ltx@ifpackageloaded{hyperref}{% + \tfn@hyperfootnotes{\setcounter{Hfootnote}{#1}}{}% + \tfn@updateHyper% + }{}% + \footnotetext{% + \hbox{\@textsuperscript{\normalfont #1}}% + \ltx@ifpackageloaded{hyperref}{% + \tfn@hyperfootnotes{\raisebox{\ht\strutbox}{% + \hypertarget{tfn:#1}{}}}{}% + }{}% + \thinspace% + #2}% + \setcounter{footnote}{\tfn@tfn}% + \ltx@ifpackageloaded{hyperref}{% + \tfn@hyperfootnotes{\setcounter{Hfootnote}{\tfn@thn}}{}% + \tfn@updateHyper% + }{}% + }% + }% + \fi% +% \end{macrocode} +% +% For further footnotes in the table the \\ +% |\ifx\tfn@footnotetableprint\tfn@footnotezero|\ldots|\fi| \\ +% from the beginning of this |\tfn@footnotetext| macro must not be repeated, +% therefore we deactivate this by defining |\tfn@footnotetableprint| to +% something other than |0| (here |1| is used). +% +% \begin{macrocode} + \gdef\tfn@footnotetableprint{1}% +% \end{macrocode} +% +% |\tfn@footnotetablecount| contains the negative number of footnote texts +% to be printed, therefore it is increase by one (i.\,e.~the negative number +% decreases, i.\,e.~$-3$ becomes~$-2$). +% +% \begin{macrocode} + \@tempcnta=\tfn@footnotetablecount\relax% + \advance\@tempcnta by +1\relax% + \xdef\tfn@footnotetablecount{\the\@tempcnta}% +% \end{macrocode} +% +% When it is zero, all footnote texts have been placed, and\\ +% |\tfn@footnotetableprint| can be reset to zero and\\ +% |\tfn@tablefootnoteprintout| can be cleared. +% +% \begin{macrocode} + \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 +} + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tfn@tablefootnoteprintout} +% When something shall be cleared or redefined, it is a good idea +% to define it. It~will be later filled with the foot note text to be printed. +% +% \begin{macrocode} +\newcommand{\tfn@tablefootnoteprintout}{\relax} + +% \end{macrocode} +% \end{macro} +% +% \pagebreak +% +% \begin{macro}{\tablefootnote} +% |\tablefootnote[...]{...}| is the command to be used by the user instead of +% |\footnote[...]{...}| in the (sideways)table. It places a foot note mark via +% |\tfn@footnotemarks| and appends a |\tfn@footnotetext{#1}| to the\\ +% |\tfn@tablefootnoteprintout| macro, and remembers that table foot notes +% have been used. +% +% \begin{macrocode} +\newcommand{\tablefootnote}[2][]{% + \tfn@footnotemarks[#1]% + \ifthenelse{\isempty{#1}}{\relax}{% + \ltx@GlobalPrependToMacro{\tfn@tablefootnoteprintout}{% + \addtocounter{footnote}{+1}% + \ltx@ifpackageloaded{hyperref}{% + \tfn@hyperfootnotes{\addtocounter{Hfootnote}{+1}}{}% + \tfn@updateHyper% + }{}% + }% + }% + \ltx@GlobalAppendToMacro{\tfn@tablefootnoteprintout}{% + \tfn@footnotetext[#1]{#2}% + \ifthenelse{\isempty{#1}}{\relax}{% + \addtocounter{footnote}{-1}% + \ltx@ifpackageloaded{hyperref}{% + \tfn@hyperfootnotes{\addtocounter{Hfootnote}{-1}}{}% + \tfn@updateHyper% + }{}% + }% + }% + \gdef\tfn@fnt{1}% + } + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tfn@swtbox} +% For |sidewaystable|s the |\tfn@tablefootnoteprintout| is placed in a \\ +% |\parbox|, which can be placed at the end of the |sidewaystable|: +% +% \begin{macrocode} +\newcommand{\tfn@swtbox}{% +\ifvoid \footins% +\vskip 2\baselineskip% +\else% +\vskip \skip\footins% +\fi% +\parbox[b][][t]{\linewidth}{\raggedright\tfn@tablefootnoteprintout}% +} + +% \end{macrocode} +% \end{macro} +% +% |\tfn@tablefootnoteprintout| shall be executed after the end of the table environment. +% The \xpackage{etoolbox} package provides very easy syntax for this: +% +% \begin{macrocode} +\IfFileExists{etoolbox.sty}{% + \RequirePackage{etoolbox}[2011/01/03]% v2.1 + \AfterEndEnvironment{table}{% + \ltx@ifpackageloaded{footnotebackref}{% + \LetLtxMacro{\tfncurrentmft}{\@makefntext}% + \LetLtxMacro{\@makefntext}{\tablemakefntext}% + \tfn@tablefootnoteprintout% + \LetLtxMacro{\@makefntext}{\tfncurrentmft}% + }{% footnotebackref not loaded + \tfn@tablefootnoteprintout% + }% + \gdef\tfn@fnt{0}% + }% +% \end{macrocode} +% +% When the \xpackage{rotating} package has been loaded, we need to detect +% whether the |\tablefootnote| is placed inside of a |sidewaystable|. +% +% \begin{macrocode} + \ltx@ifpackageloaded{rotating}{% + \AtBeginEnvironment{sidewaystable}{% + \gdef\tfn@swt{1}% + } +% \end{macrocode} +% +% At the end of |sidewaystable| environments |\tfn@swtbox| shall be placed +% (if~there was any |\tablefootnote| in that |sidewaystable| at all). +% And |\tfn@swt| as well as |\tfn@fnt| must be reset to |0|. +% +% \begin{macrocode} + \AtEndEnvironment{sidewaystable}{% + \ifx\tfn@fnt\tfn@footnotezero% \relax + \else% + \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}% + }% + }{}% else \relax +}{% +% \end{macrocode} +% +% When the \xpackage{etoolbox} package is not available (e.\,g. because of missing +% \eTeX{}) we~do a workaround: +% +% \begin{macrocode} + \PackageWarning{tablefootnote}{% + Package etoolbox not available, therefore\MessageBreak% + substituting commands \string\AtEndEnvironment\space % + and\MessageBreak% + \string\AfterEndEnvironment\space for tablefootnotes% + \MessageBreak% + }% + \@ifpackagelater{letltxmacro}{2010/09/02}% + {% >= 2010/09/02, OK + \GlobalLetLtxMacro{\tfnorigtable}{\table} + \GlobalLetLtxMacro{\tfnendorigtable}{\endtable} +% \end{macrocode} +% +% |\GlobalLetLtxMacro| was introduced in version 2010/09/02 v1.4 of the +% \xpackage{letltxmacro} package. +% +% \begin{macrocode} + }{% else + \PackageError{tablefootnote}{% + Outdated version of letltxmacro package used% + }{Version 2010/09/02 v1.4 or newer needed but not found!% + \MessageBreak% + Update the used letltxmacro package.} + \LetLtxMacro{\tfnorigtable}{\table} + \LetLtxMacro{\tfnendorigtable}{\endtable} + }% +% \end{macrocode} +% +% \pagebreak +% +% \begin{macrocode} + \ltx@ifpackageloaded{float}{% + \@ifpackagelater{float}{2001/11/08}% v1.3d + {% >= 2001/11/08, OK + }{% else + \PackageWarningNoLine{tablefootnote}{% + It is required version\MessageBreak + 2001/11/08 v1.3d (or later) of package float,\MessageBreak + but only version\MessageBreak + `\csname ver@float.sty\endcsname'\MessageBreak + is available}% + }% + }{\relax} + \renewenvironment{table}{% + \ltx@ifpackageloaded{float}{% +% \end{macrocode} +% +% When \xpackage{etoolbox.sty} was not found, and the \xpackage{float} package +% has been loaded, and the float specifier is \texttt{H}, then |\endtable| was +% let to |\float@endH| by the \xpackage{float} package (line~79 of +% \xpackage{float.sty}, 2001/11/08 v1.3d:\\ +% |\expandafter\let\csname end#1\endcsname\float@endH|), i.\,e.~appending\\ +% |\tfn@tablefootnoteprintout \gdef\tfn@fnt{0}| to |\endtable| is useless. +% Instead of this, it must be appended to |\float@endH|.\\ +% (Why is this not necessary when \xpackage{etoolbox} is used? +% That is a good question, answers are welcome.) +% +% \begin{macrocode} + \ltx@LocalAppendToMacro{\float@endH}{% + \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% + \ltx@ifpackageloaded{footnotebackref}{% + \LetLtxMacro{\tfncurrentmft}{\@makefntext}% + \LetLtxMacro{\@makefntext}{\tablemakefntext}% + \tfn@tablefootnoteprintout% + \LetLtxMacro{\@makefntext}{\tfncurrentmft}% + }{% footnotebackref not loaded + \tfn@tablefootnoteprintout% + }% + \gdef\tfn@fnt{0}% + }% +% \end{macrocode} +% +% \pagebreak +% +% The |sidewaystable|-environment must be treated separately: +% +% \begin{macrocode} + \ltx@ifpackageloaded{rotating}{% + \let\tfnorigsidewaystable\sidewaystable + \let\tfnendorigsidewaystable\endsidewaystable + \renewenvironment{sidewaystable}{% + \gdef\tfn@swt{1}% + \tfnorigsidewaystable% + }{% + \ifx\tfn@fnt\tfn@footnotezero% \relax + \else% + \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}% + \tfnendorigsidewaystable% + }% + }{}% +} + +% \end{macrocode} +% +% \DescribeMacro{\AtBeginDocument} +% When the \xpackage{rotating} (for |sidewaystable|s) or the +% \xpackage{footnotebackref} (for back references for the footnotes) +% package is used, it must be loaded before the \xpackage{tablefootnote} package. +% Using both packages is also possible, in which case both must be loaded before +% the \xpackage{tablefootnote} package. If any one of those packages is loaded +% |\AtBeginDocument| after this check, the according error message will not be +% given, but packages really should be loaded before |\AtBeginDocument|. +% +% \begin{macrocode} +\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 package!\MessageBreak% + }% + \fi% + }{% else \relax + } + \ltx@ifpackageloaded{rotating}{% + \ifx\tfn@rotating\tfn@footnotezero% + \PackageError{tablefootnote}{% + Package rotating loaded after tablefootnote}{% + When using both the rotating and the tablefootnote package,% + \MessageBreak% + the rotating package MUST be loaded before the tablefootnote% + \space package!\MessageBreak% + }% + \fi% + }{% else \relax + } +% \end{macrocode} +% +% \pagebreak +% +% When the document is compiled with \LuaLaTeX{}, hyperlinks in rotated content +% will be misplaced, regardless of the use of the \xpackage{tablefootnote} package +% (or of tables or footnotes). The text to be printed will be OK. +% This problem of \LuaLaTeX{} (not \xpackage{tablefootnote}) was found and reported +% by \textsc{Arno Trautmann}, 2011/11/15 -- thanks! +% +% \begin{macrocode} + \ltx@ifpackageloaded{hyperref}{% + \tfn@hyperfootnotes{ + \ifluatex% + \PackageWarningNoLine{tablefootnote}{% + 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% + }{% else \relax + }% + }{% else \relax + }% +% \end{macrocode} +% +% When the \xpackage{footnotebackref} package is used but the footnotes are not +% hyperlinked, neither the back references nor the tablefootnotes will work. +% +% \begin{macrocode} + \ltx@ifpackageloaded{footnotebackref}{% + \ltx@ifpackageloaded{hyperref}{% + \tfn@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% + }% + }{\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% + }% + }{} +} + +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \pagebreak +% +% \section{Installation} +% +% \subsection{Downloads\label{ss:Downloads}} +% +% Everything is available on \CTAN{}, \url{http://www.ctan.org/}, +% but may need additional packages themselves.\\ +% +% \DescribeMacro{tablefootnote.dtx} +% For unpacking the |tablefootnote.dtx| file and constructing the documentation +% it is required: +% \begin{description} +% \item[-] \TeX{} Format \LaTeXe{}: \url{http://www.CTAN.org/} +% +% \item[-] document class \xpackage{ltxdoc}, 2007/11/11, v2.0u, +% \url{http://www.ctan.org/pkg/ltxdoc} +% +% \item[-] package \xpackage{holtxdoc}, 2012/03/21, v0.24, +% \url{http://www.ctan.org/pkg/holtxdoc} +% +% \item[-] package \xpackage{hypdoc}, 2011/08/19, v1.11, +% \url{http://www.ctan.org/pkg/hypdoc} +% \end{description} +% +% \DescribeMacro{tablefootnote.sty} +% The |tablefootnote.sty| for \LaTeXe{} (i.\,e.~each document using +% the \xpackage{tablefootnote} package) requires: +% \begin{description} +% \item[-] \TeX{} Format \LaTeXe{}, \url{http://www.CTAN.org/} +% +% \item[-] package \xpackage{letltxmacro}, 2010/09/02, v1.4, +% \url{http://www.ctan.org/pkg/letltxmacro}. +% +% \item[-] package \xpackage{ltxcmds}, 2011/11/09, v1.22, +% \url{http://www.ctan.org/pkg/ltxcmds} +% \end{description} +% +% When the \xpackage{hyperref} package is used, also the \xpackage{ifluatex} package +% is needed, but it is already loaded automatically by the \xpackage{hyperref} +% package.\\ +% When the \xpackage{etoolbox} package is available, it is used: +% \begin{description} +% \item[-] package \xpackage{etoolbox}, 2011/01/03, v2.1, +% \url{http://www.ctan.org/pkg/etoolbox}. +% \end{description} +% +% \DescribeMacro{tablefootnote-example.tex} +% The |tablefootnote-example.tex| requires the same files as all +% documents using the \xpackage{tablefootnote} package and additionally: +% \begin{description} +% \item[-] class \xpackage{article}, 2007/10/19, v1.4h, from \xpackage{classes.dtx}:\\ +% \CTAN{macros/latex/base/classes.dtx} +% +% \item[-] package \xpackage{rotating}, 2009/03/28, v2.16a, +% \url{http://www.ctan.org/pkg/rotating} +% +% \item[-] package \xpackage{float}, 2001/11/08, v1.3d, +% \url{http://www.ctan.org/pkg/float} +% +% \item[-] package \xpackage{placeins}, 2005/04/18, v2.2, +% \url{http://www.ctan.org/pkg/placeins}\\ +% for |\FloatBarrier| +% +% \item[-] package \xpackage{hyperref}, 2012/11/06, v6.83m, +% \url{http://www.ctan.org/pkg/hyperref} +% +% \item[-] package \xpackage{tablefootnote}, 2014/01/26, v1.1c,\\ +% \url{http://www.ctan.org/pkg/tablefootnote}\\ +% (Well, it is the example file for this package, and because you +% are reading the documentation for the \xpackage{tablefootnote} package, +% it can be assumed that you already have some version of it~-- +% is it the current one?) +% \end{description} +% +% \DescribeMacro{Oberdiek} +% \DescribeMacro{holtxdoc} +% \DescribeMacro{ifluatex} +% \DescribeMacro{letltxmacro} +% \DescribeMacro{ltxcmds} +% All packages of \textsc{Heiko Oberdiek}'s bundle `oberdiek' +% (especially \xpackage{holtxdoc}, \xpackage{ifluatex}, \xpackage{letltxmacro}, +% and \xpackage{ltxcmds}) are also available in a TDS compliant ZIP archive:\\ +% \CTAN{install/macros/latex/contrib/oberdiek.tds.zip}.\\ +% It is probably best to download and use this, because the packages in there +% are quite probably both recent and compatible among themselves.\\ +% +% \pagebreak +% +% \DescribeMacro{hyperref} +% \noindent \xpackage{hyperref} is not included in that bundle and needs to be +% downloaded separately,\\ +% \url{http://www.ctan.org/install/macros/latex/contrib/hyperref.tds.zip}.\\ +% +% \DescribeMacro{M\"{u}nch} +% A hyperlinked list of my (other) packages can be found at +% \url{http://www.ctan.org/author/muench-hm}.\\ +% +% \subsection{Package, unpacking TDS} +% \paragraph{Package.} This package is available on \CTAN{} +% \begin{description} +% \item[\CTAN{macros/latex/contrib/tablefootnote/tablefootnote.dtx}]\hspace*{0.1cm} \\ +% The source file. +% \item[\CTAN{macros/latex/contrib/tablefootnote/tablefootnote.pdf}]\hspace*{0.1cm} \\ +% The documentation. +% \item[\CTAN{macros/latex/contrib/tablefootnote/tablefootnote-example.pdf}]\hspace*{0.1cm} \\ +% The compiled example file, as it should look like. +% \item[\CTAN{macros/latex/contrib/tablefootnote/README}]\hspace*{0.1cm} \\ +% The README file. +% \end{description} +% There is also a tablefootnote.tds.zip available: +% \begin{description} +% \item[\CTAN{install/macros/latex/contrib/tablefootnote.tds.zip}]\hspace*{0.1cm} \\ +% Everything in \xfile{TDS} compliant, compiled format. +% \end{description} +% which additionally contains\\ +% \begin{tabular}{ll} +% tablefootnote.ins & The installation file.\\ +% tablefootnote.drv & The driver to generate the documentation.\\ +% tablefootnote.sty & The \xext{sty}le file.\\ +% tablefootnote-example.tex & The example file. +% \end{tabular} +% +% \bigskip +% +% \noindent For required other packages, please see the preceding subsection. +% +% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting +% \docstrip{} archive. The files are extracted by running the +% \xext{dtx} through \plainTeX{}: +% \begin{quote} +% \verb|tex tablefootnote.dtx| +% \end{quote} +% +% \noindent About generating the documentation see paragraph~\ref{GenDoc} below.\\ +% +% \paragraph{TDS.} Now the different files must be moved into +% the different directories in your installation TDS tree +% (also known as \xfile{texmf} tree): +% \begin{quote} +% \def\t{^^A +% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} +% tablefootnote.sty & tex/latex/tablefootnote/tablefootnote.sty\\ +% tablefootnote.pdf & doc/latex/tablefootnote/tablefootnote.pdf\\ +% tablefootnote-example.tex & doc/latex/tablefootnote/tablefootnote-example.tex\\ +% tablefootnote-example.pdf & doc/latex/tablefootnote/tablefootnote-example.pdf\\ +% tablefootnote.dtx & source/latex/tablefootnote/tablefootnote.dtx\\ +% \end{tabular}^^A +% }^^A +% \sbox0{\t}^^A +% \ifdim\wd0>\linewidth +% \begingroup +% \advance\linewidth by\leftmargin +% \advance\linewidth by\rightmargin +% \edef\x{\endgroup +% \def\noexpand\lw{\the\linewidth}^^A +% }\x +% \def\lwbox{^^A +% \leavevmode +% \hbox to \linewidth{^^A +% \kern-\leftmargin\relax +% \hss +% \usebox0 +% \hss +% \kern-\rightmargin\relax +% }^^A +% }^^A +% \ifdim\wd0>\lw +% \sbox0{\small\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\footnotesize\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\scriptsize\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\tiny\t}^^A +% \ifdim\wd0>\linewidth +% \lwbox +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \end{quote} +% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip{}'s +% \xfile{TDS} installing feature, then some files can already be in the right +% place, see the documentation of \docstrip{}. +% +% \subsection{Refresh file name databases} +% +% If your \TeX{}~distribution (\TeX live, \mikTeX{}, \dots{}) relies on file name +% databases, you must refresh these. For example, \teTeX{} users run +% \verb|texhash| or \verb|mktexlsr|. +% +% \subsection{Some details for the interested} +% +% \paragraph{Unpacking with \LaTeX{}.} +% The \xfile{.dtx} chooses its action depending on the format: +% \begin{description} +% \item[\plainTeX:] Run \docstrip{} and extract the files. +% \item[\LaTeX:] Generate the documentation. +% \end{description} +% If you insist on using \LaTeX{} for \docstrip{} (really, +% \docstrip{} does not need \LaTeX{}), then inform the autodetect routine +% about your intention: +% \begin{quote} +% \verb|latex \let\install=y\input{tablefootnote.dtx}| +% \end{quote} +% Do not forget to quote the argument according to the demands +% of your shell. +% +% \paragraph{Generating the documentation.\label{GenDoc}} +% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate +% the documentation. The process can be configured by a +% configuration file \xfile{ltxdoc.cfg}. For instance, put the following +% line into this file, if you want to have A4 as paper format: +% \begin{quote} +% \verb|\PassOptionsToClass{a4paper}{article}| +% \end{quote} +% +% \noindent An example follows how to generate the +% documentation with \pdfLaTeX{}: +% +% \begin{quote} +%\begin{verbatim} +%pdflatex tablefootnote.dtx +%makeindex -s gind.ist tablefootnote.idx +%pdflatex tablefootnote.dtx +%makeindex -s gind.ist tablefootnote.idx +%pdflatex tablefootnote.dtx +%\end{verbatim} +% \end{quote} +% +% \subsection{Compiling the example} +% +% The example file, \textsf{tablefootnote-example.tex}, can be compiled via\\ +% \indent |latex tablefootnote-example.tex|,\\ +% \indent |lualatex tablefootnote-example.tex|,\\ +% or (recommended)\\ +% \indent |pdflatex thumbs-example.tex|\\ +% and will need at least two compiler runs to get everything right. +% +% \bigskip +% +% \section{Acknowledgements} +% +% I would like to thank \textsc{Heiko Oberdiek} for providing +% the \xpackage{hyperref}, \xpackage{ifluatex}, \xpackage{letltxmacro}, +% \xpackage{ltxcmds}, as well as a~lot~(!) of other useful packages +% (from which I also got everything I know about creating a file in +% \xext{dtx} format, OK, say it: copying), +% and for information about the \pdfTeX{}-bug, +% \textsc{Arno Trautmann} for reporting the bug of misplaced hyperreferences in +% |sidewaystable|s using \LuaTeX{}, independently of the \xpackage{tablefootnote} +% package or footnotes at all, +% \textsc{Thomas~V.} for reporting the bug of not handling the case of +% \xpackage{hyperref} option |hyperfootnotes=false|, +% \textsc{Sverre Stausland Johnsen} for reporting the bug in case of \emph{not} +% using \xpackage{hyperref}, +% and the \Newsgroup{comp.text.tex} and \Newsgroup{de.comp.text.tex} newsgroups +% as well as everybody at \url{http://tex.stackexchange.com} +% for their help in all things \TeX{}. +% +% \pagebreak +% +% \phantomsection +% \begin{History}\label{History} +% \begin{Version}{2011/10/26 v1.0a, tabfootn} +% \item Upload to \CTAN{macros/latex/contrib/tablefootnote/}. +% \end{Version} +% \begin{Version}{2011/10/29 v1.0b} +% \item Renamed to \xpackage{tablefootnote}. +% \item Added support for the |sidewaystable|-environment of the +% \xpackage{rotating} package. +% \item Diverse changes in documentation and README. +% \end{Version} +% \begin{Version}{2011/11/06 v1.0c} +% \item Replaced |^{\text{\thefootnote}}| by |{}^{\text{\textup{\thefootnote}}}|. +% \item Bug fix: When \xpackage{etoolbox.sty} was not found, and the \xpackage{float} +% package had been loaded, and the float specifier was \texttt{H}, +% then the |\tablefootnote|s were not printed for that table. Fixed. +% \end{Version} +% \begin{Version}{2011/11/19 v1.0d} +% \item Replaced |{}^{\text{\textup{\thefootnote}}}| by +% |\textsuperscript{\thefootnote}|, therefore the \xpackage{amstext} +% package is no longer required by the \xpackage{tablefootnote} package. +% \item \xpackage{lscape} and \xpackage{pdflscape} package now work with +% \xpackage{tablefootnote} (except for using a \texttt{sidewaystable} on +% a \texttt{landscape} page). +% \item Added information about footnotes in \texttt{sidewaystable} being printed +% one below the other, even if \xpackage{footmisc} package with option +% \texttt{para} is used. +% \item Redefined |\tfn@swtbox| from +% \begin{verbatim} +% \vspace{0.8cm}% +% \begin{spacing}{0.1}% +% \subcaptionbox*{}[\linewidth][l]{\tfn@tablefootnoteprintout}% +% \end{spacing}% +% \end{verbatim} +% to +% \begin{verbatim} +% \vspace{2\baselineskip}% +% \parbox[b][][t]{\linewidth}{\raggedright\tfn@tablefootnoteprintout}% +% \end{verbatim} +% , therefore the \xpackage{setspace} and \xpackage{subcaption} packages +% are no longer required by the \xpackage{tablefootnote} package. +% \item No longer uses |\numexpr|, therefore also usable without \eTeX{}. +% \item Replaced |\textsuperscript{\thefootnote}| by +% |\hbox {\@textsuperscript {\normalfont \thefootnote }}|, +% which is next to the original definition of |\@makefnmark| +% (|\hbox {\@textsuperscript {\normalfont \@thefnmark }}|, +% but according to |\show\@thefnmark| here |\@thefnmark| is +% |{\protect \itshape}| instead of |\thefootnote|). +% \item Added an error message, when \LuaTeX{}, \xpackage{rotating} package, and +% \xpackage{hyperref} package are used together. Hyperreferences in +% |sidewaystable|s are misplaced, independently of the +% \xpackage{tablefootnote} package or footnotes at all. (Bug reported +% by \textsc{Arno Trautmann}, 2011/11/15 -- thanks!) +% \item Added footnotesymbol-footnote-numbers in the example. +% \end{Version} +% \begin{Version}{2011/11/26 v1.0e} +% \item Check for \xpackage{hyperref} is only done once. +% \item Message regarding the misplacement of hyperlinks by \LuaLaTeX{} +% changed form error to warning. +% \item Replaced |\vspace{2\baselineskip}| by +% \begin{verbatim} +% \ifvoid \footins% +% \vskip 2\baselineskip% +% \else% +% \vskip \skip\footins% +% \fi% +% \end{verbatim} +% between the |sidewaystable|s and their footnotes. +% \item The warning about un-regarded |para|-option of \xpackage{footmoisc} +% package is only given at the second |tablefootnote| in a |sidewaystable|, +% not repeatedly for every |tablefootnote| in a |sidewaystable|. +% \end{Version} +% \begin{Version}{2012/01/01 v1.0f} +% \item Bugfix: Wrong installation path given in the documentation, fixed. +% \item Update of documentation, README, and \xfile{dtx} internals. +% \end{Version} +% \begin{Version}{2012/01/14 v1.0g} +% \item Bugfix: There was a |relax| instead of a |\relax|, fixed. +% \end{Version} +% \begin{Version}{2012/07/29 v1.0h} +% \item \xpackage{tablefootnote} is now compatible to the new +% \xpackage{footnotebackref} package, 2012/07/01, v1.0, +% \url{http://www.ctan.org/pkg/footnotebackref}. +% \end{Version} +% \begin{Version}{2014/01/08 v1.1a} +% \item Tablefootnotes now regard optional footnote marks: +% |\tablefootnote[| custom mark here! |]{...}| +% \item Bug fix: the case of \xpackage{hyperref} option |hyperfootnotes=false| +% was not handeled at all. (Bug reported by \textsc{Thomas~V.}, % +% 2014/01/02 -- thanks!) +% \item A lot of details. +% \end{Version} +% \begin{Version}{2014/01/20 v1.1b} +% \item Bug fix: Package was broken when \xpackage{hyperref} was \emph{not} used. +% (Bug reported by \textsc{Sverre Stausland Johnsen} -- thanks!) +% \end{Version} +% \begin{Version}{2014/01/26 v1.1c} +% \item The emergency bug fix of version 2014/01/20 v1.1b was replaced by using +% the new robust macro |\tfn@hyperfootnotes|, which only \emph{internally} +% uses |\ifHy@hyperfootnotes|. If the \xpackage{hyperref} package is not used, +% \LaTeX{} now does not see any confusing +% |\ifHy@hyperfootnotes|\ldots|\else|\ldots|\fi| at all. +% \item URLs and README updated. +% \end{Version} +% \end{History} +% +% \bigskip +% +% When you find a mistake or have a suggestion for an improvement of this package, +% please send an e-mail to the maintainer, thanks! (Please see BUG REPORTS in the README.) +% +% \bigskip +% +% \PrintIndex +% +% \Finale +\endinput \ No newline at end of file diff --git a/macros/latex/contrib/tablefootnote/tablefootnote.pdf b/macros/latex/contrib/tablefootnote/tablefootnote.pdf new file mode 100644 index 0000000000..b82fe71512 Binary files /dev/null and b/macros/latex/contrib/tablefootnote/tablefootnote.pdf differ -- cgit v1.2.3