mirror of
https://github.com/Wandmalfarbe/pandoc-latex-template.git
synced 2025-01-29 15:43:52 +00:00
Issue #29: Disable striped tables per default. Enable them with the option table-use-row-colors: true
.
This commit is contained in:
parent
0afdba6c59
commit
86bf7c0d97
19
eisvogel.tex
19
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$
|
||||
|
||||
%
|
||||
|
Loading…
x
Reference in New Issue
Block a user