diff options
author | Karl Berry <karl@freefriends.org> | 2014-08-13 22:19:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-08-13 22:19:33 +0000 |
commit | 9c31f43ae2d85dffa7fdb31029116ce7d481dbe0 (patch) | |
tree | dae3975177cf153878f5d90fe5f1346c9d7f65e0 /Master/texmf-dist | |
parent | b6f4456c749a031c238b8ba44c12e9c5e0b4df68 (diff) |
ltablex (13aug14)
git-svn-id: svn://tug.org/texlive/trunk@34923 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/tex/latex/ltablex/ltablex.sty | 77 |
1 files changed, 42 insertions, 35 deletions
diff --git a/Master/texmf-dist/tex/latex/ltablex/ltablex.sty b/Master/texmf-dist/tex/latex/ltablex/ltablex.sty index 0ab32dd38af..c514550499f 100644 --- a/Master/texmf-dist/tex/latex/ltablex/ltablex.sty +++ b/Master/texmf-dist/tex/latex/ltablex/ltablex.sty @@ -1,5 +1,8 @@ %% -%% This is file ltablex.sty (v1.0, November 1995) +%% This is file ltablex.sty (v1.1, August 2014) +%% +%% Patches to solves the caption issue: +%% Rolf Niepraschk (Rolf.Niepraschk@gmx.de), 2014/08/13 %% %% %% (C) Author: Anil K. Goel (akgoel@uwaterloo.ca) @@ -10,22 +13,22 @@ %% %% The file modifies the tabularx environment to %% combine the features of the tabularx package -%% (auto-sized columns in a fixed width table) -%% with those of the longtable package +%% (auto-sized columns in a fixed width table) +%% with those of the longtable package %% (multi-page tables). -%% +%% %% The tables are typeset using the tabularx environment %% and the longtable environment is used internally to %% handle multi-page tables. The \setlongtables feature %% is used, and, therefore, the document should be %% run through latex twice. -%% -%% Another feature that has been added is to treat the X +%% +%% Another feature that has been added is to treat the X %% columns like 'l' columns if the table contents would allow %% that to happen without exceeding the specified width of -%% the table. In other words, the specified width is -%% treated as the maximum allowed and not the exact width -%% of the table. This feature is the default but can be +%% the table. In other words, the specified width is +%% treated as the maximum allowed and not the exact width +%% of the table. This feature is the default but can be %% disabled (or enabled) with \keepXColumns (or \convertXColumns). %% %% Caveats: @@ -39,25 +42,25 @@ %% %% %% \documentclass{article} -%% +%% %% \usepackage{ltablex} -%% +%% %% \textheight=4in -%% +%% %% \begin{document} -%% +%% %% % we want a table that is \textwidth long, has 4 columns, columns 1 %% % and 3 are auto sized with the 3rd columns being 3 times wider than %% % the first column. %% % -%% -%% +%% +%% %% \begin{tabularx}{\linewidth}% %% {|>{\setlength{\hsize}{.5\hsize}\raggedright\arraybackslash}X| % col 1; auto-sized ragged right %% c| % col 2; default centered %% >{\setlength{\hsize}{1.5\hsize}\raggedleft\arraybackslash}X|% col 3; auto-sized ragged left %% l|} % col 4; default left-justified -%% +%% %% \caption*{The Table Caption}\\ %% \hline %% F-Head1 & F-Head2 & F-Head3 & F-Head4\\ @@ -69,73 +72,73 @@ %% \hline %% \hline %% \endhead -%% +%% %% \hline %% \hline %% Foot1 & Foot2 & Foot3 & Foot4\\ %% \hline %% \endfoot -%% -%% +%% +%% %% \hline %% \hline %% L-Foot1 & L-Foot2 & L-Foot3 & L-Foot4\\ %% \hline %% \endlastfoot -%% +%% %% This is a very long sentence not likely to fit& %% not too long& %% This is another very long sentence not likely to fit& %% not long\\ -%% +%% %% \hline %% filler & filler & filler & filler\\ -%% +%% %% \hline %% This is a very long sentence not likely to fit& %% not too long& %% This is another very long sentence not likely to fit& %% not long\\ -%% +%% %% \hline %% This is a very long sentence not likely to fit& %% not too long& %% This is another very long sentence not likely to fit& %% not long\\ -%% +%% %% \hline %% This is a very long sentence not likely to fit& %% not too long& %% This is another very long sentence not likely to fit& %% not long\\ -%% +%% %% \end{tabularx} -%% +%% %% \begin{tabularx}{\linewidth}{|c|X|c|} %% \hline %% a &convert X to l & b\\ %% \hline %% \end{tabularx} -%% +%% %% \keepXColumns %% \begin{tabularx}{\linewidth}{|c|X|c|} %% \hline %% a &retain X & b\\ %% \hline %% \end{tabularx} -%% +%% %% \convertXColumns %% \begin{tabularx}{\linewidth}{|c|X|c|} %% \hline %% a &convert X to l & b\\ %% \hline %% \end{tabularx} -%% -%% +%% +%% %% \end{document} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ltablex}[1995/11/06 v1.0 Modified tabularx] +\ProvidesPackage{ltablex}[2014/08/13 v1.1 Modified tabularx]% RN, 2014/08/13 \RequirePackage{longtable}[1994/12/08] \RequirePackage{tabularx}[1994/02/03] @@ -151,6 +154,8 @@ \TX@convertX@true } +\newcommand*\TX@cap@gobble[2][]{\\}% RN, 2014/08/13 + \renewcommand\TX@endtabularx{% \expandafter\TX@newcol\expandafter{\tabularxcolumn{\TX@col@width}}% \let\verb\TX@verb @@ -162,13 +167,15 @@ \global\TX@cols=\@ne \TX@typeout@ {\@spaces Table Width\@spaces Column Width\@spaces X Columns}% - + % % define \endhead, etc. to be \\ so that in this part % of the process they are just rows % \let\savecaption\caption - \def\caption{\\} + \def\caption{% RN, 2014/08/13 + \@ifstar\TX@cap@gobble\TX@cap@gobble + } \let\saveendhead\endhead \def\endhead{\\} \let\saveendfirsthead\endfirsthead @@ -202,9 +209,9 @@ {\let\@footnotetext\TX@ftntext\let\@xfootnotenext\TX@xftntext % we may as well set \LTchunksize to be \maxdimen as the whole % thing is already in memory anyway so we may as well do it in one - % chunk. if it is too big for one chunk we are already dead.. + % chunk. if it is too big for one chunk we are already dead.. \LTchunksize\maxdimen - % + % % restore \endhead, etc. % \let\caption\savecaption |