4

I have the following code

\documentclass{scrartcl}

\usepackage[table]{xcolor}
\usepackage{tabu}

\begin{document}%

\tabulinesep=_1em^1em
\everyrow{\tabucline[1pt]{-}}

\begin{tabu}{@{}XX[3,L]} 
   \tabucline[1.5pt]{-} 
      blabla & 
      blabla
   \tabularnewline
   \taburowcolors 1{green!30 .. green!30}
      \multicolumn{2}{@{}c}{\textit Pause} 
   \tabularnewline
   \taburowcolors 1{white .. white}
      blabla &
      blabla
   \tabularnewline 
   \taburowcolors 1{green!30 .. green!30}
      \multicolumn{2}{@{}c}{\textit Pause} 
   \tabularnewline
   \taburowcolors 1{white .. white}
      blabla &
      blabla
   \tabularnewline \tabucline[1.5pt]-
\end{tabu} 

\end{document}

wich results in

enter image description here

Unfortunately there is an overlap in the colored rows. How is it possible to align the colored rows with the beginning of the horizontal lines?

3

Just drop that @{}c specification, use c instead, as far as I know, \multicolumn does allow for such use, but in this case, it does not work.

\documentclass{scrartcl}

\usepackage[table]{xcolor}
\usepackage{tabu}

\begin{document}%

\tabulinesep=_1em^1em
\everyrow{\tabucline[1pt]{-}}

\begin{tabu}{@{}XX[3,L]} 
   \tabucline[1.5pt]{-} 
      blabla & 
      blabla
   \tabularnewline
   \taburowcolors 1{green!30 .. green!30}
      \multicolumn{2}{c}{\textit{Pause}} 
   \tabularnewline
   \taburowcolors 1{white .. white}
      blabla &
      blabla
   \tabularnewline 
   \taburowcolors 1{green!30 .. green!30}
      \multicolumn{2}{c}{\textit{Pause}} 
   \tabularnewline
   \taburowcolors 1{white .. white}
      blabla &
      blabla
   \tabularnewline \tabucline[1.5pt]-
\end{tabu} 

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.