8

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 ?

11

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

3
  • Indeed, thanks for that. I should have read the manual and not skimmed through the titles. /me feels stupid. – Gyom Dec 31 '10 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. – Andreï Kostyrka Nov 7 '16 at 3:36
  • Yes, not obvious at all, unless you spend hours to read the entire thing through. Thanks – Tobia Feb 23 '17 at 18:12
5

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.)

2
  • 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.) – Stephen Bosch Sep 21 '13 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. – Konrad Rudolph Sep 21 '13 at 18:34

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.