From 86bf7c0d972aec65da052fd860194682e2701b8f Mon Sep 17 00:00:00 2001 From: Wandmalfarbe Date: Sun, 4 Aug 2019 16:47:49 +0200 Subject: [PATCH] Issue #29: Disable striped tables per default. Enable them with the option `table-use-row-colors: true`. --- eisvogel.tex | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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$ %