4

In org export, I want to place two images side by side. I want them to be side by side in both LaTeX export and HTML export. In the example below, the first pair works for LaTeX and the second pair for HTML but not both.

#+NAME: a
#+BEGIN_SRC dot :file /tmp/a.png
  digraph {
    1 -> 2;
    2 -> 3;
  }
#+END_SRC

#+NAME: b
#+BEGIN_SRC dot :file /tmp/b.png
  digraph {
    1 -> 3;
    2 -> 3;
  }
#+END_SRC

* LaTeX

#+BEGIN_CENTER
#+ATTR_LATEX: :height 0.4\textwidth :center
#+RESULTS: a
[[file:/tmp/a.png]]
#+ATTR_LATEX: :height 0.4\textwidth :center
#+RESULTS: b
[[file:/tmp/b.png]]
#+END_CENTER

* HTML

#+ATTR_HTML: :align center :height 300
[[/tmp/a.png]]
[[/tmp/b.png]]

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.