Farbig Zeilen mit \rowcolors
Verfasst: Di 6. Sep 2016, 18:12
Hallo,
ich möchte gerne ab Zeile x (3 oder 5 ) eine alternierende Färbung der Zeilen.
Ich schaffe es nur, dass von der Ersten Zeile an gefärbt wird.
ich möchte gerne ab Zeile x (3 oder 5 ) eine alternierende Färbung der Zeilen.
Ich schaffe es nur, dass von der Ersten Zeile an gefärbt wird.
\documentclass[a4paper,12pt,draft,captions=tableabove]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{tabularx,ragged2e}
\usepackage[table,dvipsnames,svgnames]{xcolor}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{tabularx}
\usepackage{showframe}
\newcolumntype{L}{>{\RaggedRight\hspace{0pt}}X}
\begin{document}
\begin{table}%[htb]
\centering
\caption{}
\sisetup{
separate-uncertainty,
table-align-uncertainty=true,
table-figures-decimal=1,
table-format=3.2(2),
table-column-width = .28\textwidth % <- hinzugefügt
}
\rowcolors[]{1}{blue!20}{blue!10}
\begin{tabularx}{\textwidth}{XSSS}
\toprule
{bla} &{Transekt 1} & {Transekt 2} & {Transekt 3} \\
\midrule
P & 1.5+-0.1 &1.8+-0.38 &1.4+-0,07 \\
Fet & 14.1+-1,4 &38+-5,8 &10.7+-0,5 \\
Cat & 35+-1,5 &181+-17 &31+-13 \\
St & 4.7+-1,7 &1,4+-0,07 &12.1+-0,85 \\
\addlinespace
O & 12.1+-3 & 38.2+-5.8 &13.5+-6 \\
C:N & 14,7+-0,4 &23.3+-2,6 &13.5+-1,2 \\
jkk & 32.2+-3 & 65.9 & \\
\bottomrule
\end{tabularx}
\label{Ele}
\end{table}
\end{document}