2

What's going on here?

\documentclass{article}
\usepackage{minted}

\begin{document}

% I want to show the output as latex, this is a minimal repro without any output at all
\begin{minted}[escapeinside=QQ,python3=true]{pycon}
>>> g = str('e_x e_y e_z')
\end{minted}

% works fine otherwise
\begin{minted}[python3=true]{pycon}
>>> g = str('e_x e_y e_z')
\end{minted}

\end{document}

gives

enter image description here

Why did the g = str( get removed?

1

This is a pygments bug, and out of the control of minted: https://github.com/pygments/pygments/issues/1516.

Edit: PR to fix this here: https://github.com/pygments/pygments/pull/1517

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.