9

It is possible to change the figure options for a latex figure in org-mode? Currently I'm using the following to insert a figure in my org document.

#+CAPTION: awesome figure
#+NAME: fig:my-figure
[[file:awesome-figure.png]]

This is exported to

\begin{figure}[htb]
\centering
\includegraphics[ ... ]{awesome-figure.png}
\caption{\label{fig:my-figure}awesome-figure}
\end{figure}

This is already quite good, but it tells latex not to try and enforce the [htb] hints. How can I change it so that latex figures are exported as follows?

\begin{figure}[!htb]
\centering
\inclduegraphics[ ... ]{awesome-figure.png}
\caption{\label{fig:my-figure}awesome-figure}
\end{figure}

The exclamation mark for the figure options is important since it tells latex it should enforce the figure placement.

11

Modify org-latex-default-figure-position to change the default, or use the following on the specific elements,

 #+attr_latex: :placement [!tbh]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.