summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-01-02 23:50:34 +0000
committerKarl Berry <karl@freefriends.org>2017-01-02 23:50:34 +0000
commitca6bd5c649d7419cedbe72ae2d151cb7709d646c (patch)
treee960eab4bb6aa5c055ee4635ade6e202a268c336
parenta4a76e83143e53a7a889c2a18d2d4f82ae48f259 (diff)
diagbox (28dec16)
git-svn-id: svn://tug.org/texlive/trunk@42843 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/diagbox/diagbox.pdfbin214840 -> 279737 bytes
-rw-r--r--Master/texmf-dist/source/latex/diagbox/diagbox.dtx51
-rw-r--r--Master/texmf-dist/tex/latex/diagbox/diagbox.sty36
3 files changed, 49 insertions, 38 deletions
diff --git a/Master/texmf-dist/doc/latex/diagbox/diagbox.pdf b/Master/texmf-dist/doc/latex/diagbox/diagbox.pdf
index cd9677b8922..d31cd0c261d 100644
--- a/Master/texmf-dist/doc/latex/diagbox/diagbox.pdf
+++ b/Master/texmf-dist/doc/latex/diagbox/diagbox.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/diagbox/diagbox.dtx b/Master/texmf-dist/source/latex/diagbox/diagbox.dtx
index 6ed57ee220f..e301753950d 100644
--- a/Master/texmf-dist/source/latex/diagbox/diagbox.dtx
+++ b/Master/texmf-dist/source/latex/diagbox/diagbox.dtx
@@ -26,7 +26,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{diagbox}
%<*package>
- [2016/02/24 v2.1 Making table heads with diagonal lines]
+ [2016/12/28 v2.2 Making table heads with diagonal lines]
%</package>
%
%<*driver>
@@ -66,7 +66,7 @@
%</driver>
% \fi
%
-% \CheckSum{634}
+% \CheckSum{612}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -129,7 +129,7 @@
% compatible macros of \pkg{slashbox}, but the result is a little different.
%
% To use \pkg{diagbox}, \eTeX{} is needed. And \pkg{diagbox} requires
-% \pkg{pict2e}, \pkg{keyval} and \pkg{fp} packages.
+% \pkg{pict2e}, \pkg{keyval}, \pkg{calc}, and \pkg{fp} packages.
%
%
% \section{Usage}
@@ -387,8 +387,8 @@
% 作为 \pkg{slashbox} 的代替,\pkg{diagbox} 除了提供自己的新命令,也提供了
% \pkg{slashbox} 原有的两个命令,语法不变,编译结果略有区别。
%
-% \pkg{diagbox} 依赖 \eTeX{} 扩展(这在目前总是可用的),依赖 \pkg{pict2e},
-% \pkg{keyval} 和 \pkg{fp} 宏包。
+% \pkg{diagbox} 依赖 \eTeX{} 扩展(这在目前总是可用的),依赖 \pkg{pict2e}、
+% \pkg{keyval}、\pkg{calc} 和 \pkg{fp} 宏包。
%
% \section{用法说明}
%
@@ -632,9 +632,17 @@
\RequirePackage{pict2e}
% \end{macrocode}
% 计算依赖 \pkg{fp} 宏包。
+% \changes{v2.2}{2016/12/28}{避免 \pkg{fp} 包的 \texttt{nomessages} 选项在使用
+% \pkg{catoptions} 包时冲突}
% \begin{macrocode}
-\PassOptionsToPackage{nomessages}{fp}
\RequirePackage{fp}
+\FPmessagesfalse
+% \end{macrocode}
+% 长度计算 \pkg{calc} 宏包。
+% \changes{v2.2}{2016/12/28}{使用 \pkg{calc} 包计算选项参数,以支持
+% \cs{widthof} 等命令。}
+% \begin{macrocode}
+\RequirePackage{calc}
% \end{macrocode}
% 内部控制 \pkg{array} 宏包。
% \begin{macrocode}
@@ -686,15 +694,15 @@
\PackageWarning{diagbox}%
{You should not set width/innerwidth option more than once.}%
\fi
- \setlength{\diagbox@wd}{\dimexpr#1\relax}}
+ \setlength{\diagbox@wd}{#1}}
% \end{macrocode}
% 斜线盒子的总高度,参数中可使用 "\line" 表示行高。
% \begin{macrocode}
\define@key{diagbox}{height}{%
- \begingroup
- \def\line{\normalbaselineskip}%
- \edef\x{\noexpand\setlength{\diagbox@ht}{\the\dimexpr#1\relax}}%
- \expandafter\endgroup\x}
+ \let\diagbox@save@line\line
+ \def\line{\normalbaselineskip}%
+ \setlength{\diagbox@ht}{#1}%
+ \let\line\diagbox@save@line}
% \end{macrocode}
%
% \changes{v2.1}{2014/08/15}{盒子内容与斜线框距离 \texttt{innerleftsep},
@@ -702,9 +710,9 @@
% 盒子内容与斜线框左右的距离。
% \begin{macrocode}
\define@key{diagbox}{innerleftsep}{%
- \setlength{\diagbox@insepl}{\dimexpr#1\relax}}
+ \setlength{\diagbox@insepl}{#1}}
\define@key{diagbox}{innerrightsep}{%
- \setlength{\diagbox@insepr}{\dimexpr#1\relax}}
+ \setlength{\diagbox@insepr}{#1}}
% \end{macrocode}
%
% \changes{v2.1}{2016/02/24}{盒子内容宽度 \texttt{innerwidth} 命令选项。}
@@ -720,7 +728,7 @@
\PackageWarning{diagbox}%
{You should not set width/innerwidth option more than once.}%
\fi
- \setlength{\diagbox@wd}{\dimexpr#1+\diagbox@insepl+\diagbox@insepr\relax}}
+ \setlength{\diagbox@wd}{#1+\diagbox@insepl+\diagbox@insepr}}
% \end{macrocode}
%
% \changes{v2.1}{2014/08/15}{斜线盒子与表格单元边框距离 \texttt{outerleftsep},
@@ -733,9 +741,9 @@
% \end{align*}
% \begin{macrocode}
\define@key{diagbox}{outerleftsep}{%
- \setlength{\diagbox@outsepl}{\dimexpr#1\relax}}
+ \setlength{\diagbox@outsepl}{#1}}
\define@key{diagbox}{outerrightsep}{%
- \setlength{\diagbox@outsepr}{\dimexpr#1\relax}}
+ \setlength{\diagbox@outsepr}{#1}}
% \end{macrocode}
%
% \changes{v2.1}{2014/08/15}{左右边距 \texttt{leftsep}, \texttt{rightsep} 命令
@@ -748,11 +756,11 @@
% \end{align*}
% \begin{macrocode}
\define@key{diagbox}{leftsep}{%
- \setlength{\diagbox@insepl}{\dimexpr#1\relax}%
- \setlength{\diagbox@outsepl}{-\dimexpr#1\relax}}
+ \setlength{\diagbox@insepl}{#1}%
+ \setlength{\diagbox@outsepl}{-(#1)}}
\define@key{diagbox}{rightsep}{%
- \setlength{\diagbox@insepr}{\dimexpr#1\relax}%
- \setlength{\diagbox@outsepr}{-\dimexpr#1\relax}}
+ \setlength{\diagbox@insepr}{#1}%
+ \setlength{\diagbox@outsepr}{-(#1)}}
% \end{macrocode}
%
% 盒子计算边界时是否忽略左右的空白。"trim=l" 效果等同于 "leftsep=0pt";"trim=r"
@@ -787,7 +795,8 @@
% 斜线宽度与颜色。
% \begin{macrocode}
\define@key{diagbox}{linewidth}{%
- \linethickness{\dimexpr#1\relax}}
+ \setlength{\@tempskipa}{#1}%
+ \linethickness{\@tempskipa}}
\define@key{diagbox}{linecolor}{%
\def\diagbox@setlinecolor{\color{#1}}}
\let\diagbox@setlinecolor\empty
diff --git a/Master/texmf-dist/tex/latex/diagbox/diagbox.sty b/Master/texmf-dist/tex/latex/diagbox/diagbox.sty
index 34cb4ecdd37..caf817c584c 100644
--- a/Master/texmf-dist/tex/latex/diagbox/diagbox.sty
+++ b/Master/texmf-dist/tex/latex/diagbox/diagbox.sty
@@ -20,11 +20,12 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{diagbox}
- [2016/02/24 v2.1 Making table heads with diagonal lines]
+ [2016/12/28 v2.2 Making table heads with diagonal lines]
\RequirePackage{keyval}
\RequirePackage{pict2e}
-\PassOptionsToPackage{nomessages}{fp}
\RequirePackage{fp}
+\FPmessagesfalse
+\RequirePackage{calc}
\RequirePackage{array}
\newbox\diagbox@boxa
\newbox\diagbox@boxb
@@ -48,32 +49,32 @@
\PackageWarning{diagbox}%
{You should not set width/innerwidth option more than once.}%
\fi
- \setlength{\diagbox@wd}{\dimexpr#1\relax}}
+ \setlength{\diagbox@wd}{#1}}
\define@key{diagbox}{height}{%
- \begingroup
- \def\line{\normalbaselineskip}%
- \edef\x{\noexpand\setlength{\diagbox@ht}{\the\dimexpr#1\relax}}%
- \expandafter\endgroup\x}
+ \let\diagbox@save@line\line
+ \def\line{\normalbaselineskip}%
+ \setlength{\diagbox@ht}{#1}%
+ \let\line\diagbox@save@line}
\define@key{diagbox}{innerleftsep}{%
- \setlength{\diagbox@insepl}{\dimexpr#1\relax}}
+ \setlength{\diagbox@insepl}{#1}}
\define@key{diagbox}{innerrightsep}{%
- \setlength{\diagbox@insepr}{\dimexpr#1\relax}}
+ \setlength{\diagbox@insepr}{#1}}
\define@key{diagbox}{innerwidth}{%
\unless\ifdim\diagbox@wd=\z@
\PackageWarning{diagbox}%
{You should not set width/innerwidth option more than once.}%
\fi
- \setlength{\diagbox@wd}{\dimexpr#1+\diagbox@insepl+\diagbox@insepr\relax}}
+ \setlength{\diagbox@wd}{#1+\diagbox@insepl+\diagbox@insepr}}
\define@key{diagbox}{outerleftsep}{%
- \setlength{\diagbox@outsepl}{\dimexpr#1\relax}}
+ \setlength{\diagbox@outsepl}{#1}}
\define@key{diagbox}{outerrightsep}{%
- \setlength{\diagbox@outsepr}{\dimexpr#1\relax}}
+ \setlength{\diagbox@outsepr}{#1}}
\define@key{diagbox}{leftsep}{%
- \setlength{\diagbox@insepl}{\dimexpr#1\relax}%
- \setlength{\diagbox@outsepl}{-\dimexpr#1\relax}}
+ \setlength{\diagbox@insepl}{#1}%
+ \setlength{\diagbox@outsepl}{-(#1)}}
\define@key{diagbox}{rightsep}{%
- \setlength{\diagbox@insepr}{\dimexpr#1\relax}%
- \setlength{\diagbox@outsepr}{-\dimexpr#1\relax}}
+ \setlength{\diagbox@insepr}{#1}%
+ \setlength{\diagbox@outsepr}{-(#1)}}
\define@key{diagbox}{trim}{%
\@tfor\@reserveda:=#1\do{%
\ifcsname diagbox@insep\@reserveda\endcsname
@@ -93,7 +94,8 @@
\let\diagbox@dir@NE\relax
\let\diagbox@dir@NW\relax
\define@key{diagbox}{linewidth}{%
- \linethickness{\dimexpr#1\relax}}
+ \setlength{\@tempskipa}{#1}%
+ \linethickness{\@tempskipa}}
\define@key{diagbox}{linecolor}{%
\def\diagbox@setlinecolor{\color{#1}}}
\let\diagbox@setlinecolor\empty