diff options
author | Karl Berry <karl@freefriends.org> | 2020-02-09 22:07:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-02-09 22:07:33 +0000 |
commit | 7be1f661f1770a0a90eb4a6b343a7dc3423a651b (patch) | |
tree | 52cd6ab93a1ad29820383d57d530d4fe32ac15f1 /Master/texmf-dist/tex/latex/diagbox | |
parent | 090a854a3fa7ab9e17d84b3f623b0ae779e81731 (diff) |
diagbox (9feb20)
git-svn-id: svn://tug.org/texlive/trunk@53737 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/diagbox')
-rw-r--r-- | Master/texmf-dist/tex/latex/diagbox/diagbox.sty | 52 |
1 files changed, 37 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/diagbox/diagbox.sty b/Master/texmf-dist/tex/latex/diagbox/diagbox.sty index caf817c584c..d7f0fe1bfba 100644 --- a/Master/texmf-dist/tex/latex/diagbox/diagbox.sty +++ b/Master/texmf-dist/tex/latex/diagbox/diagbox.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2011--2016 by Leo Liu <leoliu.pku@gmail.com> +%% Copyright (C) 2011--2020 by Leo Liu <leoliu.pku@gmail.com> %% -------------------------------------------------------------------------- %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -20,7 +20,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{diagbox} - [2016/12/28 v2.2 Making table heads with diagonal lines] + [2020/02/09 v2.3 Making table heads with diagonal lines] \RequirePackage{keyval} \RequirePackage{pict2e} \RequirePackage{fp} @@ -71,10 +71,10 @@ \setlength{\diagbox@outsepr}{#1}} \define@key{diagbox}{leftsep}{% \setlength{\diagbox@insepl}{#1}% - \setlength{\diagbox@outsepl}{-(#1)}} + \setlength{\diagbox@outsepl}{(#1)*-1}} \define@key{diagbox}{rightsep}{% \setlength{\diagbox@insepr}{#1}% - \setlength{\diagbox@outsepr}{-(#1)}} + \setlength{\diagbox@outsepr}{(#1)*-1}} \define@key{diagbox}{trim}{% \@tfor\@reserveda:=#1\do{% \ifcsname diagbox@insep\@reserveda\endcsname @@ -161,12 +161,18 @@ \end{tabular}}} \let\diagbox@triple@setbox@SW\diagbox@triple@setbox@NW \def\diagbox@triple@setbox@SE#1#2#3{% - \setbox\diagbox@boxa=\hbox{% - \begin{tabular}{@{\hspace{\diagbox@insepl}}l@{}}#1\end{tabular}}% - \setbox\diagbox@boxm=\hbox{% - \begin{tabular}{@{}r@{\hspace{\diagbox@insepr}}}#2\end{tabular}}% - \setbox\diagbox@boxb=\hbox{% - \begin{tabular}{@{}r@{\hspace{\diagbox@insepr}}}#3\end{tabular}}} +\setbox\diagbox@boxa=\hbox{% + \begin{tabular}{@{\hspace{\diagbox@insepl}}>{\diagbox@font}l@{}} + #1 + \end{tabular}}% +\setbox\diagbox@boxm=\hbox{% + \begin{tabular}{@{}>{\diagbox@font}r@{\hspace{\diagbox@insepr}}} + #2 + \end{tabular}}% +\setbox\diagbox@boxb=\hbox{% + \begin{tabular}{@{}>{\diagbox@font}r@{\hspace{\diagbox@insepr}}} + #3 + \end{tabular}}} \let\diagbox@triple@setbox@NE\diagbox@triple@setbox@SE \def\diagbox@triple@pict@NW{% \put(0,0) {\makebox(0,0)[bl]{\box\diagbox@boxa}} @@ -216,17 +222,33 @@ \FPmul\dj\xa\ym \FPsub\u\dj\di \FPupn{v}{bj ci * bi cj * -}% - \FPupn{delta}{bi dj * bj di * - cj ci - * 4 * % - v u + copy * % - - 2 swap root}% + \FPupn{delta}{bi dj * bj di * - cj ci - * 4 * v u + copy * -}% + \newif\ifdeltapositive + \FPifneg\delta \deltapositivefalse \else \deltapositivetrue \fi + \FPset\x{0}% + \FPset\y{0}% \ifdim\diagbox@wd=\z@ - \FPupn{x}{2 bj bi - delta v u - + / /}% + \ifdim\bi\p@>\bj\p@\ifdeltapositive + \FPupn{x}{2 bj bi - 2 delta root v u - + / /}% + \fi\fi + \ifdim\x\p@=\z@ + \FPupn{x}{xa xm + xb xm + max 2 *}% + \PackageWarning{diagbox}{Cannot calculate proper width of triple diagbox.\MessageBreak + Use \x pt instead.}% + \fi \diagbox@wd=\x\p@ \else \edef\x{\strip@pt\diagbox@wd}% \fi \ifdim\diagbox@ht=\z@ - \FPupn{y}{2 cj ci - delta v u + - / /}% + \ifdim\ci\p@<\cj\p@\ifdeltapositive + \FPupn{y}{2 cj ci - 2 delta root v u + - / /}% + \fi\fi + \ifdim\y\p@=\z@ + \FPupn{y}{ya ym + yb ym + max 2 *}% + \PackageWarning{diagbox}{Cannot calculate proper height of triple diagbox.\MessageBreak + Use \y pt instead.}% + \fi \diagbox@ht=\y\p@ \else \edef\y{\strip@pt\diagbox@ht}% |