Suppose I want to have the same image attributes for HTML and LATEX export I have to specify them twice as in the following example:

#+CAPTION: Example image
#+ATTR_HTML: :align center :width 100px
#+ATTR_LATEX: :align center :width 100px

Is there also a way to specify the attributes just once such that it applies automatically to both HTML and LATEX export.

  • My first idea is a macro definition such as: #+MACRO: newline src_emacs-lisp[:results raw]{"\n"} #+MACRO: mywidth #+ATTR_LATEX: :align center :width 100p {{{newline}}}#+ATTR_HTML: :align center :width 100p, but which produces something like this on export: \includegraphics[width=100p {{{newline}}}#+ATTR_HTML:]{image.png} – Singulaere Entitaet Aug 27 '17 at 21:18

Your Answer

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

Browse other questions tagged or ask your own question.