diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-13 23:02:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-13 23:02:03 +0000 |
commit | af6a57780155c9bd961425d0b5c53917ccb1d930 (patch) | |
tree | 11b296978cd4d57d5411c735ef0104496e9667ef /Master | |
parent | 0193f0a029413b152b005c0a6d6e9e4f8439e85f (diff) |
ltablex (12apr13)
git-svn-id: svn://tug.org/texlive/trunk@29903 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/ltablex/README | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/ltablex/ltablex.pdf | bin | 0 -> 230943 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/ltablex/ltablex.tex | 182 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ltablex/ltablex.sty | 231 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/ltablex.tlpsrc | 0 |
8 files changed, 418 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/latex/ltablex/README b/Master/texmf-dist/doc/latex/ltablex/README new file mode 100644 index 00000000000..93d464db56c --- /dev/null +++ b/Master/texmf-dist/doc/latex/ltablex/README @@ -0,0 +1,3 @@ +ltablex: defines a tabularx environment which has the +same syntax as the longtable environment but allows +X colums and pagebreaks.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/ltablex/ltablex.pdf b/Master/texmf-dist/doc/latex/ltablex/ltablex.pdf Binary files differnew file mode 100644 index 00000000000..88f0e53a87c --- /dev/null +++ b/Master/texmf-dist/doc/latex/ltablex/ltablex.pdf diff --git a/Master/texmf-dist/doc/latex/ltablex/ltablex.tex b/Master/texmf-dist/doc/latex/ltablex/ltablex.tex new file mode 100644 index 00000000000..44a44c5eec8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ltablex/ltablex.tex @@ -0,0 +1,182 @@ +\documentclass[DIV=9, parskip=half, pagesize=auto]{scrartcl} + +\usepackage{fixltx2e} +\usepackage{etex} +\usepackage{xspace} +\usepackage{lmodern} +\usepackage[T1]{fontenc} +\usepackage{textcomp} +\usepackage[svgnames]{xcolor} +\usepackage{listings} +\usepackage{microtype} +\usepackage{hyperref} + +\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}} +\newcommand*{\pkg}[1]{\textsf{#1}} +\newcommand*{\cs}[1]{\texttt{\textbackslash#1}} +\makeatletter +\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}} +\makeatother +\newcommand*{\env}[1]{\texttt{#1}} + +\addtokomafont{title}{\rmfamily} + +\lstset{% + language=[LaTeX]TeX,% + columns=flexible,% + upquote=true,% + numbers=left,% + basicstyle=\ttfamily,% + keywordstyle=\color{Navy},% + commentstyle=\color{DimGray},% + stringstyle=\color{SeaGreen},% + numberstyle=\scriptsize\color{SlateGray}% +} + +\title{The \pkg{ltablex} package\thanks{This manual corresponds to \pkg{ltablex}~v1.0, dated~1995/11/06.}} +\author{Anil K. Goel (\mail{akgoel@uwaterloo.ca})} +\date{1995/11/06} + + + +\begin{document} + +\maketitle + +\noindent +The file modifies the \env{tabularx} environment to +combine the features of the \pkg{tabularx} package +(auto-sized columns in a fixed width table) +with those of the \pkg{longtable} package +(multi-page tables). + +The tables are typeset using the \env{tabularx} environment +and the \env{longtable} environment is used internally to +handle multi-page tables. The \cmd{\setlongtables} feature +is used, and, therefore, the document should be +run through \texttt{latex} twice. + +Another feature that has been added is to treat the \texttt{X} +columns like `\texttt{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 +disabled (or enabled) with \cmd{\keepXColumns} (or \cmd{\convertXColumns}). + +Caveats: +% +\begin{itemize} +\item The document needs to be \texttt{latex}ed a couple times in general. +\item In general, it is necessary to remove the \texttt{.aux} file before + the first \texttt{latex} run on the document. +\item The table should not be larger than \TeX's memory capacity +\end{itemize} + +\bigskip + +Here is a a simple usage example: +% +\begin{lstlisting} +\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}% + {% col 1; auto-sized ragged right + |>{\setlength{\hsize}{.5\hsize}\raggedright\arraybackslash}X|% + % col 2; default centered + c|% + % col 3; auto-sized ragged left + >{\setlength{\hsize}{1.5\hsize}\raggedleft\arraybackslash}X|% + % col 4; default left-justified + l|} + +\caption*{The Table Caption}\\ +\hline +F-Head1 & F-Head2 & F-Head3 & F-Head4\\ +\hline +\hline +\endfirsthead +\hline +Head1 & Head2 & Head3 & Head4\\ +\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} +\end{lstlisting} + +\end{document} diff --git a/Master/texmf-dist/tex/latex/ltablex/ltablex.sty b/Master/texmf-dist/tex/latex/ltablex/ltablex.sty new file mode 100644 index 00000000000..0ab32dd38af --- /dev/null +++ b/Master/texmf-dist/tex/latex/ltablex/ltablex.sty @@ -0,0 +1,231 @@ +%% +%% This is file ltablex.sty (v1.0, November 1995) +%% +%% +%% (C) Author: Anil K. Goel (akgoel@uwaterloo.ca) +%% +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN archives +%% in directory macros/latex/base/lppl.txt. +%% +%% 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 +%% (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 +%% 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 +%% disabled (or enabled) with \keepXColumns (or \convertXColumns). +%% +%% Caveats: +%% . The document needs to be latexed a couple times in general. +%% . In general, it is necessary to remove the .aux file before +%% the first latex run on the document. +%% . The table should not be larger than TeX's memory capacity +%% +%% +%% Here is a a simple usage example: +%% +%% +%% \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\\ +%% \hline +%% \hline +%% \endfirsthead +%% \hline +%% Head1 & Head2 & Head3 & Head4\\ +%% \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] + +\RequirePackage{longtable}[1994/12/08] +\RequirePackage{tabularx}[1994/02/03] + +\newif\ifTX@convertX@ +\TX@convertX@true + +\newcommand\keepXColumns{ + \TX@convertX@false +} + +\newcommand\convertXColumns{ + \TX@convertX@true +} + +\renewcommand\TX@endtabularx{% + \expandafter\TX@newcol\expandafter{\tabularxcolumn{\TX@col@width}}% + \let\verb\TX@verb + \def\@elt##1{\global\value{##1}\the\value{##1}\relax}% + \edef\TX@ckpt{\cl@@ckpt}% + \let\@elt\relax + \TX@old@table=\maxdimen + \TX@col@width=\TX@target + \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{\\} + \let\saveendhead\endhead + \def\endhead{\\} + \let\saveendfirsthead\endfirsthead + \def\endfirsthead{\\} + \let\saveendfoot\endfoot + \def\endfoot{\\} + \let\saveendlastfoot\endlastfoot + \def\endlastfoot{\\} + % + % + \ifTX@convertX@ + \TX@trial{\def\NC@rewrite@X{\NC@find l}} + \ifdim\wd\@tempboxa<\TX@target + \TX@newcol{l} + \else + \TX@convertX@false + \fi + \fi + + \ifTX@convertX@ + \relax + \else + \TX@trial{\def\NC@rewrite@X{% + \global\advance\TX@cols\@ne\NC@find p{\TX@col@width}}}% + \loop + \TX@arith + \ifTX@ + \TX@trial{}% + \repeat + \fi + {\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.. + \LTchunksize\maxdimen + % + % restore \endhead, etc. + % + \let\caption\savecaption + \let\endhead\saveendhead + \let\endfirsthead\saveendfirsthead + \let\endfoot\saveendfoot + \let\endlastfoot\saveendlastfoot + % + \expandafter\longtable + \the\toks@ + \endlongtable + }% + \global\TX@ftn\expandafter{\expandafter}\the\TX@ftn + \ifnum0=`{\fi}% + \end{tabularx} +} + + +% +% activate column width reading from the .aux file +% + + +\setlongtables diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 09a90a96a16..4ce1ff8b8f6 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -260,7 +260,7 @@ my @TLP_working = qw( lshort-japanese lshort-korean lshort-mongol lshort-persian lshort-polish lshort-portuguese lshort-russian lshort-slovak lshort-slovenian lshort-spanish lshort-thai lshort-turkish lshort-ukr - lshort-vietnamese lstaddons ltabptch + lshort-vietnamese lstaddons ltablex ltabptch ltxdockit ltxfileinfo ltxindex ltxkeys ltxmisc ltxnew ltxtools lua-alt-getopt lua-check-hyphen lua-visual-debug lua2dox luabibentry luacode diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 7313d50cb7f..d27ac9c15cb 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -583,7 +583,6 @@ chomp ($Build = `cd $Master/../Build/source && pwd`); 'lshort-turkish', '&MAKElshort', 'lshort-vietnamese', '&MAKElshort', 'lshort-zh-cn', "die 'skipping, use lshort-chinese'", - 'ltablex', "die 'skipping, unknown license'", 'ltnews', "die 'skipping, nonfree doc'", 'ltt', "&MAKEltt", 'ltxkeys', "&MAKEflatten", diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index 66ef763ffca..0a4ffae68b2 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -440,6 +440,7 @@ depend longnamefilelist depend loops depend lsc depend lstaddons +depend ltablex depend ltabptch depend ltxdockit depend ltxindex diff --git a/Master/tlpkg/tlpsrc/ltablex.tlpsrc b/Master/tlpkg/tlpsrc/ltablex.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/ltablex.tlpsrc |