Browse Source

Fix alternating row colors in array/matrix.

Prevent `\rowcolors` in longtable from contaminating array/matrix environments in math mode.
pull/47/head
qjqqyy 6 years ago
committed by GitHub
parent
commit
324880a388
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      eisvogel.tex

5
eisvogel.tex

@ -544,14 +544,15 @@ $if(tables)$
\arrayrulecolor{table-rule-color} % color of \toprule, \midrule, \bottomrule
\setlength\heavyrulewidth{0.3ex} % thickness of \toprule, \bottomrule
\renewcommand{\arraystretch}{1.3} % spacing (padding)
\rowcolors{3}{}{table-row-color!100} % row color
% 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}{\oldlongtable} {
\renewenvironment{longtable}{
\rowcolors{3}{}{table-row-color!100} % row color
\oldlongtable} {
\endoldlongtable
\global\rownum=0\relax}

Loading…
Cancel
Save