Tabularx - ganze Zeilen einfärben
Guten Morgen liebes Latex Forum,
ich scheitere dabei einzelne Zeilen in einer meinen Tabellen einzufärben. Hier das Minimalbeispiel:
\documentclass[12pt,oneside,bibliography=totoc,parskip=off, appendixprefix=true, chapterprefix=false, numbers=noenddot]{scrbook} \usepackage{tabularx} \usepackage{colortbl} \begin{document} \begin{table}[ht] \centering \caption{Werkzeugstandmengen und -kosten} \begin{tabularx}{\textwidth}{@{\extracolsep{\fill}} lcccc} \toprule\begin{tabular}[c]{@{}c@{}}Technologie\end{tabular} &\begin{tabular}[c]{@{}c@{}}Standlänge \\ $[\mathrm{mm}]$\end{tabular} & \begin{tabular}[c]{@{}c@{}}Nachschliffint. \\$[\mathrm{Stk.}]$\end{tabular} & \begin{tabular}[c]{@{}c@{}}Gesamtstückzahl\\ $[\mathrm{Stk.}]$\end{tabular} & \begin{tabular}[c]{@{}c@{}}Werkzeugkosten\\ $[$\euro/$\mathrm{Stk.}]$\end{tabular} \\ \midrule \rowcolor[gray]{0.7}kon. deg. Z14& $3325$ & $133$& $4389$&$1,50$ \\ \rowcolor[gray]{0.7}kon. deg. Z13& $3075$ &$123$& $4059$&$1,62$ \\ \rowcolor[gray]{0.7}kon. deg. Z12& $2850$&$114$& $3762$&$1,75$ \\ kon. deg. Z11& $2600$& $104$& $3432$&$1,92$\\ \rowcolor[gray]{0.7}kon. deg. Z10& $2375$& $95$&$3135$&$2,10$ \\ kon. deg. Z09& $2125$& $85$&$2805$&$2,35$ \\ kon. deg. Z08& $1900$& $76$&$2508$&$2,63$ \\ \rowcolor[gray]{0.7}zyl. deg. Z14& $3325$& $133$&$6650$&$1,32$\\ \rowcolor[gray]{0.7}zyl. deg. Z13& $3075$ & $123$& $6150$&$1,43$\\ \rowcolor[gray]{0.7}zyl. deg. Z12& $2850$ &$114$&$5700$&$1,54$\\ \rowcolor[gray]{0.7}zyl. deg. Z11& $2600$ &$104$&$5200$&$1,69$ \\ \rowcolor[gray]{0.7}zyl. deg. Z10& $2375$ & $95$&$4750$&$1,85$ \\ \rowcolor[gray]{0.7}zyl. deg. Z09& $2125$ & $85$&$4250$&$2,07$ \\ \rowcolor[gray]{0.7}zyl. deg. Z08& $1900$ & $76$&$3800$&$2,32$\\ \bottomrule
\label{tab:Standmenge}
\end{tabularx} \end{table} \end{document}
ich hoffe mal das diese Pakete reichen. Ich hätte die Farbe gerne konstant über die ganze Zeile hinweg ohne Unterbrechung. Des Weiteren sollte die Farbe die Tabellenbreite nicht überschreiten. Ich vermute mal es hängt mit dem \extracolsep zusammen.
VG Tim