TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to use tabular or some other method to create a table that expands to use the entire available space? So if I created a table with 4 rows, each row would use 25% of the space. Thanks!

share|improve this question
Do you want the table to expand horizontally or vertically as much as possible? (Talking about rows implies vertical growth, which is unusual and makes the question interesting.) – Christian Lindig Apr 9 '11 at 5:46
I was originally interested in having it expand both horizontally and vertically, but I think using tabularx will be a better solution. Still curious about the vertical expansion though. – Shane Fulmer Apr 9 '11 at 5:59
use tabularht and additional p-columns – Herbert Apr 9 '11 at 6:43
up vote 4 down vote accepted

Possible with \usepackage{tabularx}

\begin{tabularx}{\textwidth}{ XXXX }
  label 1 & label 2 & label 3 & label 4 \\
  item 1  & item 2  & item 3  & item 4  \\

I modified the code to add space vertically

  \newcommand\myvspace [2]{  \vrule width0pt height#1 depth#2}
\begin{tabularx}{\textwidth}{ XXXX }
\myvspace{1cm}{1cm} label 1 & label 2 & label 3 & label 4 \\
 this is a long text and I need some place
 & item 2  & item 3  & item 4  \\


enter image description here

share|improve this answer
Is there anything that will also space it out vertically? – Shane Fulmer Apr 9 '11 at 5:45
@Shane : what you need exactly ? For just adapting the height of rows, I use cellspace.sty but something like \setlength\extrarowheight{4pt} is possible, if you want to set the height of each rows, you can use the strut method, or \renewcommand\arraystrech{1.5}. For the entire available space horizontally , I forgot the environment tablularc. Finally, If you are an adept of TikZ like me, you can use TikZ for this kind of things. – Alain Matthes Apr 9 '11 at 6:57

I'm not sure I understood this correctly:

\vbox to\vsize{\everycr={\noalign{\vskip 2pt plus 1\vsize}}
  \halign to\hsize{&#\hfil\tabskip=1em plus 1\hsize\cr
  Sup? & These & are & going & to & space & out \cr
  Likewise & for & the & rows & which & are \cr
  Going & to & space & out & trying & to \cr
  fill & out & the & page \cr

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.