From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: Subfloats in org - easier way? Date: Fri, 21 Nov 2014 14:54:04 +0100 Message-ID: References: <87tx1sspgv.fsf@gmx.us> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrofL-0005iu-SB for emacs-orgmode@gnu.org; Fri, 21 Nov 2014 08:54:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrofG-0004BB-A4 for emacs-orgmode@gnu.org; Fri, 21 Nov 2014 08:54:27 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]:38147) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrofF-0004AC-P2 for emacs-orgmode@gnu.org; Fri, 21 Nov 2014 08:54:22 -0500 Received: by mail-wi0-f172.google.com with SMTP id n3so12045051wiv.5 for ; Fri, 21 Nov 2014 05:54:16 -0800 (PST) In-Reply-To: <87tx1sspgv.fsf@gmx.us> (rasmus@gmx.us's message of "Fri, 21 Nov 2014 13:33:20 +0100") 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: Rasmus Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Rasmus writes: > Hi, > > Rainer M Krug writes: > >> I want to include in a document, exported to LaTeX, a subfigure. and >> followed the blog entry [1]. This works, but >> >> 1) is cumbersome and extemely LaTex - I can live with this, but is >> there a more org-modeisch solution? >> 2) I cant use the link (Figure [[fig:ventLEL]]) as they got not replaced >> by the correct LaTeX commands. This is obvious (as I did not >> use #+CAPTION: for the caption), but is there a way, apart from >> using the LaTeX code for these links, to get the links into the >> document? > > I don't think there's an "official" way to do this. Presumably it > /could/ use the same mechanisms as when concatenating tables into an > equation of matrices, but at the moment there's nothing like it. > > I don't know if this is much better. It would probably require some > effort to make it work in other backends than latex and it's pretty > verbose. > > #+LATEX_HEADER: \usepackage{subcaption} > > #+CAPTION: Main caption > #+begin_figure > #+ATTR_LATEX: :options [t]{.45\textwidth} > #+CAPTION: subcaption 1 > #+BEGIN_subfigure > #+BEGIN_CENTER > #+ATTR_LATEX: :width 3cm=20 > [[file:tmpEOCX1p.jpg]] > #+END_CENTER > #+end_subfigure > #+ATTR_LATEX: :options [t]{.45\textwidth} :width 2cm=20 > #+CAPTION: subcaption 2 > #+begin_subfigure > #+BEGIN_CENTER > #+ATTR_LATEX: :width 3cm :center t > [[file:tmpEOCX1p.jpg]] > #+END_CENTER > #+end_subfigure > #+end_figure > > Hope it helps, Thanks - it definitely does - even with labels and links. Thanks a lot, Rainer Here my solution including the links to subfigures: ,---- | A comparative plot of the matlab script and the R script shows that | these two algorithms give the same results when using the same | parameter (Figure [[fig:ventLEL]], matlab [[fig:ventLEL_matlab]], R [[fi= g:ventLEL_matlab_R]]). |=20 | A comparative plot of the matlab script and the R script shows that | these two algorithms give the same results when using the same | parameter (Figure [[fig:ventLEL]], matlab [[fig:ventLEL_matlab]], R [[fi= g:ventLEL_matlab_R]]). |=20 | #+CAPTION: Plot of the wind profile from the matlab script using the Log-= Exp-Log profile | #+LABEL: fig:ventLEL | #+begin_figure | #+ATTR_LATEX: :options [t]{.45\textwidth} | #+CAPTION: Matlab script vent5 | #+LABEL: fig:ventLEL_matlab | #+BEGIN_subfigure | #+BEGIN_CENTER | [[file:inst/matlab/plots/vent5.pdf]] | #+END_CENTER | #+end_subfigure | #+ATTR_LATEX: :options [t]{.45\textwidth} | #+CAPTION: R function uLEL() | #+LABEL: fig:=3DventLEL_R | #+begin_subfigure | #+BEGIN_CENTER | #+begin_src R :exports results :file rVentLEL.pdf :results graphics | plot(runif(100)) | #+end_src | #+RESULTS: | [[file:rVentLEL.pdf]] | #+END_CENTER | #+end_subfigure | #+end_figure `---- > Rasmus =2D-=20 Rainer M. Krug email: Rainerkrugsde PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBAgAGBQJUb0QAAAoJENvXNx4PUvmCLjAIAPGpWP5xmoI52LtwSXp/mzrn a9SfJRwPUGX/2+9GfRa2e3F3uFSoEn1xRddTyeIRbJBOSnWdoNv1EOYS64XjTXvy Q9zSyY48MtTJ4qvfjHO0glZZDlI3THYhShl+Dyawcb+1NIwPoxuwFx1R/njhOZzN pasG1HKY9Jl0Pirz+0Gjnkf6W1q4DL57VFTtW7erKE7jBBJ9cJ4DnnbNp4xV3sbQ x6eGE6VeFW/kSupVudt164QhxI7C3vm9IDZ52dWwvi7lcqrP0DL05h1cdrfLajI+ 0+opQ2fyrB8V5g1qqBe3PGzwMGXBcEdIxvCOX+RGoYaevNzj6xDHk1Usm5wD5OY= =0AnC -----END PGP SIGNATURE----- --=-=-=--