Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Several years ago I succeeded to create a table below. But now I forgot. Maybe I used a \rule with zero width. Is there another smart method to accomplish this mission? I used longtable to make the table automatically span across pages, but any kind of table is welcome.

Requirements:

  • 3 columns.
  • 4 equally-spaced rows occupying \textheight.
  • support displayed math contents such as \[ or \equation.
  • the table spans across pages automatically.

as follows:

enter image description here

share|improve this question

1 Answer 1

up vote 6 down vote accepted
\documentclass[draft]{article} 
\usepackage{tabularx}
\renewcommand\tabularxcolumn[1]{m{#1}}
\def\xstrut{\rule[-0.125\textheight]{0pt}{\dimexpr0.25\textheight-0.5pt}}
\begin{document} 

\noindent
\begin{tabularx}{\linewidth}{|>{\xstrut}l|X|X|}\hline
1 & \[ \int_1^\infty \frac1x \mathrm{d}x \] & 2 \\\hline
2 & \[ \int_1^\infty \frac1x \mathrm{d}x \] & 2 \\\hline
3 & \[ \int_1^\infty \frac1x \mathrm{d}x \] & 2 \\\hline
4 & \[ \int_1^\infty \frac1x \mathrm{d}x \] & 2 \\\hline
\end{tabularx}

\end{document}
share|improve this answer
    
@Herbert: just out of curiosity, why does your strut need the [raise-height] of -0.125\textheight? –  Brent.Longborough Jun 17 '11 at 12:12
    
@Brent: try it without and it should be obviously to you, right? –  Herbert Jun 17 '11 at 12:14
    
@Herbert: I stand justly rebuked for my laziness... I'm on the road, and only have an old out-of-date TexLive –  Brent.Longborough Jun 17 '11 at 12:24
    
@Herbert: OK, now I see, ausgezeichnet! –  Brent.Longborough Jun 17 '11 at 12:31
    
@Herbert: Can you make the table breakable across pages? –  xport Jun 17 '11 at 12:36

Your Answer

 
discard

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.