[Mac OS X TeX] Re: [X-TeX] Tables in LaTeX?
Neal Parikh
npparikh at earthlink.net
Tue Oct 16 21:11:50 EDT 2001
<x-flowed>Thanks, that did *exactly* what I needed. Few questions:
(1) What does \label{labelname} do? I assume that this is a more
general TeX-ism and not something specific to tables, but I'm not sure
quite what it is and how to use it. I know it's optional, but if it's
useful I might want to take advantage of it. ;-)
(2) The argument where one says something like {|ccccccc|} or the
like -- is there any way of specifying the number of columns any other
way? If one had a 50 column table (for example), would one actually be
expected to write out "|c|" 50 times? My tables are usually small
enough that it generally does not matter, but I was curious anyway.
(3) I ran up against the same wall -- using tabularx with anything other
than "X" doesn't seem to work right. Strange...does anyone else have
any suggestions?
I have some other questions, but I'll put that in a separate email. =)
thanks again,
neal
On Tuesday, October 16, 2001, at 07:43 PM, Fredrik Wallenberg wrote:
> On Tuesday, October 16, 2001, at 04:05 PM, Neal Parikh wrote:
>
>> -----------------------------
>> | TITLE |
>> -----------------------------
>> | x | y | z | x | y | z | x |
>> -----------------------------
>> | x | y | z | x | y | z | x |
>> -----------------------------
>> | x | y | z | x | y | z | x |
>> -----------------------------
>>
>> Can anyone help me out with a few examples? Having a little trouble
>> getting the hand of the position and width specifications.
>>
>
> There are two general approaches, using either tabular or tabularx.
> tabular will make the table as small as possible while tabularx takes a
> width parameter.
>
>
> \begin{table}[h] % [h] for here
> \caption{Your Caption}\label{RefThisTable}
> \footnotesize
> \begin{center}
> \begin{tabular}{|c|c|c|c|c|c|c|} \hline
> % alignment can be l,r or c
> % no partition indicator = space
> \multicolumn{7}{|c|}{TITLE} \\ \hline
> x & y & z & x & y & z & x \\ \hline
> x & y & z & x & y & z & x \\ \hline
> x & y & z & x & y & z & x \\ \hline
> \end{tabular}
> \end{center}
> \end{table}
>
>
>
> \usepackage{tabularx} % required in the preamble
> \begin{table}[h] % [h] for here
> \caption{Your Caption}\label{RefThisTable}
> \footnotesize
> \begin{center}
> \begin{tabularx}{4in}{|XXXXXXX|} \hline
> % alignment can be l,r, c OR X (left alignment w. fill)
> % no partition indicator = space
> \multicolumn{7}{|c|}{TITLE} \\ \hline
> x & y & z & x & y & z & x \\ \hline
> x & y & z & x & y & z & x \\ \hline
> x & y & z & x & y & z & x \\ \hline
> \end{tabularx}
> \end{center}
> \end{table}
>
> I have not figured out how to use tabularx and centered or right
> justified columns.
>
> Fredrik
--
You are not your signature.
-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>
More information about the MacOSX-TeX
mailing list