I'm trying to do a minted \newenvironment I looked at this post new-environment-with-minted, but I would like to know if there's a more simple way to do that, like


In that case, I get a FancyVerbGetLine error As I know, it seems that I should use \CustonVerbatimEnvironment


2 Answers 2


Simply use the \newminted command as introduced in Section 6 of the »minted« manual.


You can use it in the same way as every other environment.

% listing content

Note that the package will append code to the environment name by default as described in the manual.

  • Oh, thanks a lot! I usually I get lost in the manuals with so much information. I'll take a look to that sections :)
    – PerroNoob
    Oct 16, 2013 at 18:26


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.