1

\mintinline inside of an environment created by \NewEnviron of environ package seems to be strange. There are some unintended blank spaces, after the macros followed by \.

result

What should I do to fix it?

MWE:

\documentclass[11pt,a4paper]{book}
\usepackage{minted}
\usepackage{environ}
\usemintedstyle{manni}

\begin{document}
\NewEnviron{Par}{%
    \BODY%
}

\begin{Par}
    \mintinline{latex}{\usepackage{stackoverflow}\no\space\in\code}
\end{Par}
\end{document}

add: \def\c{\mintinline{latex}{\macros\something}} \c produces the same error. So is it a problem related verbatim-like things?

  • Do you really need environ? Why don't use minted environment? – Sigur Dec 28 '18 at 13:00
  • @Sigur, I wanted to put some texts and codes (and other things also) inside an environment. Though I have some alternatives like using \newenvironment instead, now I am curious about what causes those problems. Moreover, without considering environments, it makes problems within \def. So there might be some cases where I should think about another solution... – Kanu Kim Dec 28 '18 at 13:10
  • 1
    It's not possible to use \mintinline in the argument to a macro, including environments defined with \NewEnviron. It's quite likely that the problem can be solved with a standard environment. Please, write down the specifications. – egreg Dec 28 '18 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.