以下 MWE 直接取自文档listings
,会产生错误Package keyval Error: consecutivenumbers undefined.
\documentclass{article}
\usepackage{listings}
\lstset{
numbers=left,
}
\begin{document}
\begin{lstlisting}[language={},
linerange={1-2,6-7},
consecutivenumbers=false]
Line no. 1
Line no. 2
Line no. 3
Line no. 4
Line no. 5
Line no. 6
Line no. 7
\end{lstlisting}
\end{document}
输出应为:
什么原因导致了这个错误以及如何实现类似的输出(带有列表或其他)?