From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: LATEX text in figure environment Date: Tue, 24 Nov 2015 12:08:18 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1BSX-0003ka-8p for emacs-orgmode@gnu.org; Tue, 24 Nov 2015 06:08:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1BSU-00086Z-H3 for emacs-orgmode@gnu.org; Tue, 24 Nov 2015 06:08:29 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:33534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1BSU-00085T-9G for emacs-orgmode@gnu.org; Tue, 24 Nov 2015 06:08:26 -0500 Received: by wmec201 with SMTP id c201so203059778wme.0 for ; Tue, 24 Nov 2015 03:08:25 -0800 (PST) In-Reply-To: (Andreas Leha's message of "Tue, 24 Nov 2015 10:42:02 +0000") 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: Andreas Leha Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Andreas Leha writes: > Hi Rainer, > > Rainer M Krug writes: >> Hi >> >> I want to add a todo note (from the todonotes package) in a figure >> environment. What I want should look as follow, so that the to note sits >> in the environment (based on [http://tex.stackexchange.com/a/256802/6941] >> ): >> >> ,---- >> | \begin{figure}[htb] >> | \centering >> | \includegraphics[width=3D.9\linewidth]{fig-strategies.pdf} >> | \caption{from \cite{Roura-Pascual2009_rmkc}} >> | \todo[inline]{This figure needs to be redone and further info added} >> | \end{figure} >> `---- >> >> I tried >> >> #+LATEX: \todo[inline]{This figure needs to be redone and further info a= dded} >> #+CAPTION: from cite:Roura-Pascual2009_rmkc >> [[file:fig-strategies.pdf]] >> >> >> but this results in the todo being outside the environment: >> >> ,---- >> | \todo[inline]{This figure needs to be redone and further info added} >> | \begin{figure}[htb] >> | \centering >> | \includegraphics[width=3D.9\linewidth]{fig-strategies.pdf} >> | \caption{from \cite{Roura-Pascual2009_rmkc}} >> | \end{figure} >> `---- >> >> #+CAPTION: from cite:Roura-Pascual2009_rmkc >> [[file:fig-strategies.pdf]] >> #+LATEX: \todo[inline]{This figure needs to be redone and further info a= dded} >> >> >> resulting in the todo being behind the environment and >> >> #+CAPTION: from cite:Roura-Pascual2009_rmkc >> #+LATEX: \todo[inline]{This figure needs to be redone and further info a= dded} >> [[file:fig-strategies.pdf]] >> >> >> resulting in no environment at all (as #+CAPTION is not before the >> figure). >> >> At the moment I am using >> >> #+begin_figure >> {{{if-latex-else([[file:fig-strategies.pdf]], [[file:fig-strategies.png]= ])}}} >> #+LATEX: \caption{from \cite{Roura-Pascual2009_rmkc}} >> #+LATEX: \todo[inline]{This figure needs to be redone and further info a= dded} >> #+end_figure >> >> which gives me what I want: >> >> >> ,---- >> | \begin{figure} >> | \includegraphics[width=3D.9\linewidth]{fig-strategies.pdf} >> | \caption{from \cite{Roura-Pascual2009_rmkc}} >> | \todo[inline]{This figure needs to be redone and further info added} >> | \end{figure} >> `---- >> >> But it is really not org-ish (caption specified as LaTeX, citation as >> latex, environment specified). >> >> Is there a way to achieve this more org like? Am I missing some #+....? >> > > Does this do what you want? > > #+ATTR_LATEX: :caption \caption{from > cite:Roura-Pascual2009_rmkc}\todo[inline]{This figure needs to be > redone and further info added} > [[file:fig-strategies.pdf]] Yup - partly after removing the line breaks: ,---- | \begin{figure}[htb] | \centering | \includegraphics[width=3D.9\linewidth]{fig-strategies.pdf} | \caption{from cite:Roura-Pascual2009_rmkc} \todo[inline]{This figure need= s to be redone and further info added} | \end{figure} `---- The problem is, if I use the org-ref syntax in a latex fragment, it does not get expanded properly, and the underscore is interpreted as a math symb= ol. I now use =2D-8<---------------cut here---------------start------------->8--- From=20\protect\cite{Roura-Pascual2009_rmkc =2D-8<---------------cut here---------------end--------------->8--- as my caption. This works, but is still really LaTeXish (the reference) Thanks, Rainer > > Best, > Andreas > > =2D-=20 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,= UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJWVEUmAAoJENvXNx4PUvmClUQIAL540ZcNRMMRR1RHWGUs1k5O BapVkE2tN7pQztG8KNRPVS/GuOQEBKb3I3Lb6k/mu4N6I1+kzS1oRqvatkjh/QIB jdLe6OxPKNJaVTnoY4TWbOyfH2LCl6eAx9XKpZTkdbDtgU+2yWuEjS0w3dAuSyWc +FGRxXyaf7X+auUs/78wQ54DN+IGEEsYzUJpFUCvsq/E+xaMdUZtF9uZMq8C70er 3KlxaDw9r18WLdSoWwL1Yu+noa+oceX0YKzoa5CETI82ND+okXd33Vtm8afm3FHY oRWO2XAkranTTn2zoplxbjPvcE0gcTIgqaea0WTgze4euNnXKEkMpyHG7TmOBN4= =iSay -----END PGP SIGNATURE----- --=-=-=--