2

I am trying to create a table which has a header with the text centred horizontally and vertically. The text in the first column (except for the header row) should be written vertically. So far I have this.

\begin{table}[!ht]
\centering
\begin{tabu} to \textwidth {| X[c,m] | X[c,m] | X[c,m] | X[c,m] |} 
 \hline
 Konzept & Kamera + RGB-Sensor & Liniensensor + Ultraschall + RGB-Sensor & Stereokamera \\
 \hline
 \begin{rotate}{90}Beschreibung\end{rotate} & 6 & 87837 & 787 \\ 
 Vorteile & 7 & 78 & 5415 \\
 Nachteile & 545 & 778 & 7507 \\
 Risiko & 545 & 18744 & 7560 \\
 \hline
\end{tabu}
\caption{Beispiele für die Konzeptfindung.}
\label{tab:Beispiele_Konzeptfindung}
\end{table}

Which leads to this output: Output

How can I ajust only the first row to be horizontally aligned? How can I ajust the rotate command, so that the text stays in its cell?

2
Do you want the table like this.
\documentclass{article}
\usepackage{float}
\usepackage{caption}
\usepackage{booktabs}
\usepackage{graphicx}
\newcommand{\rot}[1]{\rotatebox[origin=l]{90}{#1}}
\usepackage{siunitx}
\usepackage{array}
\usepackage{ragged2e}
\usepackage{microtype}
\begin{document}
\begin{table}[H]
\centering
\begin{tabular} {@{}>{\RaggedRight}b{3cm}*{3}{S[table-format=4.1]}@{}}
\toprule
{\rot{ Konzept}} &{\rot{\parbox{2cm}{ Kamera + \\RGB-Sensor}}} & 
{\rot{\parbox{2cm}{Liniensensor+\\ Ultraschall +\\ RGB-Sensor}}} & 
{\rot{Stereokamera}} \\
\midrule
Beschreibung & 6 & 87837 & 787\\
Vorteile & 7 & 78 & 5415 \\
Nachteile & 545 & 778 & 7507 \\
Risiko & 545 & 18744 & 7560 \\
\bottomrule
\end{tabular}
\caption{Beispiele für die Konzeptfindung.}
\label{tab:Beispiele_Konzeptfindung}
\end{table}
\end{document}

tabuoutput

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.