0

By default a code such as this in org-mode

[[foo.pdf]]

will produce the following code in the exported .tex document

\begin{center}
\includegraphics[width=.9\linewidth]{foo.pdf}
\end{center}

How can I stop org-mode's exporter from adding the \begin{center} \end{center} environment. I am using the memoir class and I'd rather use \centerfloat.

1 Answer 1

0

Use

#+ATTR_LATEX: :center nil
...

Do C-h i g(org)Images in LaTeX export where you'll find this:

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 ‘nil’.

as well as more information about other possible attributes.

4
  • Hello Nick, thank you for the answer and for the tip on Info. I keep forgetting about it and I search on the web instead. But Info is sooo easy to use... Don't know why g doesn't work though. It happens in the most general index. When I move to Org Mode g does work and with it I can choose the node I want.
    – Daniel
    Commented Nov 5, 2021 at 14:52
  • C-h i starts up Info but you may have started it already, in which case it goes to whatever Info node you were looking at last. g goes from whatever Info page you are currently on, to the top Info page you specify in the parenthesized part. So if you are looking at some Info page on e.g. emacs and you say g(org), you will end up at the top level page of the Org manual. If you say g(org)Images in latex export you will end up on that section.
    – NickD
    Commented Nov 5, 2021 at 15:00
  • I see, but from C-h i, i.e., for Info itself you can't use g to navigate thru the different entries there, i.e., from auto-indent-mode (within or under Emacs) to Ledger3 (within or under User Applications).
    – Daniel
    Commented Nov 6, 2021 at 10:44
  • Yes, yoiu can (or you should be able to). Now I don't see a node called auto-indent-mode under Emacs, but if I am at, say, Choosing File modes and I type C-h i g(ledger3)Keeping a journal I end up at the right place (and there is completion along the way: C-h i g(le TAB)Ke TAB a TAB does the same thing).
    – NickD
    Commented Nov 6, 2021 at 13:01

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.