diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/tabvar/tabvar.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/tabvar/tabvar.sty | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/tabvar/tabvar.sty b/Master/texmf-dist/tex/latex/tabvar/tabvar.sty index d575c60dbdf..33de640e389 100644 --- a/Master/texmf-dist/tex/latex/tabvar/tabvar.sty +++ b/Master/texmf-dist/tex/latex/tabvar/tabvar.sty @@ -21,11 +21,11 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% -%% Copyright (C) Daniel Flipo 2003-2012 <daniel.flipo at free.fr> +%% Copyright (C) Daniel Flipo 2003-2013 <daniel.flipo at free.fr> %% \NeedsTeXFormat{LaTeX2e}[1997/06/01] \ProvidesFile{tabvar.sty} - [2012/03/14 v1.61 (Daniel Flipo)] + [2013/01/21 v1.7 (Daniel Flipo)] \newif\ifFlechesMP \FlechesMPfalse \DeclareOption{FlechesMP}{\FlechesMPtrue} \DeclareOption{FlechesPS}{\FlechesMPfalse} @@ -240,7 +240,32 @@ \ifodd\@niveaux\else\advance\@tempdimb by .5\baselineskip\fi \@pos=1\raisebox{\@tempdimb}{\ensuremath{#1}}% } - +\newsavebox\TVbox +\newdimen\TVextraheight +\newdimen\TVextradepth +\setlength{\TVextraheight}{2pt} +\setlength{\TVextradepth}{2pt} +\newdimen\TV@tempa +\newdimen\TV@tempb +\newcommand{\TVstretch}[2][0pt]{% + \edef\tmp{#1}% + \sbox{\TVbox}{\ensuremath{#2}}% + \settoheight{\TV@tempa}{\usebox{\TVbox}}% + \settodepth {\TV@tempb}{\usebox{\TVbox}}% + \ifdim\tmp=0pt + \addtolength{\TV@tempa}{\TVextraheight}% + \addtolength{\TV@tempb}{\TVextradepth}% + \else + \ifdim\tmp>0pt + \addtolength{\TV@tempa}{\tmp}% + \else + \addtolength{\TV@tempb}{-\tmp}% + \fi + \fi + \usebox{\TVbox}% + \addtolength{\TV@tempa}{\TV@tempb}% + \rule[-\TV@tempb]{0pt}{\TV@tempa}% +} \newcommand{\TVarraystretch}{1.5} \setlength{\TVarraycolsep}{1pt} \newenvironment{tabvar}[1] |