From mboxrd@z Thu Jan 1 00:00:00 1970 From: shripad sinari Subject: Passing an image reference to source code block Date: Mon, 26 Dec 2016 19:00:04 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114aca6af3994d05449a35e7 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cLh3g-0007mB-3T for emacs-orgmode@gnu.org; Mon, 26 Dec 2016 21:00:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cLh3f-0005ur-3v for emacs-orgmode@gnu.org; Mon, 26 Dec 2016 21:00:08 -0500 Received: from mail-qk0-x22b.google.com ([2607:f8b0:400d:c09::22b]:36563) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cLh3e-0005tP-W8 for emacs-orgmode@gnu.org; Mon, 26 Dec 2016 21:00:07 -0500 Received: by mail-qk0-x22b.google.com with SMTP id n21so203817828qka.3 for ; Mon, 26 Dec 2016 18:00:04 -0800 (PST) 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" To: Orgmode Mailing List --001a114aca6af3994d05449a35e7 Content-Type: text/plain; charset=UTF-8 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 --001a114aca6af3994d05449a35e7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 th= e following example:

----x-----------x---

* Section nam= e

some text
#+CAPTION: Fig Caption
#+NAME: fig:image
[[file= :img.jpg]]
some reference to figure [[fig:image]]

* other sectio= n
reference to Section [[Section name]]

#+BEGIN_SRC R :session *= sample* default :exports results :results output latex :tangle yes :var plo= t=3D[[fig:image]]
=C2=A0 library(xtable)
=C2=A0 print(xtable(BOD
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 , = caption =3D 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 th= e 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
--001a114aca6af3994d05449a35e7--