0

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?

1
  • 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
1

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.

enter image description here

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.