0

Hi I want to vertically align my cells in a longtable. I also use \shortstack[l]. Don't know whether this has an effect. The Table looks like

\begin{landscape} 
\begin{longtable}{|l|l|l|l|l|l|}
\caption{A captuion \label{tab:atable}}\\
\shortstack[l]{\\A\\ B} & \shortstack[l]{\\C\\ D\\ E\\ F\\ G\\ H\\ I\\ J\\ K\\ L} & \shortstack[l]{M\\ N} & \shortstack[l]{\\O} & \shortstack[l]{\\P} & \shortstack[l]{\\Q}\\
\hline
\end{longtable}
\end{landscape}

I tried so may things, but the lext is still aligned at the bottom, not vertically.

Thanks!

ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
rch
  • 161
  • 2
    Welcome to Tex.SE. You will get your answer here, http://tex.stackexchange.com/questions/46386/vertically-center-cells-of-a-table. – Masroor Sep 19 '13 at 13:39
  • Thank, basically it works. But how can I fit the column width on the text length? – rch Sep 19 '13 at 14:48
  • Your question is somewhat unclear, do you mean column of particular width? Or column width to some text size? Please try m{width} specifier. If that was not what you were looking for, please see Table 1 in array package documentation. I am sure you will find that fulfills your need. – Masroor Sep 19 '13 at 14:57
  • The column should fit the text size. m{\textwidth} does not work for the new command. – rch Sep 19 '13 at 15:17
  • Perhaps simple [c] option is the one you are looking for. And \textwidth means width of text in page, that is not applicable in this case. – Masroor Sep 19 '13 at 15:34

0 Answers0