From 1038d18b319179cd239b79b6550791be0aa14ee7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 14 Jul 2010 23:01:14 +0000 Subject: threeparttablex update (14jul10) git-svn-id: svn://tug.org/texlive/trunk@19460 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/threeparttablex/README | 3 ++ .../doc/latex/threeparttablex/threeparttablex.pdf | Bin 76044 -> 75885 bytes .../doc/latex/threeparttablex/threeparttablex.tex | 2 +- .../tex/latex/threeparttablex/threeparttablex.sty | 56 ++++++++++++++++++--- 4 files changed, 53 insertions(+), 8 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/threeparttablex/README b/Master/texmf-dist/doc/latex/threeparttablex/README index 0a76ee2f05e..228a348d6c2 100644 --- a/Master/texmf-dist/doc/latex/threeparttablex/README +++ b/Master/texmf-dist/doc/latex/threeparttablex/README @@ -19,6 +19,9 @@ can now do \tnotex{tn:a} to get \tnote{\ref{tn:a}}. For information on how to use threeparttable with longtable see the manual. +* v0.2 + Bug fixes regarding threeparttable options + * v0.1 Bug fix, width of table notes inserted into longtable might get the wrong width diff --git a/Master/texmf-dist/doc/latex/threeparttablex/threeparttablex.pdf b/Master/texmf-dist/doc/latex/threeparttablex/threeparttablex.pdf index d50410e541a..0afcbe1334c 100644 Binary files a/Master/texmf-dist/doc/latex/threeparttablex/threeparttablex.pdf and b/Master/texmf-dist/doc/latex/threeparttablex/threeparttablex.pdf differ diff --git a/Master/texmf-dist/doc/latex/threeparttablex/threeparttablex.tex b/Master/texmf-dist/doc/latex/threeparttablex/threeparttablex.tex index 0a52e733e57..b7e2f9bbc90 100644 --- a/Master/texmf-dist/doc/latex/threeparttablex/threeparttablex.tex +++ b/Master/texmf-dist/doc/latex/threeparttablex/threeparttablex.tex @@ -39,7 +39,7 @@ \author{Lars Madsen\thanks{Email: daleif@imf.au.dk}} -\date{Version 0.08, \today} +\date{Version 0.2, \today} \maketitle 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{} -- cgit v1.2.3