2

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

7
\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}
17
  • @Herbert: just out of curiosity, why does your strut need the [raise-height] of -0.125\textheight? Jun 17 '11 at 12:12
  • @Brent: try it without and it should be obviously to you, right?
    – user2478
    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 Jun 17 '11 at 12:24
  • @Herbert: OK, now I see, ausgezeichnet! Jun 17 '11 at 12:31
  • @Herbert: Can you make the table breakable across pages?
    – xport
    Jun 17 '11 at 12:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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