From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Leduc Subject: Re: LaTeX export: images subplots Date: Fri, 13 Sep 2013 03:32:40 +0000 Message-ID: References: , , , Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_869c2bbe-6764-44a6-ad7f-4f7471bc954f_" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKK7l-0002QK-3X for emacs-orgmode@gnu.org; Thu, 12 Sep 2013 23:32:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKK7e-0007O1-3b for emacs-orgmode@gnu.org; Thu, 12 Sep 2013 23:32:49 -0400 Received: from blu0-omc4-s4.blu0.hotmail.com ([65.55.111.143]:56068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKK7d-0007Nt-V9 for emacs-orgmode@gnu.org; Thu, 12 Sep 2013 23:32:42 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Hendy Cc: "emacs-orgmode@gnu.org" --_869c2bbe-6764-44a6-ad7f-4f7471bc954f_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks for all suggestions. I will probably stick with the solution of gene= rating the panels with imagemagick and then including them as figures [[pan= el.png]]. Regards=2C Martin > Date: Wed=2C 11 Sep 2013 22:19:57 -0500 > Subject: Re: [O] LaTeX export: images subplots > From: jw.hendy@gmail.com > To: mart_00@hotmail.com > CC: emacs-orgmode@gnu.org >=20 > On Wed=2C Sep 11=2C 2013 at 10:13 PM=2C Martin Leduc wrote: > > Hi John=2C > > this solution using tables was indeed inspired from your post=2C I a= m so > > sorry=2C I should have refered to it... > > >=20 > Ha! No problem at all -- small mailing list world :) >=20 > > I suppose that the feature has not been implemented yet. I am now think= ing > > of generating a panel with imagemagick before including it in the org > > buffer=2C for example with > > > > #+begin_src sh > > convert +append image1.png image2.png panel.png > > #+end_src > > > > and hence > > > > #+CAPTION: > > [[panel.png]] >=20 > What in the wide world of sports!? That's amazing and I can't believe > I've never run into that. Sooo flipping handy. I've been looking for > an easy way to do this with dissimilar ggplot2 plots where facetting > is hard or doesn't make sense as well: > - Like this: http://stackoverflow.com/questions/18046051/setting-individu= al-axis-limits-with-facet-wrap-and-scales-free-in-ggplot2 >=20 > That's pretty awesome and I just tried it=3B works beautifully. >=20 > Then again=2C I think handling images in Org tables would be just > fantastic. Not need for an external program or the compile time. > Perhaps a bit tricky as one would have to infer from some #+attr_latex > property that one wanted to apply some size parameter to every > [option] box of the converted \includegraphics line... >=20 > In any case=2C thanks for this and I'll keep that in mind. Hopefully > others chime in. >=20 >=20 > John >=20 > > > > to have the two images side by side both in the buffer (with C-cxv) and= the > > latex pdf (within a figure environment). > > > > Is there a cleaner org solution that I would have missed ? > > Thanks again=2C > > Martin > > > >> Date: Wed=2C 11 Sep 2013 21:47:08 -0500 > >> Subject: Re: [O] LaTeX export: images subplots > >> From: jw.hendy@gmail.com > >> To: mart_00@hotmail.com > >> CC: emacs-orgmode@gnu.org > >> > >> On Wed=2C Sep 11=2C 2013 at 8:56 PM=2C Martin Leduc wrote: > >> > Hi all=2C > >> > I am using org-mode to write a report with several figures. I would = like > >> > to group some images into a same figure=2C let say a 2x2 panel. I kn= ow > >> > that I > >> > can directly embed latex code in my org file=2C for example by using= the > >> > subfloats (from the latex subfig package). > >> > > >> > However=2C I would prefer to use an org-based solution of inserting = the > >> > image > >> > links in order to keep the convenient way of previewing images right > >> > into > >> > the buffer with C-c C-x C-v. > >> > > >> > The only solution I found is by using tables such as: > >> > > >> > #+CAPTION: Insert caption here. > >> > #+ATTR_LATEX: :align p{0.5\textwidth}p{0.5\textwidth} > >> > | [[pathtoimage]] | [[pathtoimage]] | > >> > | [[pathtoimage]] | [[pathtoimage]] | > >> > > >> > where the size of the images is controled by p{} and C-cxv is workin= g. > >> > However=2C in the exported TeX file=2C it is a table=2C not a figure= . Is there > >> > a > >> > cleaner way to make image panels that would preserve the figure > >> > environment > >> > in the exported TeX file ? > >> > >> Just wanted to cite my similar (same?) question from a bit back: > >> - http://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg01800.htm= l > >> > >> The only suggest I got was to use the subfig package=2C which may > >> actually be something like what you're looking for. > >> > >> I guess p{width} /could/ work for what I was going for=2C but I will > >> often stagger images and my own "captions" via the org table: > >> > >> #+ATTR_LATEX: :align p{0.5\textwidth}p{0.5\textwidth} > >> | [[pathtoimage]] | [[pathtoimage]] | > >> | /blah blah/ | /blah blah/ | > >> | | | > >> | [[pathtoimage]] | [[pathtoimage]] | > >> | /blah blah/ | /blah blah/ | > >> | | | > >> > >> I don't like using p{} because everything is left aligned and I like > >> to center the images and the "caption" text below each one. > >> Unfortunately=2C there's no centered equivalent to p{}. Thus=2C I end = up > >> using \includegraphics[widt]{} manually. > >> > >> Anyway=2C sorry if that's off-topic. Just wanted to voice that I have = a > >> use for this general sort of thing as well. Heck=2C I think even > >> applying the beamer columns principle to LaTeX article classes would > >> work and be quite neat. > >> > >> > >> Thanks=2C > >> John > >> > >> > > >> > Thanks a lot=2C > >> > Martin > >> > > >> > = --_869c2bbe-6764-44a6-ad7f-4f7471bc954f_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Thanks for all suggestions. I wi= ll probably stick with the solution of generating the panels with imagemagi= ck and then including them as figures [[panel.png]].

