Discussion:
Fixed width and height of table cells
Лохтин Константин Сергеевич
2007-05-04 08:16:07 UTC
Permalink
Greetings.

1. Is it possible to create a table in LaTeX with FIXED width of the tabular and with the FIXED width of its columns?
I have read the FAQ and tried using tabularx and tabulary packages, but did not succeed. These packages are "too clever" to make table with the width fixed, and even though I use the form
\begin{tabulary}{\textwidth}{|R|L|C|C|L|C|}
For example, the table sometimes is too narrow and sometimes too wide, depending on contents of the cells.
So, the question is: How to create a fixed width table with different fixed width columns?

2. Is it possible to create a table with fixed height of the rows?
For example make all (full and empty) rows' height 2cm. Or make them 2cm and more (if the content of the cell does not fit)? This feature may be extremely useful for preparing some forms and hand-writing them after printing.

Both tasks are piece of cake in MS Word and I suppose there are ways to create such tables in LaTeX as well.


Sincerely,
Konstantin S. Lokhtin
mailto:***@irkutsk.bnk.ru, ICQ: 233336237
Herbert Voss
2007-05-04 09:49:15 UTC
Permalink
Post by Лохтин Константин Сергеевич
1. Is it possible to create a table in LaTeX with FIXED width of the tabular and with the FIXED width of its columns?
I have read the FAQ and tried using tabularx and tabulary packages, but did not succeed. These packages are "too clever" to make table with the width fixed, and even though I use the form
\begin{tabulary}{\textwidth}{|R|L|C|C|L|C|}
For example, the table sometimes is too narrow and sometimes too wide, depending on contents of the cells.
So, the question is: How to create a fixed width table with different fixed width columns?
2. Is it possible to create a table with fixed height of the rows?
For example make all (full and empty) rows' height 2cm. Or make them 2cm and more (if the content of the cell does not fit)? This feature may be extremely useful for preparing some forms and hand-writing them after printing.
try package tabulary

Hebrert
Susan Dittmar
2007-05-04 10:20:34 UTC
Permalink
Post by Лохтин Константин Сергеевич
Greetings.
1. Is it possible to create a table in LaTeX with FIXED width of the tabular and with the FIXED width of its columns?
How about using p{ <length> } columns?

Susan
Uwe Lueck
2007-05-04 12:25:08 UTC
Permalink
Post by Susan Dittmar
Post by Лохтин Константин Сергеевич
1. Is it possible to create a table in LaTeX with FIXED width of the tabular and with the FIXED width of its columns?
How about using p{ <length> } columns?
Just this (without something additional) would require that
table width depends on the widths of the single columns.
Moreover, it would disable features of l, c, r columns.
Rather, use tabular* or tabularx for fixed table width,
together with the array package to define

\newcolumntype{C}{>{\centering\arraybackslash}p{2cm}}

or so -- I am steeling this advice from Martin Heller, March 8 this year.

HTH -- Uwe.
Uwe Lück
2007-05-04 21:08:44 UTC
Permalink
Sorry, I shouldn't have recommended tabularx, since the width of
an X columnprobably is not "fixed" in the sense as desired. -- Uwe.
Post by Лохтин Константин Сергеевич
Post by Susan Dittmar
Post by Лохтин Константин Сергеевич
1. Is it possible to create a table in LaTeX with FIXED width of the
tabular and with the FIXED width of its columns?
Post by Susan Dittmar
How about using p{ <length> } columns?
Just this (without something additional) would require that
table width depends on the widths of the single columns.
Moreover, it would disable features of l, c, r columns.
Rather, use tabular* or tabularx for fixed table width,
together with the array package to define
\newcolumntype{C}{>{\centering\arraybackslash}p{2cm}}
or so -- I am steeling this advice from Martin Heller, March 8 this year.
HTH -- Uwe.
_______________________________________________
TeX FAQ: http://www.tex.ac.uk/faq
Mailing list archives: http://tug.org/pipermail/texhax/
More links: http://tug.org/begin.html
Automated subscription management: http://tug.org/mailman/listinfo/texhax
Donald Arseneau
2007-05-04 12:59:29 UTC
Permalink
Post by Лохтин Константин Сергеевич
1. Is it possible to create a table in LaTeX with FIXED width of the tabular
\begin{tabular*}{3.14159in}{\extracolsep{\fill}...
Post by Лохтин Константин Сергеевич
and with the FIXED width of its columns?
... p{2.71828cm}

To make a "c" column with fixed width, use the array package and
Post by Лохтин Константин Сергеевич
{\centering}p{1.414in}
2. Is it possible to create a table with fixed height of the rows?
Set \arraystretch I guess.
--
Donald Arseneau ***@triumf.ca
_______________________________________________
TeX FAQ: http://www.tex.ac.uk/faq
Mailing list archives: http://tug.org/pipermail/texhax/
More links: http://tug.org/begin.html

Automated subscription management: http://tug.org/mailman/listinfo/texhax
Human mailing list managers: postmast
Continue reading on narkive:
Loading...