Aaron Ecay writes: > OK, I’ve done some more investigation. By default, minted uses > \newfloat from the float package to create the listing float class. > This does not set up the caption integration. OTOH, adding the newfloat > option to minted uses \DeclareFloatingEnvironment from the newfloat > package, which works. IOW, replacing the relevant line in your MWE with > the following makes it work: > > \usepackage[newfloat]{minted} > > I’m not sure how that should be integrated in the picture – perhaps org > should recommend (require) this invocation of minted. That's weird. The capt-of documentation recommend the float.sty way of adding new environments. >> I guess it doesn't. In any, minted.sty has >> >> \RequirePackage{float} >> >> So we can be sure [H] is available. Thus, we should just rely on >> float. > > But this is an implementation detail of minted, and could change in a > future release. That's a good point. I updated the patches. 1. Rework captions when float is nil and caption is not. Kill usage of [H] as it's the same as a nonfloat. A src block is always a nonfloat unless it is not. 2. Update documentation. 3. Kill float dependency. Does anybody disagree to especially the third change? Otherwise I'll push it. Rasmus -- Together we will make the possible totalllly impossible!