Regards=2C
M= artin

>=3B Date: Wed=2C 11 Sep 2013 22:19:57 -0500
>=3B = Subject: Re: [O] LaTeX export: images subplots
>=3B From: jw.hendy@gma= il.com
>=3B To: mart_00@hotmail.com
>=3B CC: emacs-orgmode@gnu.or= g
>=3B
>=3B On Wed=2C Sep 11=2C 2013 at 10:13 PM=2C Martin Leduc= <=3Bmart_00@hotmail.com>=3B wrote:
>=3B >=3B Hi John=2C
>= =3B >=3B this solution using tables was indeed inspired from your post= =2C I am so
>=3B >=3B sorry=2C I should have refered to it...
>= =3B >=3B
>=3B
>=3B Ha! No problem at all -- small mailing list= world :)
>=3B
>=3B >=3B I suppose that the feature has not be= en implemented yet. I am now thinking
>=3B >=3B of generating a pane= l with imagemagick before including it in the org
>=3B >=3B buffer= =2C for example with
>=3B >=3B
>=3B >=3B #+begin_src sh
&g= t=3B >=3B convert +append image1.png image2.png panel.png
>=3B >= =3B #+end_src
>=3B >=3B
>=3B >=3B and hence
>=3B >=3B<= br>>=3B >=3B #+CAPTION:
>=3B >=3B [[panel.png]]
>=3B
&g= t=3B What in the wide world of sports!? That's amazing and I can't believe<= br>>=3B I've never run into that. Sooo flipping handy. I've been looking = for
>=3B an easy way to do this with dissimilar ggplot2 plots where fa= cetting
>=3B is hard or doesn't make sense as well:
>=3B - Like t= his: http://stackoverflow.com/questions/18046051/setting-individual-axis-li= mits-with-facet-wrap-and-scales-free-in-ggplot2
>=3B
>=3B That's= pretty awesome and I just tried it=3B works beautifully.
>=3B
>= =3B Then again=2C I think handling images in Org tables would be just
&g= t=3B fantastic. Not need for an external program or the compile time.
&g= t=3B Perhaps a bit tricky as one would have to infer from some #+attr_latex=
>=3B property that one wanted to apply some size parameter to every>=3B [option] box of the converted \includegraphics line...
>=3B <= br>>=3B In any case=2C thanks for this and I'll keep that in mind. Hopefu= lly
>=3B others chime in.
>=3B
>=3B
>=3B John
>= =3B
>=3B >=3B
>=3B >=3B to have the two images side by side = both in the buffer (with C-cxv) and the
>=3B >=3B latex pdf (within = a figure environment).
>=3B >=3B
>=3B >=3B Is there a cleaner= org solution that I would have missed ?
>=3B >=3B Thanks again=2C>=3B >=3B Martin
>=3B >=3B
>=3B >=3B>=3B Date: Wed=2C= 11 Sep 2013 21:47:08 -0500
>=3B >=3B>=3B Subject: Re: [O] LaTeX e= xport: images subplots
>=3B >=3B>=3B From: jw.hendy@gmail.com
&= gt=3B >=3B>=3B To: mart_00@hotmail.com
>=3B >=3B>=3B CC: emacs= -orgmode@gnu.org
>=3B >=3B>=3B
>=3B >=3B>=3B On Wed=2C Se= p 11=2C 2013 at 8:56 PM=2C Martin Leduc <=3Bmart_00@hotmail.com>=3B wro= te:
>=3B >=3B>=3B >=3B Hi all=2C
>=3B >=3B>=3B >=3B I= am using org-mode to write a report with several figures. I would like
= >=3B >=3B>=3B >=3B to group some images into a same figure=2C let s= ay a 2x2 panel. I know
>=3B >=3B>=3B >=3B that I
>=3B >= =3B>=3B >=3B can directly embed latex code in my org file=2C for exampl= e by using the
>=3B >=3B>=3B >=3B subfloats (from the latex subf= ig package).
>=3B >=3B>=3B >=3B
>=3B >=3B>=3B >=3B Ho= wever=2C I would prefer to use an org-based solution of inserting the
&g= t=3B >=3B>=3B >=3B image
>=3B >=3B>=3B >=3B links in order= to keep the convenient way of previewing images right
>=3B >=3B>= =3B >=3B into
>=3B >=3B>=3B >=3B the buffer with C-c C-x C-v.<= br>>=3B >=3B>=3B >=3B
>=3B >=3B>=3B >=3B The only soluti= on I found is by using tables such as:
>=3B >=3B>=3B >=3B
>= =3B >=3B>=3B >=3B #+CAPTION: Insert caption here.
>=3B >=3B>= =3B >=3B #+ATTR_LATEX: :align p{0.5\textwidth}p{0.5\textwidth}
>=3B = >=3B>=3B >=3B | [[pathtoimage]] | [[pathtoimage]] |
>=3B >=3B&= gt=3B >=3B | [[pathtoimage]] | [[pathtoimage]] |
>=3B >=3B>=3B &= gt=3B
>=3B >=3B>=3B >=3B where the size of the images is control= ed by p{} and C-cxv is working.
>=3B >=3B>=3B >=3B However=2C in= the exported TeX file=2C it is a table=2C not a figure. Is there
>=3B= >=3B>=3B >=3B a
>=3B >=3B>=3B >=3B cleaner way to make im= age panels that would preserve the figure
>=3B >=3B>=3B >=3B env= ironment
>=3B >=3B>=3B >=3B in the exported TeX file ?
>=3B= >=3B>=3B
>=3B >=3B>=3B Just wanted to cite my similar (same?)= question from a bit back:
>=3B >=3B>=3B - http://lists.gnu.org/ar= chive/html/emacs-orgmode/2013-03/msg01800.html
>=3B >=3B>=3B
&g= t=3B >=3B>=3B The only suggest I got was to use the subfig package=2C w= hich may
>=3B >=3B>=3B actually be something like what you're look= ing for.
>=3B >=3B>=3B
>=3B >=3B>=3B I guess p{width} /co= uld/ work for what I was going for=2C but I will
>=3B >=3B>=3B oft= en stagger images and my own "captions" via the org table:
>=3B >=3B= >=3B
>=3B >=3B>=3B #+ATTR_LATEX: :align p{0.5\textwidth}p{0.5\te= xtwidth}
>=3B >=3B>=3B | [[pathtoimage]] | [[pathtoimage]] |
&g= t=3B >=3B>=3B | /blah blah/ | /blah blah/ |
>=3B >=3B>=3B | | = |
>=3B >=3B>=3B | [[pathtoimage]] | [[pathtoimage]] |
>=3B &g= t=3B>=3B | /blah blah/ | /blah blah/ |
>=3B >=3B>=3B | | |
&g= t=3B >=3B>=3B
>=3B >=3B>=3B I don't like using p{} because eve= rything is left aligned and I like
>=3B >=3B>=3B to center the ima= ges and the "caption" text below each one.
>=3B >=3B>=3B Unfortuna= tely=2C there's no centered equivalent to p{}. Thus=2C I end up
>=3B &= gt=3B>=3B using \includegraphics[widt]{} manually.
>=3B >=3B>=3B=
>=3B >=3B>=3B Anyway=2C sorry if that's off-topic. Just wanted to= voice that I have a
>=3B >=3B>=3B use for this general sort of th= ing as well. Heck=2C I think even
>=3B >=3B>=3B applying the beame= r columns principle to LaTeX article classes would
>=3B >=3B>=3B w= ork and be quite neat.
>=3B >=3B>=3B
>=3B >=3B>=3B
>= =3B >=3B>=3B Thanks=2C
>=3B >=3B>=3B John
>=3B >=3B>= =3B
>=3B >=3B>=3B >=3B
>=3B >=3B>=3B >=3B Thanks a lo= t=2C
>=3B >=3B>=3B >=3B Martin
>=3B >=3B>=3B >=3B
= >=3B >=3B>=3B >=3B
= --_869c2bbe-6764-44a6-ad7f-4f7471bc954f_--