I have some lines in a verbatim environment
...
\begin{verbatim}
line 1
* line 2
line 3
* line 4
line 5
\end{verbatim}
...
at the beginning of some lines I want to add a number in superscript. I've indicated that with asterisks now. How can I do this?
Best Answer
You could use the
numbers
option from thefancyvrb
package:If the numbers must appear as superscript, add the following to the preamble:
Now that the original question has been edited, you can use the
commandchars
option to introduce escape sequences in verbatim code: