單獨使用套件需要隱藏列頭的行顏色tabu
,列頭後面的表體第一行應該開始「青色」顏色,有什麼選擇嗎?
hiderowcolors
和showrowcolors
選項在禁忌中不起作用?
\documentclass{book}
\usepackage{tabu}
\usepackage[table]{xcolor}
\begin{document}
\def\tabuprocesstable#1#2#3{
\taburowcolors[1]1{cyan .. white}\fontsize{8bp}{10bp}\selectfont%
#1\par%
#2\par%
#3%
}
\def\colhead{\bfseries\sffamily}
\tabuprocesstable{}{\begin{tabu}{p{100pt}p{100pt}}
\tabucline{-}
\colhead{Column head 1}&\colhead{Column head 2}\\
Total non-current&Employee benefits\vphantom{yg}\\
Total non-current&Employee benefits\\
Total non-current&Employee benefits\\
Total non-current&Employee benefits\\
\tabucline{-}
\end{tabu}}{}
\bigskip\bigskip
\tabuprocesstable{}{\begin{tabu}{p{100pt}p{100pt}}
\tabucline{-}
%\hiderowcolors
\colhead{Column head 1}&\colhead{Column head 2}\\
\colhead{Column head 3}&\colhead{Column head 4}\\
%\showrowcolors
Total non-current&Employee benefits\vphantom{yg}\\
Total non-current&Employee benefits\\
Total non-current&Employee benefits\\
Total non-current&Employee benefits\\
\tabucline{-}
\end{tabu}}{}
\end{document}