Hi Rainer,

Rainer M Krug <rai...@krugs.de> 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=.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 added}
> #+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=.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 added}
>
>
> 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 added}
> [[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 added}
> #+end_figure
>
> which gives me what I want:
>
>
> ,----
> | \begin{figure}
> | \includegraphics[width=.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]]

Best,
Andreas


Reply via email to