summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-07-14 23:01:14 +0000
committerKarl Berry <karl@freefriends.org>2010-07-14 23:01:14 +0000
commit1038d18b319179cd239b79b6550791be0aa14ee7 (patch)
treedf185549f09c215bad2751f6b36203be9bf111a4 /Master/texmf-dist/tex
parentea749b653478cc14465055c40a20f8f221add0c5 (diff)
threeparttablex update (14jul10)
git-svn-id: svn://tug.org/texlive/trunk@19460 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/threeparttablex/threeparttablex.sty56
1 files changed, 49 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/threeparttablex/threeparttablex.sty b/Master/texmf-dist/tex/latex/threeparttablex/threeparttablex.sty
index e5d6ba4b07b..a333b85a281 100644
--- a/Master/texmf-dist/tex/latex/threeparttablex/threeparttablex.sty
+++ b/Master/texmf-dist/tex/latex/threeparttablex/threeparttablex.sty
@@ -1,4 +1,4 @@
-\ProvidesPackage{threeparttablex}[2010/02/12 v0.1 by daleif]
+\ProvidesPackage{threeparttablex}[2010/07/14 v0.2 by daleif]
%%
%% This package can be distributed and/or modified under the
@@ -51,14 +51,20 @@
\endgroup}
% then add the table notes inside a \parbox of the required width
\multicolumn{\LT@cols}{c}{%
- \makebox[0pt][c]{\parbox{\TPTL@width}{%
+ \makebox[0pt][c]{%
+ \parbox{\TPTL@width}{%
\let\TPT@hsize\@empty% otherwise the width is not reset
- % correctly as \TPT@hsize messes with \@parboxrestore
+ % correctly as \TPT@hsize messes with
+ % \@parboxrestore
+ \let\TPToverlap\relax%
\begin{tablenotes}[\TPTL@optarg]%
\TPTL@font%
\TPTL@body
\end{tablenotes}
- }}}}
+ }%
+ }%
+ }%
+}
% the alternative threeparttable env, it only enables \TPToverlap
\newenvironment{ThreePartTable}{\let\TPToverlap\TPTrlap}{}
@@ -89,11 +95,18 @@
\newcommand\TPTL@generator[2]{%
\providecommand{#1}{}% just to make it exist
\renewcommand#1[1][#2]{%
- \let\TPTL@oldmakelabel=\makelabel
- \renewcommand\makelabel[1]{\TPTLnotesnamefontcommand{##1:}}
- \item
+ \let\TPTL@oldmakelabel=\makelabel%
+ \renewcommand\makelabel[1]{\TPTLnotesnamefontcommand{##1:}}%
+ \item%
\let\makelabel=\TPTL@oldmakelabel}}
+\newcommand\TPTL@generator@para[2]{%
+ \providecommand{#1}{}% just to make it exist
+ \renewcommand#1[1][#2]{%
+ \TPTLnotesnamefontcommand{##1: }%
+ }}
+
+
\providecommand\TPTLnotename{Note}
\providecommand\TPTLsourcename{Source}
\providecommand\TPTLnotesnamefontcommand{\textit}
@@ -105,6 +118,8 @@
% \makelabel (i.e. \item) hides its argument inside a group, making it
% difficult to set \@currentlabel, so we locally overload \item to get
% the argument and set \@currentlabel AFTER \item[...]
+
+
\renewcommand\tablenotes{%
\let\TPTL@item=\item
\renewcommand\item[1][]{\TPTL@item[##1]%
@@ -113,6 +128,33 @@
\TPTL@generator\source{\TPTLsourcename}
\TPTL@font\TPTL@tablenotes}
+
+% this is a copy from threeparttable, since adding to it failed
+\def\TPT@doparanotes{\par
+ \prevdepth\z@ \TPT@hsize
+ \TPTnoteSettings
+ \parindent\z@ \pretolerance 8
+ \linepenalty 200
+ \renewcommand\item[1][]{\relax\ifhmode \begingroup
+ \unskip
+ \advance\hsize 10em % \hsize is scratch register, based on real hsize
+ \penalty -45 \hskip\z@\@plus\hsize \penalty-19
+ \hskip .15\hsize \penalty 9999 \hskip-.15\hsize
+ \hskip .01\hsize\@plus-\hsize\@minus.01\hsize
+ \hskip 1em\@plus .3em
+ \endgroup\fi
+ \tnote{##1}%
+ \phantomsection\protected@edef\@currentlabel{##1}%
+ \,\ignorespaces}%
+ \let\TPToverlap\relax%
+ \TPTL@generator@para\note{\TPTLnotename}%
+ \TPTL@generator@para\source{\TPTLsourcename}%
+ \TPTL@font%
+ \def\endtablenotes{\par}%
+ }
+
+
+
% just in case it is not already there
\providecommand\phantomsection{}