diff --git a/eisvogel.tex b/eisvogel.tex index 4232340..4913f31 100644 --- a/eisvogel.tex +++ b/eisvogel.tex @@ -612,17 +612,12 @@ $if(tables)$ \setlength\heavyrulewidth{0.3ex} % thickness of \toprule, \bottomrule \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 -\let\oldlongtable\longtable -\let\endoldlongtable\endlongtable -\renewenvironment{longtable}{ -\rowcolors{3}{}{table-row-color!100} % row color -\oldlongtable} { -\endoldlongtable -\global\rownum=0\relax} - +% % Unfortunately the colored cells extend beyond the edge of the % table because pandoc uses @-expressions (@{}) like so: % @@ -630,6 +625,14 @@ $if(tables)$ % \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} +$endif$ $endif$ %