PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Tabelle mit xcolor



Mic_81
05-09-2008, 11:39
Hallo zusammen,

ich bastle grade an einem Tabellen-Layout, wobei ich aber so meine Schwierigkeiten habe! Im angehängten screenshot seht ihr, wie ich die Tabelle gerne hätte! In meiner Version wird leider die Kopfzeile nicht komplett grau ausgefüllt. Außerdem habe ich Schwierigkeiten, eine hellere Farbe als "lightgray" in dem Befehl
rowcolors{2}{lightgray}{white} zu definieren. Hier mal ein Minimalbeispiel meiner Tabelle:

\documentclass[a4paper,11pt]{scrreprt}
\usepackage[T1]{fontenc}
\pagestyle{headings}
\usepackage[ansinew]{inputenc}
\usepackage[english]{babel}
\usepackage{longtable}
\usepackage{colortbl}
\usepackage{array}
\usepackage{booktabs}
\usepackage[table]{xcolor}

%--------------------------------------------------------------------------


\begin{document}
\chapter{Test}

\rowcolors{2}{lightgray}{white}
\begin{table}[ht] % wo \rowcolor[gray]{0.9}
\centering
\begin{tabular}{cp{4.3cm}cp{4.3cm}}
\toprule
\multicolumn{1}{>{\columncolor[gray]{0.9}}c}{\sffamily\itshape\textbf{Nr}}
& \multicolumn{1}{>{\columncolor[gray]{0.9}}c}{\sffamily\itshape\textbf{Milestone}}
& \multicolumn{1}{>{\columncolor[gray]{0.9}}c}{\sffamily\itshape\textbf{Result}}
& \multicolumn{1}{>{\columncolor[gray]{0.9}}c}{\sffamily\itshape\textbf{Variances/Remarks}}\\
\midrule
1. & Practice in the theoretical basics
& Successfully accomplished %The needed theoretical basics were rehabilitated
& -\\
2. & Definition of an appropriate framework architecture and a choice of appropriate technologies
& Successfully accomplished
& The framework was defined on the basics of chapter XY while the technologies of chapter
\ref{lblPrinciples} were employed \\ %- \\
3. & Assembly and integration of the framework
& Successfully accomplished
& - \\
4. & Integration in the existing operational workflows (interface to OpenAmeos)
& Successfully accomplished
& A new TDL script for generating XMI 2.0 has to be implemented \\
5. & Definition of metamodels for XML, XSD and Java
& Successfully accomplished
& The Java model was predetermined and only supplemented \\
6. & Development of the code generators for the creation of XML, XSD and Java
& Successfully accomplished
& There is no reason for a XML generator. Only a XML writer was established \\
7. & Build metamodel transformations for XML, XSD and Java
& Successfully accomplished
& There are the transformations from UML to XSD, XSD to XML, and UML to Java \\
8. & Generation of an example XML file
& Successfully accomplished
& XMLSpy check resulted well-formed \\
\bottomrule
\end{tabular}
\caption{Comparison of the milestones and the results}
\label{tab:Comparison}
\end{table}


\end{document}


Wäre super wenn jemand mir helfen könnte, damit meine Tabelle so aussieht, wie die im screenshot (ggf. halt noch eine linie unterhalb der Kopfzeile)!

Greetz
Mic

Mic_81
05-09-2008, 11:50
...also das mit der Frabe hab ich jetzt hin bekommen...einfach ne neue mit
\definecolor erzeugen....bleibt nur noch das Problem der Kopfzeile!

voss
05-09-2008, 12:05
...also das mit der Frabe hab ich jetzt hin bekommen...einfach ne neue mit
\definecolor erzeugen....bleibt nur noch das Problem der Kopfzeile!

es macht typografisch keinen Sinn Farbe _und_ Linien zu verwenden ...


\begin{tabular}{cp{4.3cm}cp{4.3cm}}\specialrule{2p t}{0pt}{0pt}
\multicolumn{1}{>{\columncolor[gray]{0.9}}c}{\sffamily\itshape\textbf{Nr}}
& \multicolumn{1}{>{\columncolor[gray]{0.9}}c}{\sffamily\itshape\textbf{Milestone}}
& \multicolumn{1}{>{\columncolor[gray]{0.9}}c}{\sffamily\itshape\textbf{Result}}
& \multicolumn{1}{>{\columncolor[gray]{0.9}}c}{\sffamily\itshape\textbf{Variances/Remarks}}\\
\specialrule{2pt}{0pt}{5pt}

Herbert

Mic_81
05-09-2008, 12:20
Danke für deine Hilfe! Das mit der
\specialrule klappt wunder bar!
Hab auch herausgefunden, dass es mit
\firsthline \lasthline auch geht. Nur kann man da eben nicht manuell die Stärke etc. verändern!
Noch zur Typografie: Ich verwende ja schon keine vertikalen Linien. Die horizontalen sollen eben nur als eine Art Begrenzung dienen! :)
Vielen Danke nochmals!

voss
05-09-2008, 13:04
Das mit der
\specialrule klappt wunder bar!
Hab auch herausgefunden, dass es mit
\firsthline \lasthline auch geht. Nur kann man da eben nicht manuell die Stärke etc. verändern!
Noch zur Typografie: Ich verwende ja schon keine vertikalen Linien. Die horizontalen sollen eben nur als eine Art Begrenzung dienen! :)


dazu haste je extra die Farbe!

Herbert