This question has already been asked for the package listings, but I am using minted and want to achieve the same thing.
My document looks as follows:
\documentclass{article}
\usepackage{minted}
\begin{document}
\begin{minted}[breaklines=true,linenos]{javascript}
/* My Code: */
console.log("Hello");
console.log("World");
console.log("FooBar");
console.log("BarFoo");
console.log("FooFoo");
\end{minted}
\end{document}
This gives me the following output:
However, I want to have the following result:
1 | /* My Code: */
...|
128| console.log("Hello");
...|
188| console.log("World");
189| console.log("FooBar");
...|
201| console.log("BarFoo");
202| console.log("FooFoo");
How can this be done?


minted? – John Doe Jul 19 '17 at 15:49\theFancyVerbLineis local so you can do it inside any existing group (eg if this is infigureor just surround by{ ..renewcommand...begin minted ...end minted ...}so it is restored at the}– David Carlisle Jul 19 '17 at 15:58