I'm trying to create a table, where the first column consist of merged cells with a stacked text, like in the picture. I could only find examples of how to rotate the text, not stack it. Is there a way to do this?
Asked
Active
Viewed 87 times
1 Answers
1
You could just put the text in a tabular in a multirow cell.
\documentclass{article}
\usepackage{multirow}
\begin{document}
\renewcommand{\arraystretch}{1.1}
\begin{tabular}{|cp{3cm}p{3cm}|}
\hline
\multirow{3}{*}{\begingroup\renewcommand{\arraystretch}{1.1}%
\begin{tabular}{@{}c@{}}%
L\\ A\\ T\\ E\\ R\\ A\\ L\\
\end{tabular}\endgroup
} & text & text\\[1.8em]
\cline{2-3}
& text & text\\[1.8em]
\cline{2-3}
& text & text\\[1.8em]
\hline
\end{tabular}
\end{document}
In order to simplify matters you may use one of the answers of this question to avoid having to type all the \\ on your own.
\documentclass{article}
\usepackage{multirow}
\def\endpft{\empty}%
\def\rst{}
\def\pft#1#2\endpft{\ifx#2\endpft%
\else%
#1\\%
\def\rst{#2}%
\pft#2\endpft%
\fi}
\newcommand{\vtext}[2][]{\begingroup\renewcommand{\arraystretch}{1.1}%
\begin{tabular}[#1]{@{}c@{}}%
\pft#2\endpft\rst%
\end{tabular}\endgroup}
\renewcommand*\familydefault{\sfdefault}
\begin{document}
\renewcommand{\arraystretch}{1.1}
\begin{tabular}{|cp{3cm}p{3cm}|}
\hline
\multirow{3}{*}{\vtext{LATERAL}} & text & text\\[1.8em]
\cline{2-3}
& text & text\\[1.8em]
\cline{2-3}
& text & text\\[1.8em]
\hline
\end{tabular}
\end{document}
-
Thanks for you answer. I ended up using your first example. – Anna May 13 '20 at 10:01

