Closed Try2Code closed 2 years ago
This appears to be caused by beamer
's fragile
mode, so I don't believe there anything that minted
can do about it. Typically we would expected comments %
to work anywhere. However, some environments are specially defined so that nothing is allowed to follow them. I'm not sure if this is a bug, or if this is the way frame
combined with fragile
is designed (in which case it would be nice to have a better error message, if that's possible).
the point is that frames need to be fragile
in order to use minted. So the conclusion is to avoid comments like this in frames with source code, right?
Yes, you can't have comments like this with fragile frames, at least with the way that beamer
currently works.
fancyvrb
, which is used by minted
to provide verbatim envs, also thinks a %
right after \end{Verbatim}
is invalid:
\documentclass{article}
\usepackage{fancyvrb}
\begin{document}
\begin{Verbatim}
content
\end{Verbatim}%
\end{document}
will get error
! FancyVerb Error:
Extraneous input `%\end{}' between \end{Verbatim} and line end
Alright - thx a lot for the fast support @gpoore @muzimuzhi
hi!
I encountered a compilation error that seems to get triggered by simple tex comment starting with '%'
Putting '%' at the end of an existing line (l.6,8,9) leads to an error. putting it to a separate line does not lead to an error. Is this a known limitation? is this a parsing issue? I thought comments like this are normal latex syntax - am I right?