[-- Attachment #1: Type: text/plain, Size: 1275 bytes --] Hi 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? Thanks, Rainer * The example #+LATEX: \begin{figure}\centering #+LATEX: \subfloat[matlab]{\label{fig:matlabVentLEL} #+ATTR_LATEX: :height 0.45\textwidth [[file:inst/matlab/plots/vent5.pdf]] #+LATEX: } #+LATEX: \subfloat[R]{\label{fig:rVentLEL} #+begin_src R :exports results :file rVentLEL.pdf :results graphics plot(runif(10)) #+end_src #+ATTR_LATEX: :height 0.45\textwidth #+RESULTS: [[file:rVentLEL.pdf]] #+LATEX: }\caption{Plot of the wind profile from the matlab script using the Log-Exp-Log profile}\label{fig:ventLEL} #+LATEX: \end{figure} Footnotes: [1] http://draketo.de/light/english/emacs/write-multiple-images-single-page-org-mode -- Rainer M. Krug email: Rainer<at>krugs<dot>de PGP: 0x0F52F982 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 494 bytes --]

```
Hi,
Rainer M Krug <Rainer@krugs.de> 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
[[file:tmpEOCX1p.jpg]]
#+END_CENTER
#+end_subfigure
#+ATTR_LATEX: :options [t]{.45\textwidth} :width 2cm
#+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,
Rasmus
--
May the Force be with you
```

[-- Attachment #1: Type: text/plain, Size: 3055 bytes --] Rasmus <rasmus@gmx.us> writes: > Hi, > > Rainer M Krug <Rainer@krugs.de> 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 > [[file:tmpEOCX1p.jpg]] > #+END_CENTER > #+end_subfigure > #+ATTR_LATEX: :options [t]{.45\textwidth} :width 2cm > #+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 [[fig:ventLEL_matlab_R]]). | | 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 [[fig:ventLEL_matlab_R]]). | | #+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:=ventLEL_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 -- Rainer M. Krug email: Rainer<at>krugs<dot>de PGP: 0x0F52F982 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 494 bytes --]