Samstag, 25. März 2017

latex multirow line break / Zeilenumbruch

\documentclass{article}
\usepackage{multirow}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{lll}
\toprule
Teacher & Title & Year \\
\midrule
\multirow{3}{*}{ neither \textbackslash newline nor \textbackslash
 linebreak  will work} & First steps \LaTeX{} & 2004 \\ 
 & \LaTeX{} course & 2005 \\ 
 & \LaTeX{} seminar & 2009 \\ 
\bottomrule
\end{tabular}
\end{document}
Zeilenumbruch fix width
\documentclass{article}
\usepackage{multirow}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{lll}
\toprule
Teacher & Title & Year \\
\midrule
\multirow{3}{3cm}{but fix width could work} & First
 steps \LaTeX{} & 2004 \\ 
 & \LaTeX{} course & 2005 \\ 
 & \LaTeX{} seminar & 2009 \\ 
\bottomrule
\end{tabular}
\end{document}
Zeilenumbruch mit shortstack left
\documentclass{article}
\usepackage{multirow}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{lll}
\toprule
Teacher & Title & Year \\
\midrule
\multirow{3}{*}{\shortstack[l]{left\\ \textasteriskcentered 
width could work}} & First steps \LaTeX{} & 2004 \\ 
 & \LaTeX{} course & 2005 \\ 
 & \LaTeX{} seminar & 2009 \\ 
\bottomrule
\end{tabular}
\end{document}
Zeilenumbruch mit shortstack center
\documentclass{article}
\usepackage{multirow}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{lll}
\toprule
Teacher & Title & Year \\
\midrule
\multirow{3}{*}{\shortstack[c]{center\\ \textasteriskcentered
 width could work}} & First steps \LaTeX{} & 2004 \\ 
 & \LaTeX{} course & 2005 \\ 
 & \LaTeX{} seminar & 2009 \\ 
\bottomrule
\end{tabular}
\end{document}
Zeilenumbruch mit shortstack right
\documentclass{article}
\usepackage{multirow}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{lll}
\toprule
Teacher & Title & Year \\
\midrule
\multirow{3}{*}{\shortstack[r]{right\\ \textasteriskcentered
 width could work}} & First steps \LaTeX{} & 2004 \\ 
 & \LaTeX{} course & 2005 \\ 
 & \LaTeX{} seminar & 2009 \\ 
\bottomrule
\end{tabular}
\end{document}

Keine Kommentare:

Kommentar veröffentlichen

Hinweis: Nur ein Mitglied dieses Blogs kann Kommentare posten.