emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Exporting multiple images in a float (LaTeX)
@ 2015-08-06 16:42 Suvayu Ali
  2015-08-06 22:27 ` Rasmus
  0 siblings, 1 reply; 13+ messages in thread
From: Suvayu Ali @ 2015-08-06 16:42 UTC (permalink / raw)
  To: Emacs Org mode

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.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-08-10 12:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-06 16:42 Exporting multiple images in a float (LaTeX) Suvayu Ali
2015-08-06 22:27 ` Rasmus
2015-08-06 22:31   ` Rasmus
2015-08-07  4:24     ` Suvayu Ali
2015-08-07 13:28       ` Eric S Fraga
2015-08-07 14:14         ` Suvayu Ali
2015-08-07 14:23           ` Rasmus
2015-08-07 16:19             ` Eric S Fraga
2015-08-07 17:04               ` Suvayu Ali
2015-08-08 19:23               ` Rasmus
2015-08-08 23:56                 ` Suvayu Ali
2015-08-10 11:59                 ` Eric S Fraga
2015-08-07 17:00             ` Suvayu Ali

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).