emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Exporting multiple images in a float (LaTeX)


From: Suvayu Ali
Subject: [O] Exporting multiple images in a float (LaTeX)
Date: Thu, 6 Aug 2015 18:42:08 +0200
User-agent: Mutt/1.5.23.1 (2014-03-12)

Hi,

Is there an easy way to export multiple images wrapped in a single
floating environment (e.g. figure) when exporting to LaTeX?  For how
many years I have been doing this:

  #+name: fig:myfig1
  #+caption: This is a single figure, entered in the usual way.
  file:myfig1.pdf

  #+begin_latex
  \begin{figure}[htb]
    \centering
    \includegraphics[width=0.8\linewidth]{myfig2.pdf}
    \includegraphics[width=0.8\linewidth]{myfig3.pdf}
    \caption{\label{fig:myfig23} Two images in one floating environment.}
  \end{figure}
  #+end_latex

It would be great if I could avoid the LaTeX block for the second case.
An intuitive way might be, when two figures are not separated by empty
lines, treat them as part of the same float.  The above would translate
to:

  #+name: fig:myfig23
  #+caption: Two images in one floating environment.
  #+attr_latex: :width 0.8\linewidth
  file:myfig2.pdf
  file:myfig3.pdf

Presently the above is exported as:

  \begin{figure}[htb]
    \centering
    \includegraphics[width=.8\linewidth]{myfig2.pdf}
    \caption{\label{fig:myfig23} Two images in one floating environment.}
  \end{figure}
  \begin{figure}[htb]
    \centering
    \includegraphics[width=.8\linewidth]{myfig3.pdf}
    \caption{\label{fig:myfig23} Two images in one floating environment.}
  \end{figure}

Actually, the above could probably be considered incorrect.  The figures
have the same caption and labels, which is for all practical purposes
incorrect.  Am I missing something?  Is my "expectation" reasonable?

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]