Skip to main content

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 ( 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

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}

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:


For a standard β€˜figure’ environment; used by default whenever an image has a caption.


To span the image across multiple columns of a page; the back-end wraps the image in a β€˜figure*’ environment.


For text to flow around the image on the right; the figure occupies the left half of the page.


For a new page with the image sideways, rotated ninety degrees, in a β€˜sidewaysfigure’ environment; overrides β€˜:placement’ setting.


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}

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.