Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
\documentclass{report}
\usepackage{lipsum}
\begin{document}
\begin{tabular}{cp{4cm}}
\hline
\shortstack{A\\B\\C\\D} & \lipsum[1] \\
\hline
\end{tabular}
\end{document}

Results in :

------------------------------------
A
B
C
D    Lorem ipsum dolor sit amet,
     consectetuer adipiscing elit.
     Ut purus elit, vestibulum
     ut, placerat ac, adipiscing
     vitae, felis. Curabitur
     dictum gravida mauris. Nam
------------------------------------

While I'd like to achieve:

------------------------------------
A    Lorem ipsum dolor sit amet,
B    consectetuer adipiscing elit.
C    Ut purus elit, vestibulum
D    ut, placerat ac, adipiscing
     vitae, felis. Curabitur
     dictum gravida mauris. Nam
------------------------------------

How to do this using \shortstack ?

P.S. I've found solution using \matrix \ShortStack Align - I am curious if it's possible to do with \shortstack ?

share|improve this question
add comment

2 Answers

The important thing is to trim off the depth of the "substack"

\documentclass{report}
\usepackage{amsmath} % for \smash[b]{...}
\usepackage{lipsum}

\newcommand{\blap}[1]{\smash[b]{\begin{tabular}[t]{@{}c@{}}#1\end{tabular}}}

\begin{document}

\begin{tabular}{cp{4cm}}
\hline
\blap{A\\B\\C\\D}
& \lipsum[1] \\
\hline
\end{tabular}

\end{document}

In the following picture, on the left is what results from my code, on the right with the other proposed one

enter image description here

\documentclass{article}

\usepackage{amsmath}

\newcommand{\blap}[1]{%
  \smash[b]{\begin{tabular}[t]{@{}c@{}}#1\end{tabular}}}

\begin{document}

\begin{tabular}{cp{4cm}}
\hline
\blap{A\\B\\C\\D}
&
some text to fill four lines
some text to fill four lines
some text to fill four lines
some text to fill four lines
some text to fill four lines
\\
\hline
\end{tabular}\qquad
\begin{tabular}{cp{4cm}}
\hline
\vbox to 0pt{\hbox{
\shortstack{A\\B\\C\\D}
}\vss}
&
some text to fill four lines
some text to fill four lines
some text to fill four lines
some text to fill four lines
some text to fill four lines
\\
\hline
\end{tabular}

\end{document}
share|improve this answer
add comment

I've found solution here : http://tex.stackexchange.com/a/23848/7128 ,

so I'd like to share.

I adopted macro:

\newcommand{\blap}[1]{\vbox to 0pt{\hbox{#1}\vss}}

Here is complete working example:

\documentclass{report}
\usepackage{lipsum}
\begin{document}
\begin{tabular}{cp{4cm}}
\hline
\vbox to 0pt{\hbox{
\shortstack{A\\B\\C\\D} 
}\vss}
& \lipsum[1] \\
\hline
\end{tabular}
\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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