[OS X TeX] Using long tables with a multiple column environment

António Pires pires at uma.pt
Fri Apr 30 04:41:06 EDT 2004


On 29 de abr de 2004, at 23:18, James Swan wrote:

>
> Does anyone have experience generating tables that extend beyond one 
> page and wrapping those tables into another text column on the same 
> page.  I've been able to get the supertabular environment to work with 
> \twocolumn but not with multicols.  Longtable is in operable with 
> either.
>
> What I would like to do is use a perl script to make a long set of 
> data suitable for wrapping this way in latex.  This data requires that 
> there be three numbers on each line the left one right justified, the 
> center one centered and the right one left justified.  It would be 
> best I suppose to do this without a table at all, but i don't think 
> that's possible.
>
> Any help would be greatly appreciated.
>
> Regards,
>
> Jim Swan
>
I'm not sure if this helps, but the longtable package works with 
multicolumns. Here is an example using teh Longtable package for a 
multicolumn table that extends for two pages (don't mind the language, 
it's written mainly in portuguese - hope this helps):

% This document is intended to be used with LaTeX2e

\documentclass[12pt]{article}
\usepackage{longtable}

\newcommand{\oup}{\textsuperscript{\underline{o}}}
		

\begin{document}
\noindent

\begin{center}
     \fbox{\parbox[]{13cm}{{\large Example of a table that can extend 
beyond one page, with multicolumn
     support, using the \texttt{longtable} package.}}}
\end{center}

\vspace{1cm}
Apresenta-se, a seguir, a tabela com os valores cr\'{\i}ticos
estabelecidos pelo crit\'{e}rio de Thompson, para a rejei\c{c}\~{a}o de 
pontos
duvidosos. Os valores tabelados s\~{a}o unicamente para as
probabilidades de \( 5 \% \), \( 2,5 \% \) e \( 1 \% \), e v\~{a}o 
at\'{e}
um m\'{a}ximo de \( 100 \) observa\c{c}\~{o}es.

\setlongtables
\begin{longtable}{|c|ccc|}
	\caption[Crit\'{e}rio de Thompson]{Valores cr\'{\i}ticos (T) do 
crit\'{e}rio
	de Thompson para a rejei\c{c}\~{a}o de pontos duvidosos.}
	\\ \hline
	N\oup \ de Obs. & \multicolumn{3}{c|}{Probabilidade --- P} \\
	\textbf{n} & \textbf{0,05} & \textbf{0,025} & \textbf{0,01}  \\
	\hline
	\endfirsthead
	\hline
	\multicolumn{4}{|l|}{\small \slshape (\ldots Cont.)}\\
	\hline N\oup \ de Obs. & \multicolumn{3}{c|}{Probabilidade --- P} \\
	\textbf{n} & \textbf{0,05} & \textbf{0,025} & \textbf{0,01}  \\
	\hline
	\endhead
	\hline \multicolumn{4}{|r|}{\small \slshape (Cont.\ldots)} \\ \hline
	\endfoot
	\hline
	\endlastfoot
		
		3 & 1,15 & 1,15 & 1,15  \\
		4 & 1,46 & 1,48 & 1,49  \\
		5 & 1,67 & 1,71 & 1,75  \\
		6 & 1,82 & 1,89 & 1,94  \\
		7 & 1,94 & 2,02 & 2,10  \\
		8 & 2,03 & 2,13 & 2,22  \\
		9 & 2,11 & 2,21 & 2,32  \\
		10 & 2,18 & 2,29 & 2,41  \\
		11 & 2,23 & 2,36 & 2,48  \\
		12 & 2,29 & 2,41 & 2,55  \\
		13 & 2,33 & 2,46 & 2,61  \\
		14 & 2,37 & 2,51 & 2,66  \\
		15 & 2,41 & 2,55 & 2,71  \\
		16 & 2,44 & 2,59 & 2,75  \\
		17 & 2,47 & 2,62 & 2,79  \\
		18 & 2,50 & 2,65 & 2,82  \\
		19 & 2,53 & 2,68 & 2,85  \\
		20 & 2,56 & 2,71 & 2,88  \\
		21 & 2,58 & 2,73 & 2,91  \\
		22 & 2,60 & 2,76 & 2,94  \\
		23 & 2,62 & 2,78 & 2,96  \\
		24 & 2,64 & 2,80 & 2,99  \\
		25 & 2,66 & 2,82 & 3,01  \\
		30 & 2,75 & 2,91 &    \\
		35 & 2,82 & 2,98 &    \\
		40 & 2,87 & 3,04 &    \\
		45 & 2,92 & 3,09 &    \\
		50 & 2,96 & 3,13 &    \\
		60 & 3,03 & 3,20 &    \\
		70 & 3,09 & 3,26 &    \\
		80 & 3,14 & 3,31 &    \\
		90 & 3,18 & 3,35 &    \\
		100 & 3,21 & 3,38 &    \\
\end{longtable}	\label{tab:thompson}

\end{document}

-----------------------------------------------------
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.





More information about the MacOSX-TeX mailing list