mirror of
https://github.com/Wandmalfarbe/pandoc-latex-template.git
synced 2025-01-18 10:46:30 +00:00
add fix for rowcolors (#301)
This commit is contained in:
parent
0e59d0e713
commit
40dbc7c197
17
eisvogel.tex
17
eisvogel.tex
@ -718,11 +718,6 @@ $if(tables)$
|
||||
\renewcommand{\arraystretch}{1.3} % spacing (padding)
|
||||
|
||||
$if(table-use-row-colors)$
|
||||
% TODO: This doesn't work anymore. I don't know why.
|
||||
% Reset rownum counter so that each table
|
||||
% starts with the same row colors.
|
||||
% https://tex.stackexchange.com/questions/170637/restarting-rowcolors
|
||||
%
|
||||
% Unfortunately the colored cells extend beyond the edge of the
|
||||
% table because pandoc uses @-expressions (@{}) like so:
|
||||
%
|
||||
@ -730,13 +725,11 @@ $if(table-use-row-colors)$
|
||||
% \end{longtable}
|
||||
%
|
||||
% https://en.wikibooks.org/wiki/LaTeX/Tables#.40-expressions
|
||||
\let\oldlongtable\longtable
|
||||
\let\endoldlongtable\endlongtable
|
||||
\renewenvironment{longtable}{
|
||||
\rowcolors{3}{}{table-row-color!100} % row color
|
||||
\oldlongtable} {
|
||||
\endoldlongtable
|
||||
\global\rownum=0\relax}
|
||||
\usepackage{etoolbox}
|
||||
\AtBeginEnvironment{longtable}{\rowcolors{2}{}{table-row-color!100}}
|
||||
\preto{\toprule}{\hiderowcolors}{}{}
|
||||
\appto{\endhead}{\showrowcolors}{}{}
|
||||
\appto{\endfirsthead}{\showrowcolors}{}{}
|
||||
$endif$
|
||||
$endif$
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user