Is there a way to override default options for the minted environment, rather than having to specify them for each and every snippet of code ?

In other words, is there an equivalent to listings's \lstset command ?

AFAIK the minted package is based on fancyvrb, but I couldn't find anything in there either (I don't really read tex so I only looked at the documentation)

Bonus question: why is there so much blank space (about two blank lines) after a minted listing ?

2 Answers 2


\fvset{..} mentioned in the documentation several times ...

  • Indeed, thanks for that. I should have read the manual and not skimmed through the titles. /me feels stupid.
    – Gyom
    Commented Dec 31, 2010 at 13:19
  • 2
    But not in the main section; it is mentioned only in the source code without any actual examples, so it is not obvious at all. Commented Nov 7, 2016 at 3:36
  • Yes, not obvious at all, unless you spend hours to read the entire thing through. Thanks
    – Tobia
    Commented Feb 23, 2017 at 18:12

Bonus question: why is there so much blank space (about two blank lines) after a minted listing ?

This has already been asked – and answered – on Stack Overflow.

As for minted having presets, besides the obvious \fvset, it doesn’t. The rationale was that you would usually define a language-specific shortcut of the minted commands for each language that you use (which usually shouldn’t be that many anyway), as explained in chapter 6 of the documentation.

(And the fact that the minted doc doesn’t mention \fvset is arguably a documentation bug. Perhaps some day I’ll come round to doing a new release.)

  • I couldn't find a reference to \fvset in the documentation either. Why does @Herbert claim that it is mentioned there? (I also cannot get \fvset{} to work.) Commented Sep 21, 2013 at 17:54
  • @StephenBosch Probably just an honest mistake. The minted documentation does mention somewhere that it’s built on top of fancyvrb, and its documentation mentions \fvset. Commented Sep 21, 2013 at 18:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .