1

This question already has an answer here:

I'm at the end of my mind. Why is it not possible to mix the top-alignment in a table?

\documentclass[a4paper, 12pt, bibliography=totocnumbered]{scrartcl}
\usepackage{amsfonts}

\begin{document}
\begin{table}[h]%
\begin{tabular}{c|c|p{0.3\textwidth}|c}
ID & Klasse & Beschreibung & Status \\
center & center & top Die Scriping-Umgebung kann zur Laufzeit String-Variablen in Maschinencode übersetzen und ausführen & \Huge\checkmark \\
\end{tabular}%
\end{table}%
\end{document}

Simply the table columns should be center | center | top | center. But I'm not able the get it.

enter image description here

marked as duplicate by subham soni, Mico tables Mar 23 at 9:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

In order to achieve the desired vertically centered alignment of the single row containing columns, you can use the m type column instead of the p type column. In the following example, I have also shonwn how to achieve a raggedright alignment on the third column as currently there are quite large spaces between the words.

enter image description here

\documentclass[a4paper, 12pt, bibliography=totocnumbered]{scrartcl}
\usepackage{amsfonts}
\usepackage{array}
\usepackage{ragged2e}

\newcolumntype{L}[1]{>{\RaggedRight\arraybackslash}m{#1}}

\begin{document}
\begin{table}[h]%
\begin{tabular}{c|c|m{0.3\textwidth}|c}
ID & Klasse & Beschreibung & Status \\
center & center & top Die Scriping-Umgebung kann zur Laufzeit String-Variablen in Maschinencode übersetzen und ausführen  & \Huge\checkmark \\
\end{tabular}%
\end{table}%

\begin{table}[h]%
\begin{tabular}{c|c|L{0.3\textwidth}|c}
ID & Klasse & Beschreibung & Status \\
center & center & top Die Scriping-Umgebung kann zur Laufzeit String-Variablen in Maschinencode übersetzen und ausführen  & \Huge\checkmark \\
\end{tabular}%
\end{table}%
\end{document}
2

three possibility:

enter image description here

to my taste i would use the last example. at the firs example it is difficult to see where start new row. but you can select a solution which you like :-)

\documentclass[a4paper, 12pt, bibliography=totocnumbered]{scrartcl}
\usepackage{ragged2e}
\usepackage{array, multirow}
\usepackage{amssymb}

\begin{document}
\begin{table}[ht]%
\begin{tabular}{c|c|>{\RaggedRight}m{0.35\textwidth}|c}
ID & Klasse & Beschreibung & Status \\
center & center & top Die Scriping-Umgebung kann zur Laufzeit String-Variablen in Maschinencode übersetzen und ausführen & \Huge\checkmark \\
\end{tabular}%
\end{table}

\begin{table}[ht]%
\begin{tabular}{c|c|>{\RaggedRight}p{0.35\textwidth}|c}
ID & Klasse & Beschreibung & Status \\
center & center & top Die Scriping-Umgebung kann zur Laufzeit String-Variablen in Maschinencode übersetzen und ausführen & \Huge\checkmark \\
\end{tabular}%
\end{table}%

\begin{table}[ht]%
\begin{tabular}{c|c|>{\RaggedRight}p{0.35\textwidth}|c}
ID & Klasse & Beschreibung & Status \\
center & center & top Die Scriping-Umgebung kann zur Laufzeit String-Variablen in Maschinencode übersetzen und ausführen & \multirow{4}{*}{\Huge\checkmark} \\
\end{tabular}%
\end{table}%
\end{document}

addendum: for completeness an improved version of the first solution. to it is added more vertical space around cells' contents in the third column's. for this is used cellspace package:

\documentclass[a4paper, 12pt, bibliography=totocnumbered]{scrartcl}
\usepackage{ragged2e}
\usepackage{array, cellspace, multirow}
\setlength\cellspacetoplimit{4pt}
\setlength\cellspacebottomlimit{4pt}

\usepackage{amssymb}

\begin{document}
\begin{table}[ht]%
\begin{tabular}{c|c|>{\RaggedRight}S{m{0.35\textwidth}}|c}
ID & Klasse & Beschreibung & Status \\
center & center & top Die Scriping-Umgebung kann zur Laufzeit String-Variablen in Maschinencode übersetzen und ausführen & \Huge\checkmark \\
\end{tabular}%
\end{table}
\end{document}

enter image description here

  • stupidly I miss one usecase. Is it also possible to make it like: top | top | top | center. In code I try p{2cm}|p{2cm}|>{\RaggedRight}m{0.35\textwidth}|c but the p-Column get ignored. :-( – Mar Tin Mar 23 at 9:30
  • 1
    this case is not possible on such simple way. also from tipographical point of view it hasn't appealing lookout. – Zarko Mar 23 at 19:03
  • sadly, but thanks @Zarko for your response. – Mar Tin Mar 23 at 20:50

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