I am wondering if package listings has a feature that can skip a few lines and substitute them with some dots, to produce something like the following
1 | error_temp = error - ((numpy.linalg.norm(b, 'fro')) ** 2.0)
... | ...
5 | error -= (numpy.linalg.norm(b[j, :])) ** 2.0
I would like to be able to specify a few lines and ask listings to substitute them with dots and also print a few dots as its line number to indicate that it is skipping a few lines here. Also, when the skipping is over, resume to the actual line number as if the skipped lines were not skipped.
Here is my minimal working example, which might not help though
\documentclass{article}
\usepackage{listings}
\lstset{breaklines = true, frame = trBL, tabsize = 4, basicstyle = \small \ttfamily, keywordstyle = \color{blue}, stringstyle = \color{red}, rulecolor = \color{black}, numbers = left, numberstyle = \tiny}
\begin{document}
\begin{lstlisting}[language = Python, escapeinside = {(@}{@)}]
error_temp = error - ((numpy.linalg.norm(b, 'fro')) ** 2.0)
(@ \cdots @)
error -= (numpy.linalg.norm(b[j, :])) ** 2.0
\end{lstlisting}
\end{document}
The problem with the code is, it would not skip line numbers and it can not print dots as line number for skipped lines.
Please let me know if it is not clear of what I am trying to do, thanks in advance!

