How can I use different image formats for different exhibits in org mode?

I would like to include inline images in my documents in org-mode, but I really need png to export HTML and pdf to export LaTeX to make it look decent. Is there any way to express this?

+4
source share
1 answer

I got an answer in irc, which worked fine for me.

#+ATTR_LaTeX: width=0.38\textwidth wrap placement={r}{0.4\textwidth} #+ATTR_HTML: alt="old index mech" title="Old index mech" align="right" #+begin_src emacs-lisp :exports results :results value raw (case (and (boundp 'backend) backend) (nil "") (latex "[[file:img/indexing-old.pdf]]") (html "[[file:img/indexing-old.png]]")) #+end_src 

This selects the backend-based link when exporting while retaining the HTML and LaTeX attributes. Seems pretty simple.

+4
source

All Articles