Seite 1 von 1

Linien in Tabellen teilweise unterbrechen

Verfasst: Mo 22. Jun 2015, 09:51
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

Verfasst: Mo 22. Jun 2015, 10:38
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}

Verfasst: Di 23. Jun 2015, 08:29
von kla4dj
okay, cool. Danke!