diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/tools/tabularx.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/tools/tabularx.dtx | 73 |
1 files changed, 56 insertions, 17 deletions
diff --git a/Master/texmf-dist/source/latex/tools/tabularx.dtx b/Master/texmf-dist/source/latex/tools/tabularx.dtx index 70272ef32e0..960a8345958 100644 --- a/Master/texmf-dist/source/latex/tools/tabularx.dtx +++ b/Master/texmf-dist/source/latex/tools/tabularx.dtx @@ -1,27 +1,27 @@ % \iffalse meta-comment % % Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 -% 2006 2008 2009 +% 2006 2008 2009 2014 % The LaTeX3 Project and any individual authors listed elsewhere -% in this file. -% +% in this file. +% % This file is part of the Standard LaTeX `Tools Bundle'. % ------------------------------------------------------- -% +% % It may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt -% and version 1.3c or later is part of all distributions of LaTeX +% and version 1.3c or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% +% % The list of all files belonging to the LaTeX `Tools Bundle' is % given in the file `manifest.txt'. -% +% % \fi % \iffalse -%% File: tabularx.dtx Copyright (C) 1991-1999 David Carlisle +%% File: tabularx.dtx Copyright (C) 1991-1999 2012 2014 David Carlisle % %<*dtx> \ProvidesFile{tabularx.dtx} @@ -31,7 +31,7 @@ %<driver> \ProvidesFile{tabularx.drv} % \fi % \ProvidesFile{tabularx.dtx} - [1999/01/07 v2.07 `tabularx' package (DPC)] + [2014/04/22 v2.09 `tabularx' package (DPC)] % \iffalse %<*driver> \documentclass{ltxdoc} @@ -66,7 +66,7 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % -% \CheckSum{456} +% \CheckSum{500} % % \GetFileInfo{tabularx.dtx} % \title{The \textsf{tabularx} package\thanks{This file @@ -249,8 +249,8 @@ % \subsection{If the algorithm fails\ldots} % It may be that the widths of the `normal' columns of the table % already total more than the requested total -% width. \textsf{tabularx} refuses to set the -% \texttt{X} columns to a negative width, so in this case you get a +% width. \textsf{tabularx} refuses to set the +% \texttt{X} columns to a negative width, so in this case you get a % warning ``X Columns too narrow (table too wide)''. % % The \texttt{X} columns will in this case be set to a width of 1em @@ -330,8 +330,10 @@ %\end{verbatim} % The scanner now looks for the end of the current environment ("foo" in % this example.) There are some restrictions on this usage, the -% principal one being that "\endtabularx" is the \emph{first} token of -% the `end code' of the environment. +% principal one being that "\endtabularx" must not be inside any "{ }" pairs +% ao that the code before "\endtabularx" may be extracted and added to the table body +% (prior to version 2.09 "\endtabularx" had to be +% the \emph{first} token of the `end code' of the environment). % \begin{macrocode} \def\tabularx#1{% % \end{macrocode} @@ -387,6 +389,22 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\TX@find@endtabularxa} +% \changes{v2.09}{2014/04/22}{macro added} +% 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}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\TX@find@endtabularxa} +% \changes{v2.09}{2014/04/22}{macro added} +% 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} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\TX@} % The string {\ttfamily tabularx} as a macro for testing with "\ifx". % \begin{macrocode} @@ -415,6 +433,11 @@ % \begin{macrocode} \def\TX@endtabularx{% % \end{macrocode} +% \changes{v2.09}{2014/04/22}{call to \cs{TX@find@endtabularxa} added} +% \begin{macrocode} + \expandafter\expandafter\expandafter + \TX@find@endtabularxa\csname end\TX@\endcsname\TX@find@endtabularxa +% \end{macrocode} % Define the {\ttfamily X} column, with an internal version of the % "\newcolumntype" command. The "\expandafter" commands enable % "\NC@newcol" to get the {\em expansion} of\\ @@ -504,7 +527,11 @@ % the macro "\tabularx". % \begin{macrocode} \ifnum0=`{\fi}% - \expandafter\end\expandafter{\TX@}} +% \end{macrocode} +% \changes{v2.09}{2014/04/22}{call to \cs{TX@find@endtabularxb} added} +% \begin{macrocode} + \expandafter\TX@find@endtabularxb\romannumeral-`X% + \expandafter\end\expandafter{\TX@}\TX@find@endtabularxb} % \end{macrocode} % \end{macro} % @@ -515,6 +542,15 @@ % \begin{macrocode} \def\TX@arith{% \TX@false +% \end{macrocode} +% \changes{v2.08}{2012/02/06}{Avoid exceeding maxdimen during trials} +% \begin{macrocode} + \@tempdimb\maxdimen + \divide\@tempdimb\TX@cols + \ifdim\TX@col@width>\@tempdimb + \TX@typeout@{Don't exceed \maxdimen}% + \wd\@tempboxa\maxdimen + \fi \ifdim\TX@old@table=\wd\@tempboxa % \end{macrocode} % If we have reduced the column width, but the table width has not @@ -556,7 +592,7 @@ % % Prior to v2.03, if the loop was aborted here, the X columns were left % with the width of the previous run, but this may make the table far -% too wide as initial guesses are always too big. Now force to +% too wide as initial guesses are always too big. Now force to % "\TX@error@width" which defaults to be 1em. If you want to % get the old behaviour stick\\ % "\renewcommand\TX@error@width{\TX@col@width}"\\ @@ -702,8 +738,11 @@ % % \begin{macro}{\arraybackslash} % "\\" hack. +% \changes{v2.08}{2012/02/06}{Dont define this if already defined by newer array package and use tabularnewline now this is in 2e.} % \begin{macrocode} -\def\arraybackslash{\let\\\@arraycr} +\ifx\arraybackslash\@undefined +\def\arraybackslash{\let\\\tabularnewline} +\fi % \end{macrocode} % \end{macro} % |