I just started using the minted
package. When I insert tabs as indentation, it gives me a bunch of characters instead:
However, when I copy the example from the documentation it seems to work fine. I tried experimenting with the obeytabs
and showtabs
options but I can't get rid of the characters. I'm using xelatex
with TexLive 2011 in TexShop. All files are up to date.
Here's a MWE (please note as pointed out in the comments that the indentation in the code is supposed to be tabs and not spaces):
\documentclass{article}
\usepackage{minted}
\newminted{python}{linenos}
\begin{document}
\begin{minted}[linenos]{python}
def all(iterable):
for i in iterable:
if not i:
return False
return True
\end{minted}
\end{document}
Edit: I noticed something strange: When I change the typesetting engine back to pdflatex
, it seems to be working, but then I can't load the fontspec
package. So I guess this is related to xelatex
?
I'm using xelatex --file-line-error --shell-escape --synctex=1
xelatex -shell-escape myfile.tex
?xelatex --file-line-error --shell-escape --synctex=1
\listfiles
produces in your log, so we can see file versions?