Can you pass \ref{fig:image} in? I think that is what you would do in
Latex.


On Mon, Dec 26, 2016 at 7:00 PM shripad sinari <shripad.sin...@gmail.com>
wrote:

> Hello all,
> I would like to know if there is a way to pass a reference for a figure to
> a source block as in the following example:
>
> ----x-----------x---
>
> * Section name
>
> some text
> #+CAPTION: Fig Caption
> #+NAME: fig:image
> [[file:img.jpg]]
> some reference to figure [[fig:image]]
>
> * other section
> reference to Section [[Section name]]
>
> #+BEGIN_SRC R :session *sample* default :exports results :results output
> latex :tangle yes :var plot=[[fig:image]]
>   library(xtable)
>   print(xtable(BOD
>              , caption = paste("Link the image", plot,"to this table")))
> #+END_SRC
>
>
> ----x-----------x---
>
> I would like the caption of the table to point to the image, at the point
> where the word "plot" is located, in LaTeX export of the org file.
>
> Any help or other workarounds are appreciated. I am using org version
> 9.0.3 in GNU Emacs 24.5.1.
>
> Thanks for your help and regards,
>
> Shripad
> Tucson, AZ
>
>
>
>
>

Reply via email to