我刚刚安装了 TeXlive 2020列表已经改变,所以列表行行列似乎不起作用。我们怎样才能恢复漂亮的斑马线效果?
\documentclass[12pt,a4paper]{article}
\usepackage{listings}
\usepackage{lstlinebgrd}
\lstset{%
language=LaTeX[TeX],%
basisstyle=\ttfamily,%
linebackgroundcolor={%
\ifodd\value{lstnumber}%
\color{green}%
\else%
\color{yellow}%
\fi}
}
\begin{document}
How can we get the zebra effect?
\begin{lstlisting}
$ \cos^{2}\alpha+\sin^{2}\alpha=1 $\\
$ a^{2}+b^{2}=c^{2} $\\
$ E=mc^{2} $
\end{lstlisting}
\end{document}