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

   \includegraphics[width=0.75\textwidth, keepaspectratio]{./image.png}

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

#+ATTR_LATEX: ::placement {!htb}{0.75\textwidth}

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


The correct syntax is

#+ATTR_LATEX: :placement [!htb]{0.75\textwidth}

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.

| improve this answer | |

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.