This is the official manual for the latest Org-mode release.
In addition to syntax defined in Literal examples, names and captions
(see Images and tables), source blocks also accept two additional
You may set the former to
t: if you want to make the source block a float. It is the default value when a caption is provided.
multicolumn: if you wish to include a source block which spans multiple columns in a page.
nil: if you need to avoid any floating environment, even when a caption is provided. It is useful for source code that may not fit in a single page.
#+ATTR_LATEX: :float nil #+BEGIN_SRC emacs-lisp Code that may not fit in a single page. #+END_SRC
The latter allows to specify options relative to the package used to
highlight code in the output (e.g.,
listings). This is the local
org-latex-minted-options variables, which see.
#+ATTR_LATEX: :options commentstyle=\bfseries #+BEGIN_SRC emacs-lisp (defun Fib (n) ; Count rabbits. (if (< n 2) n (+ (Fib (- n 1)) (Fib (- n 2))))) #+END_SRC