-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Escapeinside and Console Lexers #267
Comments
Never mind, I think I deduced that this comes from pygmentize, after reading how to use escapeinside on pygmentize directly in #262.
Feel free to close this. |
There are a combination of issues here.
I'll close this once I decide if the documentation needs an additional note about this case. |
The specific Running following example on overleaf.com (remember to use "Recompile from scratch" after switching to another TeX Live version),
\documentclass{article}
\usepackage{minted}
\begin{document}
\begin{itemize}
\item \fmtname, \fmtversion
\item \csname [email protected]\endcsname
\item \input{|pygmentize -V}
\end{itemize}
Valid input
\begin{minted}[escapeinside=||]{pycon}
>>> def f(x): y = x|\colorbox{green}{**}|2; return y
\end{minted}
Invalid input
\begin{minted}[escapeinside=||]{pycon}
>>> def f(x): y = x|\colorbox{green}{**}|2
... return y
\end{minted}
\end{document} Related issue in pygments' repo is pygments/pygments#1516, which has been fixed since v2.7.2. |
I just came across this strange behavior of escapeinside in conjunction with console lexers (like
ps1con
orbatcon
)When using the snipped from the manual and swapping the lexer the output eats the beginning of the line (and things - like the prompt - from previous lines, if not in the first):
I also tried to use different escapeinside characters, like
`
or$
.PS: I was of course using
minted
and notmínted
, but did not know how to have\end{minted}
inside a minted environment :) .The text was updated successfully, but these errors were encountered: