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.
Asked
Active
Viewed 2,243 times
4
lockstep
- 250,273
Niels Møller
- 367
-
Welcome to TeX.SE. – Peter Grill Sep 21 '12 at 05: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
1 Answers
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}

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}
Gonzalo Medina
- 505,128
-
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