diff options
author | Karl Berry <karl@freefriends.org> | 2009-11-19 18:36:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-11-19 18:36:45 +0000 |
commit | ea6dc95d491201abe5f09dd2ce16ccc4bd9a9f69 (patch) | |
tree | 9f2fc24c9e5b751a76bd752b5f04b51d14fe95a0 /Master/texmf-dist/tex/latex/widetable | |
parent | 7efd7dd40e467960756a4a1391f05ce085c0c196 (diff) |
widetable 1.1 (26oct09)
git-svn-id: svn://tug.org/texlive/trunk@16082 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/widetable')
-rw-r--r-- | Master/texmf-dist/tex/latex/widetable/widetable.sty | 63 |
1 files changed, 57 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/widetable/widetable.sty b/Master/texmf-dist/tex/latex/widetable/widetable.sty index 985a41c8f23..499f033ccdc 100644 --- a/Master/texmf-dist/tex/latex/widetable/widetable.sty +++ b/Master/texmf-dist/tex/latex/widetable/widetable.sty @@ -26,13 +26,38 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{widetable}% - [2009/07/21 v.1.0 Package for typesetting specified width tables] + [2009/10/26 v.1.1 Package for typesetting specified width tables] \dimendef\wt@Numer=2 \dimendef\wt@Denom=4 \countdef\wt@Num=2 \countdef\wt@Den=4 \countdef\wt@I=6 \def\wt@segno{} + +\newif\ifm@mifetex + \m@mifetexfalse +\IfFileExists{ifetex.sty}{\RequirePackage{ifetex}\relax}{% + \PackageWarningNoLine{widetable}{% + If there is an `ifetex' package then it is not installed.\MessageBreak + The package is being emulated}% +\m@mifetextrue +\newif\ifetex + \etexfalse +\ifx\eTeXversion\undefined +\else + \ifx\eTeXversion\@undefined + \else + \ifx\eTeXversion\relax + \else + \ifnum\eTeXversion>0\relax + \etextrue + \fi + \fi + \fi +\fi +%%\EmulatedPackage{ifetex}[2008/07/23]% from memoir.cls +} + \def\dividi#1\per#2\in#3{% \begingroup \wt@Numer #1\relax \wt@Denom #2\relax @@ -49,16 +74,33 @@ \edef\x{\noexpand\endgroup\noexpand\def\noexpand#3{\wt@segno\wt@Q}} \x } + \def\wt@dividiDec{% \wt@Numer=10\wt@Numer \wt@Num=\wt@Numer \divide\wt@Num\wt@Den \edef\wt@q{\number\wt@Num}\edef\wt@Q{\wt@Q\wt@q}% \advance\wt@Numer -\wt@q\wt@Denom} + +\def\scala#1\per#2\diviso#3\in#4{\begingroup +\wt@Num #2\relax \wt@Den #3\relax +\ifnum\wt@Den<\z@ \wt@Den -\wt@Den \wt@Num -\wt@Num \fi +\ifnum\wt@Den=\z@ + \@tempdima\ifnum\wt@Num<0-\fi\maxdimen +\else + \@tempdima\dimexpr#1*\wt@Num/\wt@Den\relax +\fi +\edef\x{\noexpand\endgroup\noexpand\def\noexpand#4{\the\@tempdima}}% +\x} + \newdimen\wt@width + \def\wt@starttabular{\expandafter\tabular\expandafter{\wt@preamble}} + \def\widetable#1#2{% \def\@tempC{widetable}\setlength{\wt@width}{#1}% \def\wt@preamble{#2}\wt@getTable} + \newif\ifwt@scartare\wt@scartarefalse + \def\endwidetable{% \ifwt@scartare \noindent\null @@ -70,13 +112,19 @@ \advance\wt@width-\wd\z@ \@tempdimb=\wd\tw@ \advance\@tempdimb-\wd\z@ - \dividi\wt@width\per\@tempdimb\in\@tempA - \tabcolsep=\@tempA\tabcolsep + \ifetex + \scala\tabcolsep\per\wt@width\diviso\@tempdimb\in\tabcolsep\relax + \else + \dividi\wt@width\per\@tempdimb\in\@tempA + \tabcolsep=\@tempA\tabcolsep + \fi \wt@starttabular\the\toks@\endtabular \fi \ignorespacesafterend } + \def\wt@finetabella{\end{widetable}}% + \def\wt@getTable#1\end#2{\def\@tempB{#2}% \ifx\@tempB\@tempC \toks@={#1}% @@ -89,12 +137,14 @@ \MessageBreak The table is not typeset and is substituted% \MessageBreak - with a framed box} - \noindent\framebox[\wt@width]{The table was not typeset because - it contains a visible \texttt{\char`\\end} in one or more cells.}\par + with a framed box}% + \advance\wt@width-2\fboxsep + \noindent\fbox{\parbox{\wt@width}{The table was not typeset because + it contains a visible \texttt{\char`\\end} in one or more cells.}}\par \expandafter\wt@finishTable \fi } + \def\wt@finishTable#1\end#2{% \def\@tempB{#2}% \ifx\@tempB\@tempC @@ -103,6 +153,7 @@ \expandafter\wt@finishTable \fi } + \endinput %% %% End of file `widetable.sty'. |