Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

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

share|improve this answer
    
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
add comment

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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