ox-latex: support :float nil with caption for minted listings
commit200eeb572318a3b8c02beb2e35e7df025d02dfea
authorAaron Ecay <aaronecay@gmail.com>
Sat, 23 Aug 2014 07:16:11 +0000 (23 03:16 -0400)
committerAaron Ecay <aaronecay@gmail.com>
Tue, 23 Sep 2014 02:46:26 +0000 (22 22:46 -0400)
tree0a7959516d80728e5d52b2d41ee23d57cb436af2
parenta24ac01cd53646fa0f622b998cdbddf8787a1713
ox-latex: support :float nil with caption for minted listings

* lisp/ox-latex.el (org-latex-src-block): Support :float nil with
caption for minted.
(org-latex-listings): Edit docstring to describe this usecase.
* lisp/org.el (org-latex-default-packages-alist): Add “capt-of”
package.

This takes advantage of the capt-of package’s \captionof command,
which allows to insert a caption (with autogenerated number and
\ref-able label) without creating a floating environment.  One example
of where this is useful is in the case of a minted source code listing
that spans more than one page.  (Latex floats can’t be larger than a
page, generally speaking.)

The listings package already handles this case using its own mechanism.
etc/ORG-NEWS
lisp/org.el
lisp/ox-latex.el