[Tugindia] three questions on tables

David Kastrup dak at gnu.org
Thu Feb 20 10:30:09 CET 2003


Sandip P Deshmukh <deshmukh at escortsmumbai.com> writes:

> i have two small questions on tables. i have done info latex and could
> not find an answer.
> 
> firstly, how do i make a table go beyond a page? my work often demands
> me to make tables longer than a page. i have googled but could not find
> a solution.

Then you have not googled very well.  The standard package
"longtable" provides this functionality.

> secondly, i have never been able to use multicolumn. i have used
> following syntax:
> \begin{tabular}{ll}
> \multicolumn{2}{l}{some text here}&\\
> \multicolumn{2}{l}{some text here}\\
> \end{tabular}
> 
> none of these work.

What do you mean with "none of these work"?  What do you expect them
to do?  The first, of course, will cause problems since you start
with a multicolumn over 2 columns, then require _another_,
none-existing third column.  The second one should work just fine as
documented.  So what do you think it should do instead?

> what is the correct format for multicolumn?

If you have "info latex" available (which only documents core LaTeX),
at least _that_ information should have been apparent.

> lastly, when i use p type columns, can i not determine the alignment?
> for instance:
> 
> \begin{tabular}{p{2in}p{4in}}
> some text&Some text\\
> \end{tabular}
> 
> can i not get some text to be left aligned and Some text to be center
> aligned?

You can, by using the standard package array.sty as outlined in its
documentation.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
UKTUG FAQ: <URL:http://www.tex.ac.uk/cgi-bin/texfaq2html>


More information about the Tugindia mailing list