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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
2 deletions
-
eisvogel.tex
|
@ -544,14 +544,15 @@ $if(tables)$ |
|
|
\arrayrulecolor{table-rule-color} % color of \toprule, \midrule, \bottomrule |
|
|
\arrayrulecolor{table-rule-color} % color of \toprule, \midrule, \bottomrule |
|
|
\setlength\heavyrulewidth{0.3ex} % thickness of \toprule, \bottomrule |
|
|
\setlength\heavyrulewidth{0.3ex} % thickness of \toprule, \bottomrule |
|
|
\renewcommand{\arraystretch}{1.3} % spacing (padding) |
|
|
\renewcommand{\arraystretch}{1.3} % spacing (padding) |
|
|
\rowcolors{3}{}{table-row-color!100} % row color |
|
|
|
|
|
|
|
|
|
|
|
% Reset rownum counter so that each table |
|
|
% Reset rownum counter so that each table |
|
|
% starts with the same row colors. |
|
|
% starts with the same row colors. |
|
|
% https://tex.stackexchange.com/questions/170637/restarting-rowcolors |
|
|
% https://tex.stackexchange.com/questions/170637/restarting-rowcolors |
|
|
\let\oldlongtable\longtable |
|
|
\let\oldlongtable\longtable |
|
|
\let\endoldlongtable\endlongtable |
|
|
\let\endoldlongtable\endlongtable |
|
|
\renewenvironment{longtable}{\oldlongtable} { |
|
|
\renewenvironment{longtable}{ |
|
|
|
|
|
\rowcolors{3}{}{table-row-color!100} % row color |
|
|
|
|
|
\oldlongtable} { |
|
|
\endoldlongtable |
|
|
\endoldlongtable |
|
|
\global\rownum=0\relax} |
|
|
\global\rownum=0\relax} |
|
|
|
|
|
|
|
|