-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Labels
Description
I have been annotating a lot of code in a LaTeX document recently using the method outlined in this Tex Stack Exchange post. But when working with this method it is a bit cumbersome to work with - adding the reference to a list of highlighted lines manually. Could I suggest some different syntax for achieving this?
\begin{document}
\begin{minted}[
linenos=true,
escapeinside=!!,
highlightlabels,
]{c++}
i = i + 1 ;
j = j + 1 ; !\label{myline}!
k = k + 1 ;
l = l + 1 ; !\label{yourline}!
\end{minted}
The important lines are line~\ref{myline} and line\ref{yourline}.The minted package should be able to figure out what lines need highlighting purely based off the lines inside the code block - without requiring them to be defined separately.