Seite 1 von 1
Zellenhöhe bei vert. beschr.Zellen/Threeparttable zentrieren
Verfasst: Mi 29. Jul 2015, 14:34
von kla4dj
Hallo,
folgende Tabelle bekomme ich partout nicht aufgehübscht. In der obersten Zeile ist die Zellenhöhe nicht optimal. Wenn ich extra horizontale Linien einfüge, entsteht bei den anderen Zellen ein "unhübscher" Abstand. Darüber hinaus ist die Tabelle nicht mittig. Über Hilfe wäre ich sehr, sehr dankbar!
\documentclass[landscape]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage{pifont}
\usepackage[table]{xcolor}
\colorlet{rowbg}{blue!20}
\colorlet{tabtextcolor}{blue}
\newcommand*{\tab}[1]{\textbf{#1}}
\usepackage{varwidth}
\newcommand\tabrotate[1]{\rotatebox{90}{\verschiebung#1}}
\newcommand\colortabrotate[2][3cm]{\tabrotate{%
\bfseries\color{tabtextcolor}%
\begin{varwidth}{#1}
\raggedright#2
\end{varwidth}%
}}
\newcommand\verschiebung[1][-.5\normalbaselineskip]{\hspace{#1}}
\begin{document}
\begin{threeparttable}[htbp]
\centering
\small
\caption{Übersicht über die Anforderungskonformität des Prototyps}
\label{tab:UebersichtKrit}
\begin{tabular}{c|c||c|c||c|c||c|c}
\toprule
\colortabrotate{Anforderungs-\\schlüssel} & \colortabrotate{Konformität} & \colortabrotate{Anforderungs-\\schlüssel} & \colortabrotate{Konformität} & \colortabrotate{Anforderungs-\\schlüssel} & \colortabrotate{Konformität} & \colortabrotate{Anforderungs-\\schlüssel} & \colortabrotate{Konformität} \\
\midrule
AFA 1 & \ding{51} & TA 1 & \ding{51} & QA F 4 & \textbf{?} & AsB 1 & \ding{111} \\ \rowcolor{rowbg}
AFA 2 & \ding{51} & TA 2 & \ding{51} & QA F 5 & \ding{53} & AsB 2 & \ding{53} \\
AFA 3 & \ding{51} & TA 3 & \ding{111} & QA F 6 & \ding{51} & & \\ \cmidrule{5-6} \rowcolor{rowbg}
AFA 4 & \ding{51} & TA 4 & \ding{51} & QA ÄÜ 1 & \ding{111} & & \\
AFA 5 & \textbf{?} & TA 5 & \ding{111} & QA ÄÜ 2 & \ding{51} & & \\ \rowcolor{rowbg}
AFA 6 & \textbf{?} & TA 6 & \ding{51} & QA ÄÜ 3 & \ding{51} & & \\
AFA 7 & \ding{51} & TA 7 & \ding{51} & QA ÄÜ 4 & \textbf{?} & & \\ \cmidrule{3-6} \rowcolor{rowbg}
AFA 8 & \ding{51} & QA Z 1 & \ding{51} & AMMS 1 & \ding{51} & & \\
AFA 9 & \textbf{?} & QA Z 2 & \ding{51} & AMMS 2 & \textbf{?} & & \\ \cmidrule{1-4} \rowcolor{rowbg}
FA 1 UC1 & \ding{51} & QA F 1 & \ding{51} & AMMS 3 & \ding{53} & & \\
FA 2 UC2 & \ding{51} & QA F 2 & \ding{51} & AMMS 4 & \textbf{?} & & \\ \rowcolor{rowbg}
FA 3 UC3 & \ding{51} & QA F 3 & \ding{51} & AMMS 5 & \ding{111} & & \\
\end{tabular}
\begin{tablenotes}
\footnotesize
\item[] Legende: \ding{51} = Anforderung erfüllt; \ding{53} = Anforderung nicht erfüllt; \ding{111} = Anforderung im Kontext irrelevant; (\textbf{?}) keine Aussage möglich
\item[]
\end{tablenotes}
\end{threeparttable}
\end{document}
Verfasst: Mi 29. Jul 2015, 14:48
von sudo
Hast du die Anleitung von Booktabs mal gelesen? Deine Tabelle sieht grauenhaft aus. Wieso kombinierst du vertikale Linien mit denen von booktabs?
Zum Problem mit dem Abstand: Füge vor \midrule noch ein \addlinespace hinzu.
Verfasst: Mi 29. Jul 2015, 14:55
von kla4dj
was könnte ich besser machen, damit die Tabelle nicht mehr "grauenhaft" aussieht?
Verfasst: Mi 29. Jul 2015, 15:32
von sudo
Die Anleitung von booktabs lesen und die vertikalen Linien entfernen wären erste Schritte. Ich würde auch nicht farbige Zeilen und horizontale Linien kombinieren.
Verfasst: Mi 29. Jul 2015, 17:47
von kla4dj
Danke für Deine Hinweise!! Ich hatte das in Booktabs gelesen, dass es der Meinung des Autors nach Kapitelfehler seien veriktale und horizontale Linien zu kombinieren. Nur finde ich halt, dass die Lesbarkeit darunterleidet, sobald die veritkalen Linien fehlen. Will halt auch nicht einen langen Tabellen-Strich (siehe unten). Deswegen habe ich es auf mehrere Spalten verteilt.
Wenn Du mir nochmal Feedback gegeben könntest, was ich noch besser machen könnte, würde ich mich sehr freuen!
\documentclass[landscape]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage{pifont}
\usepackage[table]{xcolor}
\colorlet{rowbg}{blue!20}
\colorlet{tabtextcolor}{blue}
\newcommand*{\tab}[1]{\textbf{#1}}
\usepackage{varwidth}
\newcommand\tabrotate[1]{\rotatebox{90}{\verschiebung#1}}
\newcommand\colortabrotate[2][3cm]{\tabrotate{%
\bfseries\color{tabtextcolor}%
\begin{varwidth}{#1}
\raggedright#2
\end{varwidth}%
}}
\newcommand\verschiebung[1][-.5\normalbaselineskip]{\hspace{#1}}
\begin{document}
\begin{table}
\centering
\footnotesize
\begin{threeparttable}[htbp]
\caption{Übersicht über die Anforderungskonformität des Prototyps}
\label{tab:UebersichtKrit}
\begin{tabular}{cccccccccccccc}
\toprule
\addlinespace
\colortabrotate{Anforderungs-\\schlüssel} & \colortabrotate{Konformität} &&& \colortabrotate{Anforderungs-\\schlüssel} & \colortabrotate{Konformität} &&& \colortabrotate{Anforderungs-\\schlüssel} & \colortabrotate{Konformität} &&& \colortabrotate{Anforderungs-\\schlüssel} & \colortabrotate{Konformität} \\
\addlinespace \midrule
AFA 1 & \ding{51} &&& TA 1 & \ding{51} &&& QA F 4 & \textbf{?} &&& AsB 1 & \textbf{?} \\ \rowcolor{rowbg}
AFA 2 & \ding{51} &&& TA 2 & \ding{51} &&& QA F 5 & \ding{53} &&& AsB 2 & \ding{53} \\
AFA 3 & \ding{51} &&& TA 3 & \textbf{irr.} &&& QA F 6 & \ding{51} &&& & \\ \rowcolor{rowbg}
AFA 4 & \ding{51} &&& TA 4 & \ding{51} &&& QA ÄÜ 1 & \textbf{irr.} &&& & \\
AFA 5 & \textbf{?} &&& TA 5 & \textbf{irr.} &&& QA ÄÜ 2 & \ding{51} &&& & \\ \rowcolor{rowbg}
AFA 6 & \textbf{?} &&& TA 6 & \ding{51} &&& QA ÄÜ 3 & \ding{51} &&& & \\
AFA 7 & \ding{51} &&& TA 7 & \ding{51} &&& QA ÄÜ 4 & \textbf{?} &&& & \\ \rowcolor{rowbg}
AFA 8 & \ding{51} &&& QA Z 1 & \ding{51} &&& AMMS 1 & \ding{51} &&& & \\
AFA 9 & \textbf{?} &&& QA Z 2 & \ding{51} &&& AMMS 2 & \textbf{irr.} &&& & \\ \rowcolor{rowbg}
FA 1 UC1 & \ding{51} &&& QA F 1 & \ding{51} &&& AMMS 3 & \ding{53} &&& & \\
FA 2 UC1 & \ding{51} &&& QA F 2 & \ding{51} &&& AMMS 4 & \textbf{?} &&& & \\ \rowcolor{rowbg}
FA 3 UC1 & \ding{51} &&& QA F 3 & \ding{51} &&& AMMS 5 & \textbf{irr.} &&& & \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\footnotesize
\item[] Legende: \ding{51} = Anforderung erfüllt; \ding{53} = Anforderung nicht erfüllt; \textbf{irr.} = Anforderung im Kontext irrelevant; \textbf{?} keine Aussage möglich
\item[]
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
Also langgezogner Tabellenstrich sieht es folgendermaßen aus:
\documentclass[landscape]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage{pifont}
\usepackage[table]{xcolor}
\colorlet{rowbg}{blue!20}
\colorlet{tabtextcolor}{blue}
\newcommand*{\tab}[1]{\textbf{#1}}
\usepackage{varwidth}
\newcommand\tabrotate[1]{\rotatebox{90}{\verschiebung#1}}
\newcommand\colortabrotate[2][3cm]{\tabrotate{%
\bfseries\color{tabtextcolor}%
\begin{varwidth}{#1}
\raggedright#2
\end{varwidth}%
}}
\newcommand\verschiebung[1][-.5\normalbaselineskip]{\hspace{#1}}
\begin{document}
\begin{table}
\centering
\footnotesize
\begin{threeparttable}[htbp]
\caption{Übersicht über die Anforderungskonformität des Prototyps}
\label{tab:UebersichtKrit}
\begin{tabular}{cc}
\toprule
\addlinespace
\tab{Anforderungsschlüssel} & \tab{Konformität} \\
\addlinespace \midrule
AFA 1 & \ding{51} \\ \rowcolor{rowbg}
AFA 2 & \ding{51} \\
AFA 3 & \ding{51} \\ \rowcolor{rowbg} %\cmidrule{5-6}
AFA 4 & \ding{51} \\
AFA 5 & \textbf{?} \\ \rowcolor{rowbg}
AFA 6 & \textbf{?} \\
AFA 7 & \ding{51} \\ \rowcolor{rowbg} %\cmidrule{3-6}
AFA 8 & \ding{51} \\
AFA 9 & \textbf{?} \\ \rowcolor{rowbg} %\cmidrule{1-4}
FA 1 UC1 & \ding{51} \\
FA 2 UC1 & \ding{51} \\ \rowcolor{rowbg}
FA 3 UC1 & \ding{51} \\
TA 1 & \ding{51} \\ \rowcolor{rowbg}
TA 2 & \ding{51} \\
TA 3 & \textbf{irr.} \\ \rowcolor{rowbg}
TA 4 & \ding{51} \\
TA 5 & \textbf{irr.} \\ \rowcolor{rowbg}
TA 6 & \ding{51} \\
TA 7 & \ding{51} \\ \rowcolor{rowbg}
QA Z 1 & \ding{51} \\
QA Z 2 & \ding{51} \\ \rowcolor{rowbg}
QA F 1 & \ding{51} \\
QA F 2 & \ding{51} \\ \rowcolor{rowbg}
QA F 3 & \ding{51} \\
QA F 4 & \textbf{?} \\ \rowcolor{rowbg}
QA F 5 & \ding{53} \\
QA F 6 & \ding{51} \\ \rowcolor{rowbg}
QA ÄÜ 1 & \textbf{irr.} \\
QA ÄÜ 2 & \ding{51} \\ \rowcolor{rowbg}
QA ÄÜ 3 & \ding{51} \\
QA ÄÜ 4 & \textbf{?} \\ \rowcolor{rowbg}
AMMS 1 & \ding{51} \\
AMMS 2 & \textbf{irr.} \\ \rowcolor{rowbg}
AMMS 3 & \ding{53} \\
AMMS 4 & \textbf{?} \\ \rowcolor{rowbg}
AMMS 5 & \textbf{irr.} \\
AsB 1 & \textbf{?}\\ \rowcolor{rowbg}
AsB 2 & \ding{53}\\
\end{tabular}
\begin{tablenotes}
\footnotesize
\item[] Legende: \ding{51} = Anforderung erfüllt; \ding{53} = Anforderung nicht erfüllt; \textbf{irr.} = Anforderung im Kontext irrelevant; \textbf{?} keine Aussage möglich
\item[]
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
Verfasst: Do 30. Jul 2015, 14:18
von sudo
Ich habe verschiedene Ideen:
* die leeren Spalten mit p-Spalten auf die gewünschte Größe bringen
* mit einer
tabularx die leeren Spalten gleichmäßig dehnen
* die Einträge sinnvoll Gruppieren bzw. die Spaltenumbrüche an bestimmten Stellen machen (QA … nicht trennen)
* Oder die Abkürzungen ausschreiben und somit die lange Liste sinnvoll füllen
* Ich würde die \rowcolor lieber weglassen, als auf eine farbige Zeile eine \bottomrule folgen zu lassen, da diese weißen Raum über sich hat.
\documentclass[landscape]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{threeparttable}
\usepackage{pifont}
\usepackage[table]{xcolor}
\colorlet{rowbg}{blue!20}
\colorlet{tabtextcolor}{blue}
\newcommand*{\tab}[1]{\textbf{#1}}
\usepackage{varwidth}
\newcommand\tabrotate[1]{\rotatebox{90}{\verschiebung#1}}
\newcommand\colortabrotate[2][3cm]{\tabrotate{%
\bfseries\color{tabtextcolor}%
\begin{varwidth}{#1}
\raggedright#2
\end{varwidth}%
}}
\newcommand\verschiebung[1][-.5\normalbaselineskip]{\hspace{#1}}
\begin{document}
\begin{table}
\centering
%\footnotesize
\begin{threeparttable}[htbp]
\caption{Übersicht über die Anforderungskonformität des Prototyps}
\label{tab:UebersichtKrit}
\begin{tabularx}{\textwidth}{ccXccXccXcc}
\toprule \addlinespace
\colortabrotate{Anforderungs-\\schlüssel} & \colortabrotate{Konformität} &&
\colortabrotate{Anforderungs-\\schlüssel} & \colortabrotate{Konformität} &&
\colortabrotate{Anforderungs-\\schlüssel} & \colortabrotate{Konformität} &&
\colortabrotate{Anforderungs-\\schlüssel} & \colortabrotate{Konformität} \\
\addlinespace \midrule
AFA 1 & \ding{51} && FA 1 UC1 & \ding{51} && QA Z 1 & \ding{51} && AsB 1 & \textbf{?} \\ %\rowcolor{rowbg}
AFA 2 & \ding{51} && FA 2 UC1 & \ding{51} && QA Z 2 & \ding{51} && AsB 2 & \ding{53} \\
AFA 3 & \ding{51} && FA 3 UC1 & \ding{51} && QA F 1 & \ding{51} && AMMS 1 & \ding{51} \\ %\rowcolor{rowbg}
AFA 4 & \ding{51} && TA 1 & \ding{51} && QA F 2 & \ding{51} && AMMS 2 & \textbf{NA} \\
AFA 5 & \textbf{?} && TA 2 & \ding{51} && QA F 3 & \ding{51} && AMMS 3 & \ding{53} \\ %\rowcolor{rowbg}
AFA 6 & \textbf{?} && TA 3 & \textbf{NA} && QA F 4 & \textbf{?} && AMMS 4 & \textbf{?} \\
AFA 7 & \ding{51} && TA 4 & \ding{51} && QA F 5 & \ding{53} && AMMS 5 & \textbf{NA} \\ %\rowcolor{rowbg}
AFA 8 & \ding{51} && TA 5 & \ding{51} && QA F 6 & \ding{51} && & \\
AFA 9 & \textbf{?} && TA 6 & \ding{51} && QA ÄÜ 1 & \textbf{NA} && & \\ %\rowcolor{rowbg}
& && TA 7 & \ding{51} && QA ÄÜ 2 & \ding{51} && & \\
& && & && QA ÄÜ 3 & \ding{51} && & \\ %\rowcolor{rowbg}
& && & && QA ÄÜ 4 & \textbf{?} && & \\
\bottomrule
\end{tabularx}
\begin{tablenotes}
% \footnotesize
\item[] Legende: \ding{51} = Anforderung erfüllt; \ding{53} = Anforderung nicht erfüllt; \textbf{NA} = nicht anwendbar; \textbf{?} = keine Aussage möglich
\item[]
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
Verfasst: Sa 1. Aug 2015, 11:06
von kla4dj
Danke sudo! Das sieht jetzt wirklich deutlich ordentlicher aus.