The following example with a minted enviroment fails with the error message
_minted-test/7587C145B52367AE51CACC4AFB0EC13D2F785CCAC2A2CC760CA216BD1781DF79.pygtex:3: Extra }, or forgotten \endgroup. [ b]
_minted-test/7587C145B52367AE51CACC4AFB0EC13D2F785CCAC2A2CC760CA216BD1781DF79.pygtex:3: Missing } inserted. [ b]
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{minted}
\setminted{obeytabs}
\begin{document}
\begin{minted}[breaklines=true]{text}
a
b
\end{minted}
\end{document}
It works fine after removing one of the following:
- the tab in front of the
b
- the
breaklines=true
- the
\setminted{obeytabs}
Is there an explanation for this behaviour or can this be considered as a bug?
The .pygtex file looks like this, intention is also a tab:
\begin{Verbatim}[commandchars=\\\{\}]
a
b
\end{Verbatim}
- minted requires python and pygments http://pygments.org/docs/cmdline/
- minted requires the -shell-escape flag
- minted docs is here: http://ctan.mirrorcatalogs.com/macros/latex/contrib/minted/minted.pdf
- If you copy/paste the code, it will contain spaces infront of
b
instead of a tab. In order to reproduce this you have to replace it again. Unfortunately, SE seems to auto-replace tabs with spaces(https://meta.stackexchange.com/a/22189/293906). If you know how to use tabs in code blocks, please leave a comment.
minted
release, and will see if I can also fix this.