# Is it possible to hide some line numbers in the minted environment?

With the following code:

\begin{text}{minted}
a
b
c
d
e
\end{minted}


Is it possible to have line numbers for only b and c?

• It would appear this is not possible directly via minted (since there doesn't appear to be any configuration options for this looking at the documentation) – Zach Smith Apr 8 '18 at 9:58

Just an idea you possibly haven't think:

\documentclass[a4paper,12pt]{report}
\usepackage{minted}
\begin{document}
\begin{minted}{text}
a
\end{minted}
\vspace{-26pt}
\begin{minted}[linenos]{text}
b
c
\end{minted}
\vspace{-26pt}
\begin{minted}{text}
d
e
\end{minted}
\end{document}


Feel free to ask me to delete.

PS: The d is missing because forgot the second argument of second environment.. fixed in code.

• that'll work for me! – Zach Smith Apr 8 '18 at 20:42