13.10.6 Images in LaTeX export
The LaTeX export back-end processes image links in Org files that do not have descriptions, such as these links β[[file:img.jpg]]
β or β[[./img.jpg]]
β, as direct image insertions in the final PDF output. In the PDF, they are no longer links but actual images embedded on the page. The LaTeX export back-end uses β\includegraphics
β macro to insert the image. But for TikZ (http://sourceforge.net/projects/pgf/) images, the back-end uses an \input
macro wrapped within a tikzpicture
environment.
For specifying image β:width
β, β:height
β, β:scale
β and other β:options
β, use this syntax:
#+ATTR_LATEX: :width 5cm :options angle=90
[[./img/sed-hr4049.pdf]]
A β:scale
β attribute overrides both β:width
β and β:height
β attributes.
For custom commands for captions, use the β:caption
β attribute. It overrides the default β#+CAPTION
β value:
#+ATTR_LATEX: :caption \bicaption{HeadingA}{HeadingB}
[[./img/sed-hr4049.pdf]]
When captions follow the method as described in Captions, the LaTeX export back-end wraps the picture in a floating βfigure
β environment. To float an image without specifying a caption, set the β:float
β attribute to one of the following:
βt
ββ
For a standard βfigure
β environment; used by default whenever an image has a caption.
βmulticolumn
ββ
To span the image across multiple columns of a page; the back-end wraps the image in a βfigure*
β environment.
βwrap
ββ
For text to flow around the image on the right; the figure occupies the left half of the page.
βsideways
ββ
For a new page with the image sideways, rotated ninety degrees, in a βsidewaysfigure
β environment; overrides β:placement
β setting.
βnil
ββ
To avoid a β:float
β even if using a caption.
Use the βplacement
β attribute to modify a floating environmentβs placement.
#+ATTR_LATEX: :float wrap :width 0.38\textwidth :placement {r}{0.4\textwidth}
[[./img/hst.png]]
The LaTeX export back-end centers all images by default. Setting β:center
β to βnil
β disables centering. To disable centering globally, set org-latex-images-centered
to βt
β.
Set the β:comment-include
β attribute to non-nil
value for the LaTeX export back-end to comment out the β\includegraphics
β macro.