Re: [O] Exporting multiple images in a float (LaTeX)
On Saturday, 8 Aug 2015 at 21:23, Rasmus wrote: > But we can insert "%\n" and in the latex end there's no difference between > > \includegraphics[]{}% > \includegraphics[]{}% > > And > > \includegraphics[]{}\includegraphics[]{}% > > To the best of my knowledge. > > Rasmus Indeed but I guess my view is that from the perspective of the org file, two links on the same line are subtly different from two links on separate lines. Whether this matters or not is up for debate of course! I don't actually mind either way as both of the above are usually what I would want. -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3-3-gb5f5d6
Re: [O] Exporting multiple images in a float (LaTeX)
On Sat, Aug 08, 2015 at 09:23:57PM +0200, Rasmus wrote: > Eric S Fraga writes: > > > On Friday, 7 Aug 2015 at 16:23, Rasmus wrote: > > > > [...] > > > >> I guess there would also be no loss from actually inserting a "%" after > >> \includegraphics[·]{·} in ox-latex. > > > > Except that then the suggestion I just made would not work and would in > > fact be quite confusing as the second figure would be lost in the > > export? > > But we can insert "%\n" and in the latex end there's no difference between > > \includegraphics[]{}% > \includegraphics[]{}% > > And > > \includegraphics[]{}\includegraphics[]{}% > > To the best of my knowledge. I think you are correct! -- Suvayu Open source is the future. It sets us free.
Re: [O] Exporting multiple images in a float (LaTeX)
Eric S Fraga writes: > On Friday, 7 Aug 2015 at 16:23, Rasmus wrote: > > [...] > >> I guess there would also be no loss from actually inserting a "%" after >> \includegraphics[·]{·} in ox-latex. > > Except that then the suggestion I just made would not work and would in > fact be quite confusing as the second figure would be lost in the > export? But we can insert "%\n" and in the latex end there's no difference between \includegraphics[]{}% \includegraphics[]{}% And \includegraphics[]{}\includegraphics[]{}% To the best of my knowledge. Rasmus -- Slowly unravels in a ball of yarn and the devil collects it
Re: [O] Exporting multiple images in a float (LaTeX)
On Fri, Aug 07, 2015 at 05:19:18PM +0100, Eric S Fraga wrote: > On Friday, 7 Aug 2015 at 16:23, Rasmus wrote: > > [...] > > > I guess there would also be no loss from actually inserting a "%" after > > \includegraphics[·]{·} in ox-latex. > > Except that then the suggestion I just made would not work and would in > fact be quite confusing as the second figure would be lost in the > export? True, I guess the question is which is more natural. file:foo.pdf file:bar.pdf or, [[file:foo.pdf]] [[file:bar.pdf]] One thing I can think of, the second option can be confusing in the Org buffer when you do not want the space in between. -- Suvayu Open source is the future. It sets us free.
Re: [O] Exporting multiple images in a float (LaTeX)
On Fri, Aug 07, 2015 at 04:23:48PM +0200, Rasmus wrote: > Suvayu Ali writes: > > On Fri, Aug 07, 2015 at 02:28:58PM +0100, Eric S Fraga wrote: > >> On Friday, 7 Aug 2015 at 06:24, Suvayu Ali wrote: > >> > >> > This is very nice, thank you! I think this will do it for me. I have a > >> > small question, is there a better way to add a % after the first image > >> > in the above case other than adding a snippet? > >> > > >> > #+begin_figure > >> > #+attr_latex: :width 0.45\linewidth > >> > [[file:myfig2.pdf]]@@l:%@@ > >> > [[file:myfig3.pdf]] > >> > #+end_figure > >> > >> If you want the % simply to have LaTeX ignore the line end, you could > >> put the figures on the same line, such as > >> > >> #+begin_figure > >> #+attr_latex: :width 0.45\linewidth > >> [[file:myfig2.pdf]][[file:myfig3.pdf]] > >> #+end_figure > > > > Cool, that works :). Thanks a lot Eric. > > I guess there would also be no loss from actually inserting a "%" after > \includegraphics[·]{·} in ox-latex. I would agree with that :). -- Suvayu Open source is the future. It sets us free.
Re: [O] Exporting multiple images in a float (LaTeX)
On Friday, 7 Aug 2015 at 16:23, Rasmus wrote: [...] > I guess there would also be no loss from actually inserting a "%" after > \includegraphics[·]{·} in ox-latex. Except that then the suggestion I just made would not work and would in fact be quite confusing as the second figure would be lost in the export? -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-1315-ga3b2b7
Re: [O] Exporting multiple images in a float (LaTeX)
Suvayu Ali writes: > On Fri, Aug 07, 2015 at 02:28:58PM +0100, Eric S Fraga wrote: >> On Friday, 7 Aug 2015 at 06:24, Suvayu Ali wrote: >> > >> [...] >> >> > This is very nice, thank you! I think this will do it for me. I have a >> > small question, is there a better way to add a % after the first image >> > in the above case other than adding a snippet? >> > >> > #+begin_figure >> > #+attr_latex: :width 0.45\linewidth >> > [[file:myfig2.pdf]]@@l:%@@ >> > [[file:myfig3.pdf]] >> > #+end_figure >> >> If you want the % simply to have LaTeX ignore the line end, you could >> put the figures on the same line, such as >> >> #+begin_figure >> #+attr_latex: :width 0.45\linewidth >> [[file:myfig2.pdf]][[file:myfig3.pdf]] >> #+end_figure > > Cool, that works :). Thanks a lot Eric. I guess there would also be no loss from actually inserting a "%" after \includegraphics[·]{·} in ox-latex. -- The second rule of Fight Club is: You do not talk about Fight Club
Re: [O] Exporting multiple images in a float (LaTeX)
On Fri, Aug 07, 2015 at 02:28:58PM +0100, Eric S Fraga wrote: > On Friday, 7 Aug 2015 at 06:24, Suvayu Ali wrote: > > [...] > > > This is very nice, thank you! I think this will do it for me. I have a > > small question, is there a better way to add a % after the first image > > in the above case other than adding a snippet? > > > > #+begin_figure > > #+attr_latex: :width 0.45\linewidth > > [[file:myfig2.pdf]]@@l:%@@ > > [[file:myfig3.pdf]] > > #+end_figure > > If you want the % simply to have LaTeX ignore the line end, you could > put the figures on the same line, such as > > #+begin_figure > #+attr_latex: :width 0.45\linewidth > [[file:myfig2.pdf]][[file:myfig3.pdf]] > #+end_figure Cool, that works :). Thanks a lot Eric. -- Suvayu Open source is the future. It sets us free.
Re: [O] Exporting multiple images in a float (LaTeX)
On Friday, 7 Aug 2015 at 06:24, Suvayu Ali wrote: [...] > This is very nice, thank you! I think this will do it for me. I have a > small question, is there a better way to add a % after the first image > in the above case other than adding a snippet? > > #+begin_figure > #+attr_latex: :width 0.45\linewidth > [[file:myfig2.pdf]]@@l:%@@ > [[file:myfig3.pdf]] > #+end_figure If you want the % simply to have LaTeX ignore the line end, you could put the figures on the same line, such as #+begin_figure #+attr_latex: :width 0.45\linewidth [[file:myfig2.pdf]][[file:myfig3.pdf]] #+end_figure (untested) -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-1315-ga3b2b7
Re: [O] Exporting multiple images in a float (LaTeX)
Hi Rasmus, On Fri, Aug 07, 2015 at 12:31:37AM +0200, Rasmus wrote: > Rasmus writes: > > Suvayu Ali writes: > > > >> #+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 > > > > > > You should probably use subcaption for that. If so see maybe here: > > > > http://thread.gmane.org/gmane.emacs.orgmode/92820 I usually don't need multiple captions, just one caption for a float with multiple very closely related images. > > For archiving the above you could just use a special block > > > > #+caption: foo > > #+attr_latex: :options [htb] > > > > #+begin_figure > > [[file:fig2.png]] > > [[file:fig3.png]] > > #+end_figure This is very nice, thank you! I think this will do it for me. I have a small question, is there a better way to add a % after the first image in the above case other than adding a snippet? #+begin_figure #+attr_latex: :width 0.45\linewidth [[file:myfig2.pdf]]@@l:%@@ [[file:myfig3.pdf]] #+end_figure > Also, note that :float nil now handles captions and that you should be > able to give arbitrary citations commands. Thus, you should be able to > recreate any old latex structure for images. I'm not sure I understand the comment about arbitrary citation commands. Cheers, -- Suvayu Open source is the future. It sets us free.
Re: [O] Exporting multiple images in a float (LaTeX)
Rasmus writes: > Hi, > > Suvayu Ali writes: > >> #+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 > > > You should probably use subcaption for that. If so see maybe here: > > http://thread.gmane.org/gmane.emacs.orgmode/92820 > > For archiving the above you could just use a special block > > #+caption: foo > #+attr_latex: :options [htb] > > #+begin_figure > [[file:fig2.png]] > [[file:fig3.png]] > #+end_figure Also, note that :float nil now handles captions and that you should be able to give arbitrary citations commands. Thus, you should be able to recreate any old latex structure for images. Rasmus -- With monopolies the cake is a lie!
Re: [O] Exporting multiple images in a float (LaTeX)
Hi, Suvayu Ali writes: > #+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 You should probably use subcaption for that. If so see maybe here: http://thread.gmane.org/gmane.emacs.orgmode/92820 For archiving the above you could just use a special block #+caption: foo #+attr_latex: :options [htb] #+begin_figure [[file:fig2.png]] [[file:fig3.png]] #+end_figure Rasmus -- Sådan en god dansk lagereddike kan man slet ikke bruge mere
[O] Exporting multiple images in a float (LaTeX)
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.