From dca48e0463c30cae993fc56bc2a7a85c8a5a24e4 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 15 May 2014 23:36:18 +0000 Subject: latex2e via latex-tds git-svn-id: svn://tug.org/texlive/trunk@34051 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/tools/tabularx.dtx | 47 ++++++++++++++++++----- 1 file changed, 38 insertions(+), 9 deletions(-) (limited to 'Master/texmf-dist/source/latex/tools') diff --git a/Master/texmf-dist/source/latex/tools/tabularx.dtx b/Master/texmf-dist/source/latex/tools/tabularx.dtx index 960a8345958..3752a31dd86 100644 --- a/Master/texmf-dist/source/latex/tools/tabularx.dtx +++ b/Master/texmf-dist/source/latex/tools/tabularx.dtx @@ -31,7 +31,7 @@ % \ProvidesFile{tabularx.drv} % \fi % \ProvidesFile{tabularx.dtx} - [2014/04/22 v2.09 `tabularx' package (DPC)] + [2014/05/13 v2.10 `tabularx' package (DPC)] % \iffalse %<*driver> \documentclass{ltxdoc} @@ -66,7 +66,7 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % -% \CheckSum{500} +% \CheckSum{527} % % \GetFileInfo{tabularx.dtx} % \title{The \textsf{tabularx} package\thanks{This file @@ -391,17 +391,40 @@ % % \begin{macro}{\TX@find@endtabularxa} % \changes{v2.09}{2014/04/22}{macro added} +% \changes{v2.10}{2014/05/13}{macro modified to test for missing `\cs{endtabularx}} % split up the end code, and extract the part that lives in the table body. % \begin{macrocode} -\long\def\TX@find@endtabularxa#1\endtabularx#2\TX@find@endtabularxa{% - \toks@\expandafter{\the\toks@#1}} +\long\def\TX@find@endtabularxa + #1\endtabularx#2\endtabularx#3\TX@find@endtabularxa{% + \ifx\TX@#2\else + \toks@\expandafter{\the\toks@#1}% + \fi} % \end{macrocode} % \end{macro} -% \begin{macro}{\TX@find@endtabularxa} +% \begin{macro}{\TX@find@endtabularxb} % \changes{v2.09}{2014/04/22}{macro added} +% \changes{v2.10}{2014/05/13}{macro modified to test for missing \cs{endtabularx}} % split up the end code, and extract the part that lives outside the table body. % \begin{macrocode} -\long\def\TX@find@endtabularxb#1\endtabularx#2\TX@find@endtabularxb{#2} +\long\def\TX@find@endtabularxb + #1\endtabularx#2\endtabularx#3\TX@find@endtabularxb{% + \ifx\TX@#2% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + {#1}{#2}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\TX@find@endtabularxbb} +% \changes{v2.10}{2014/05/13}{macro added} +% Helper to avoid needing 15 consecutive "expandafter" +% \begin{macrocode} +\def\TX@find@endtabularxbb{% + \expandafter\expandafter\expandafter + \TX@find@endtabularxb +} % \end{macrocode} % \end{macro} % @@ -434,9 +457,11 @@ \def\TX@endtabularx{% % \end{macrocode} % \changes{v2.09}{2014/04/22}{call to \cs{TX@find@endtabularxa} added} +% \changes{v2.10}{2014/05/13}{macro modified to test for missing \cs{endtabularx}} % \begin{macrocode} \expandafter\expandafter\expandafter - \TX@find@endtabularxa\csname end\TX@\endcsname\TX@find@endtabularxa + \TX@find@endtabularxa\csname end\TX@\endcsname + \endtabularx\TX@\endtabularx\TX@find@endtabularxa % \end{macrocode} % Define the {\ttfamily X} column, with an internal version of the % "\newcolumntype" command. The "\expandafter" commands enable @@ -529,9 +554,13 @@ \ifnum0=`{\fi}% % \end{macrocode} % \changes{v2.09}{2014/04/22}{call to \cs{TX@find@endtabularxb} added} +% \changes{v2.10}{2014/05/13}{macro modified to test for missing \cs{endtabularx}} % \begin{macrocode} - \expandafter\TX@find@endtabularxb\romannumeral-`X% - \expandafter\end\expandafter{\TX@}\TX@find@endtabularxb} + \expandafter\expandafter\expandafter + \TX@find@endtabularxbb + \expandafter\end\expandafter{\TX@}% + \endtabularx\TX@\endtabularx\TX@find@endtabularxb +} % \end{macrocode} % \end{macro} % -- cgit v1.2.3