彩色行的重叠

彩色行的重叠

我有以下代码

\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}

结果是

在此处输入图片描述

不幸的是,彩色行有重叠。如何将彩色行与水平线的开头对齐?

答案1

只要放弃该@{}c规范,改用c,据我所知,\multicolumn确实允许这样的使用,但在这种情况下,它不起作用。

\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}

在此处输入图片描述

相关内容