From mboxrd@z Thu Jan  1 00:00:00 1970
From: Christian Moe <mail@christianmoe.com>
Subject: Re: exporting cross-references to source block results
Date: Thu, 11 Apr 2013 11:42:00 +0200
Message-ID: <m261ztwgif.fsf@christianmoe.com>
References: <20130411084634.GA10767@panahar>
Mime-Version: 1.0
Content-Type: text/plain
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([208.118.235.92]:57803)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@christianmoe.com>) id 1UQDyv-0005CT-99
	for emacs-orgmode@gnu.org; Thu, 11 Apr 2013 05:39:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@christianmoe.com>) id 1UQDyt-0002ue-LR
	for emacs-orgmode@gnu.org; Thu, 11 Apr 2013 05:39:48 -0400
Received: from mail2.b1.hitrost.net ([91.185.211.205]:47334)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@christianmoe.com>) id 1UQDyt-0002uC-Ey
	for emacs-orgmode@gnu.org; Thu, 11 Apr 2013 05:39:47 -0400
In-reply-to: <20130411084634.GA10767@panahar>
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=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: Vikas Rawal <vikaslists@agrarianresearch.org>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>


Hi,

I confirm the same behavior, in ODT and HTML, and think it's a
bug. Additional info:

Vikas Rawal didn't say if he also added a `#+NAME: foo' line above the
generated table. I expected that to solve it, so I tried. This did give
the table an `id="foo"' attribute on HTML export for a cross-reference
to target. However, the cross-reference still behaved the same way.

Yours,
Christian

Vikas Rawal writes:

> I had raised this on the mailing list earlier but my problem has not
> been resolved. I shall be grateful if somebody could help debug.
>
> My org-version is: 
>
> Org-mode version 8.0-pre(release_8.0-pre-247-gbc3ccd @ /home/vikas/lisp/org-mode/lisp/)
>
> When I have a named source block (say crop_median), I get named
> results in a table with #+RESULTS: crop_median at the top of it. I
> then add a #+CAPTION to it.
>
> Then I cross-refer to crop_median using [[crop_median]] elsewhere in
> the file. When I export this to latex, the tex file shows that this
> cross-reference is convered to \texttt{crop_median} rather than to
> \ref(crop_median}.
>
> The pdf file, accordingly, says crop_median where it should say the
> table number.
>
> On the other hand, a named table which is directly entered with
> "#+NAME: crop_median" and is not result of a source block is
> cross-referred correctly.
>
> The same behaviour is seen when I export to odt. That is, the
> cross-references to tables having #+RESULTS show up literally (as
> crop_median etc) while cross-references to tables named using #+NAME
> show up correctly.
>
> Could somebody help debug. Is there something in the setup I need to
> specify how to export cross-references?
>
> Vikas