Please consider the following code:
\documentclass{article}
\usepackage{minted}
\begin{document}
\begin{minted}[mathescape=true]{text}
$A\wedge B$
\end{minted}
\end{document}
When I try to compile this code using XeLaTeX (other engines not tested),
I receive the verbatim output $A\wedge B$
instead of the mathematical
equivalent. Can someone point me in the right direction, since this
example follows the instructions of the minted manual? The code has
been tested with minted v2.
Best Answer
That's the expected result since, according to the minted (
v2.0 from 2015/01/31
) documentation,mathescape=true
enables LaTeX math mode inside comments. Outside comments you can useescapeinside
(beware that this requires Pygments version 2.0+):The result (using Pygments 2.0.2):