In tabularx, when the X-column wraps on more than one line, l/r/c-columns remains top aligned: MWE:

 1 & qwer asdf zxcv qwer asdf zxcv qwer asdf zxcv & 1 \\
 2 & qwer asdf zxcv & 2 

If we redefine the X-column the result is near what I wanted but not at all:

 1 & qwer asdf zxcv qwer asdf zxcv qwer asdf zxcv & 1 \\
 2 & qwer asdf zxcv & 2 

Why redefining \tabularxcolumn to put a paragraph on bottom (or middle) changes to bottom all columns but X-column?

This is not exactly what I want. The first column must be top aligned and the third must be bottom aligned. Like this:

 1 & qwer asdf zxcv qwer & \\
   & asdf zxcv qwer asdf & \\
   & zxcv & 1 \\
 2 & qwer asdf zxcv & 2 

Would be even better if the space that X-column lefts on all other columns (in this case two lines on bottom of first column and two lines on top of third column) may be filled, e.g. with a central dot or whatever.

  • With b you change the X column to be bottom-aligned which it is. The vertical alignment of the c and r column aren’t changed at all (they are only one line anyway). Or in other words: There is only one baseline. Apr 28, 2013 at 16:22
  • My question was not clear... What I want is to change the vertical alignment of the c, r and l columns when the X column is longer than one line. Now I understand what I asked about the behaviour of \tabularxcolumn, but this does not solves my problem... I want the text of the first column be written on the first line when the X-column wraps, and the text of the third column aligned to the last line, like the last code, but automatically wrapped instead of doing it manually. Apr 28, 2013 at 19:38

1 Answer 1


enter image description here

This takes two runs of latex to measure things


\gdef\noexpand#1{\the\pdflastypos sp }}}

\def\xstart#1{\expandafter\savepos\csname save@start@#1\endcsname}

\def\xend#1{\expandafter\savepos\csname save@end@#1\endcsname}

\expandafter\ifx\csname save@start@#1\endcsname\relax
\dimen@\csname save@start@#1\endcsname\relax
\ifdim\dimen@>\csname save@end@#1\endcsname




 \xleft{a}{1} & \xstart{a}qwer asdf zxcv qwer 
    asdf zxcv qwer asdf
    zxcv\xend{a} & \xright{a}{1} \\
 \xleft{b}{2} & \xstart{b}qwer asdf zxcv\xend{b} & \xright{b}{2} 

  • What I wanted. Thanks for your useful code! \hfill inside \hbox -like inside other dynamic boxes- has no effect. I do have \hfill inside some cells within a column. I must rewrite that in other way or add one extra column to isolate these two components of some cells that appears one on the left and one on the right on the same cell. May 2, 2013 at 0:15
  • Now I want to use again this solution but I have two issues, which are in essence the same: the use of \hbox. The \cdot is drawn horizontally aligned to the first character on previous/next line, so it is now centered even on 'c' column (the first column). Changing "1" or "2" to something longer on first and third columns magnifies this effect... And, \hfill inside \hbox expands to nothing, I would like to have something like a \hfill b on one cell on the third column, and would be better if the \cdot appears centered (on both first and third column). What to do? Feb 20, 2016 at 7:59
  • @EmilioLazo the site doesn't really work well if you ask a new question 2 years later, in comments. Ask a new question (you can reference this one) Feb 20, 2016 at 10:42
  • done. Is at <tex.stackexchange.com/questions/295003/…> Nobody answered yet. Feb 23, 2016 at 17: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.