emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Passing an image reference to source code block


From: shripad sinari
Subject: [O] Passing an image reference to source code block
Date: Mon, 26 Dec 2016 19:00:04 -0700

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

[Prev in Thread] Current Thread [Next in Thread]