This is the official manual for the latest Org-mode release.

Table of Contents

Next: , Previous: Plain lists in LaTeX export, Up: LaTeX export

12.10.8 Source blocks in LaTeX export

In addition to syntax defined in Literal examples, names and captions (see Images and tables), source blocks also accept two additional attributes: :float and :options.

You may set the former to

     #+ATTR_LATEX: :float nil
     #+BEGIN_SRC emacs-lisp
     Code that may not fit in a single page.

The latter allows to specify options relative to the package used to highlight code in the output (e.g., listings). This is the local counterpart to org-latex-listings-options and 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)))))