Linien in Tabellen teilweise unterbrechen

Tabellen und Grafiken erstellen und anordnen


kla4dj
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 92
Registriert: Mo 12. Sep 2011, 14:36

Linien in Tabellen teilweise unterbrechen

Beitrag von kla4dj »

Wie bekomme ich es denn am elegantesten hin, dass ich in der Tabelle unten in jeder Spalte eine Linie ziehe, außer in der obersten Zeile? Das der Kopf mit den "Kriterien" oben also ohne Linien bleibt.
\documentclass[landscape]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{diagbox}

\usepackage[table]{xcolor}
\colorlet{rowbg}{blue!20}
\colorlet{tabtextcolor}{blue}

\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}[htbp]
\centering
\small
\caption{Übersicht über die in der Literatur angegeben Anforderungskriterien}
\label{tab:UebersichtKrit}
\begin{tabular}{>{\raggedright}m{3,6cm}|ccccccccccccccc}
\toprule
\diagbox{Quelle}{Kriterien}
& \colortabrotate{atomar} & \colortabrotate{eindeutig}
& \colortabrotate{einmalig} & \colortabrotate{konsistent}
& \colortabrotate{modifizierbar} & \colortabrotate{notwendig}
& \colortabrotate{prioritär} & \colortabrotate{prüfbar}
& \colortabrotate{realisierbar} & \colortabrotate{sortierbar}
& \colortabrotate{konsensfähig mit Stakeholdern}
& \colortabrotate{technisch lösungsneutral}
& \colortabrotate{verfolgbar} & \colortabrotate{verständlich}
& \colortabrotate{vollständig}\\
\midrule
Nummer 1 & & x & & x & x & x' & x' & x & x & & & & x'& x & x \\
\rowcolor{rowbg}
Nummer 1 & x' & x' & & x' & & & & x' & x' & & & & x'& & x' \\
Nummer 1 & & x' & x'& x' & & & & x' & & x' & & & x'& x'& x' \\
\rowcolor{rowbg}
Nummer 1 mit Zeileumbruch
& x & x & & x & (x) & x & (x) & x & x & (x) & & x & x & & x \\
Nummer 1 auch mit Zeilenumbruch weil so lang
& & x' & & x & & & x' & x' & x & & & x'& x & x & x \\
\rowcolor{rowbg}
Nummer 1 & & x' & & x' & x' & x' & & & x' & & x'& x'& x'& & x' \\
\midrule
Auswahl & x & x & & x & & & & x & & & & x & x & & \\
\bottomrule
\end{tabular}
\end{table}
\end{document}

Ursprungsproblem: http://golatex.de/zeilenumbruch-bei-ein ... 15238.html

Noch so einer

Beitrag von Noch so einer »

Wie immer mit \multicolumn:
\documentclass[landscape]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{diagbox}

\usepackage[table]{xcolor}
\colorlet{rowbg}{blue!20}
\colorlet{tabtextcolor}{blue}

\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}[htbp]
\centering
\small
\caption{Übersicht über die in der Literatur angegeben Anforderungskriterien}
\label{tab:UebersichtKrit}
\begin{tabular}{>{\raggedright}m{3,6cm}|ccccccccccccccc}
\toprule
\multicolumn{1}{m{3.6cm}}{\diagbox{Quelle}{Kriterien}}
& \colortabrotate{atomar} & \colortabrotate{eindeutig}
& \colortabrotate{einmalig} & \colortabrotate{konsistent}
& \colortabrotate{modifizierbar} & \colortabrotate{notwendig}
& \colortabrotate{prioritär} & \colortabrotate{prüfbar}
& \colortabrotate{realisierbar} & \colortabrotate{sortierbar}
& \colortabrotate{konsensfähig mit Stakeholdern}
& \colortabrotate{technisch lösungsneutral}
& \colortabrotate{verfolgbar} & \colortabrotate{verständlich}
& \colortabrotate{vollständig}\\
\midrule
Nummer 1 & & x & & x & x & x' & x' & x & x & & & & x'& x & x \\
\rowcolor{rowbg}
Nummer 1 & x' & x' & & x' & & & & x' & x' & & & & x'& & x' \\
Nummer 1 & & x' & x'& x' & & & & x' & & x' & & & x'& x'& x' \\
\rowcolor{rowbg}
Nummer 1 mit Zeileumbruch
& x & x & & x & (x) & x & (x) & x & x & (x) & & x & x & & x \\
Nummer 1 auch mit Zeilenumbruch weil so lang
& & x' & & x & & & x' & x' & x & & & x'& x & x & x \\
\rowcolor{rowbg}
Nummer 1 & & x' & & x' & x' & x' & & & x' & & x'& x'& x'& & x' \\
\midrule
Auswahl & x & x & & x & & & & x & & & & x & x & & \\
\bottomrule
\end{tabular}
\end{table}
\end{document}

kla4dj
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 92
Registriert: Mo 12. Sep 2011, 14:36

Beitrag von kla4dj »

okay, cool. Danke!

Antworten