1

My images are floating much more than I'd like. I'd like to force them to be where I tell them to be more like

\begin{figure}[!htb]
  \centering
   \includegraphics[width=0.75\textwidth, keepaspectratio]{./image.png}
\end{figure}

What I currently have is this, which does not seem to be doing it:

#+ATTR_LATEX: ::placement {!htb}{0.75\textwidth}
[[./image.png]]

What's the correct syntax to anchor my images where I say like exclamation point does?

1 Answer 1

4

The correct syntax is

#+ATTR_LATEX: :placement [!htb]{0.75\textwidth}
[[./image.png]]

Note that the attributes are specified by a single colon followed by the name of the attribute (e.g. :placement or :width) and the value of the argument is copied verbatim into the appropriate place in the exported latex file (hence [!htb], not {!htb}, since LaTeX figures take that specification as an option, not as an argument).

A valuable debugging technique in such cases is to export to a LaTeX file and then examine the LaTeX file in an editor (presumably emacs :-) ) to see what was produced.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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