4

I want LaTeX to place the text of some of the cells in my table (using tabularx) at the bottom of the cell. Right now all the text I write in the cells will be positioned at the top of each cell. Can I define it individually for each cell - the same goes for positioning the text of the cell in the middle of the row (but not centered in the column). I really hope my question is understandable.

  • Welcome to TeX.SE. – Peter Grill Sep 21 '12 at 5:23
  • Welcome to TeX.sx! Please take a look at Problem with Table Vertical Alignment as the answers there might help you. If they do, please consider closing this question as a duplicate just to keep the place tidy and to help people find the answers quickly. If they don't, please edit your question here to explain why so that people can better focus their attention to help you. – henrique Sep 21 '12 at 13:45
3

By default, X columns are translated to p{...} columns; if you want to change this, you can redefine \tabularxcolumn to use, for example, b{...} columns:

\documentclass{article}
\usepackage{tabularx}
\usepackage{lipsum}

\renewcommand\tabularxcolumn[1]{b{#1}}

\begin{document}

\noindent\begin{tabularx}{\linewidth}{XXX}
text & \lipsum*[2] & text
\end{tabularx}

\end{document}

enter image description here

Using the multirow package one can control alignment for individual cells:

\documentclass{article}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{lipsum}

\renewcommand\tabularxcolumn[1]{b{#1}}

\begin{document}

\noindent\begin{tabularx}{\linewidth}{XXX}
text & \lipsum*[2] & \multirow{-25}{*}{text}
\end{tabularx}

\end{document}

enter image description here

  • Beautiful! But what if, let's say, I want the "text" in the 3rd column to be centered in the middle of the row (not the column), and still keep the "text" in 1st column at the bottom? – Niels Møller Sep 20 '12 at 20:10
  • @NielsMøller I updated my answer, but I am afraid that perhaps using another package might be better here (see Sveinung answer). – Gonzalo Medina Sep 20 '12 at 20:27

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.