From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Colon in block name? Date: Thu, 12 Feb 2015 16:03:16 +0000 Message-ID: <87wq3njewr.fsf@ucl.ac.uk> References: <877fvnxime.fsf@hornfels.zedat.fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLwEj-0008PL-RC for emacs-orgmode@gnu.org; Thu, 12 Feb 2015 11:03:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLwEd-0008In-PY for emacs-orgmode@gnu.org; Thu, 12 Feb 2015 11:03:29 -0500 Received: from mail-db3on0137.outbound.protection.outlook.com ([157.55.234.137]:31770 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLwEd-0008IO-I1 for emacs-orgmode@gnu.org; Thu, 12 Feb 2015 11:03:23 -0500 In-Reply-To: <877fvnxime.fsf@hornfels.zedat.fu-berlin.de> (Loris Bennett's message of "Thu, 12 Feb 2015 16:19:21 +0100") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Loris Bennett Cc: emacs-orgmode@gnu.org On Thursday, 12 Feb 2015 at 16:19, Loris Bennett wrote: > Hi, > > I want to export to LaTeX and refer to tables and code blocks as in the > example below. However a name with a colon, such as 'tab:my_data' used > as a variable for a source block fails: > > org-babel-ref-resolve: Reference 'my_data' not found in this buffer The problem is that you need to get rid of the empty lines between the table information (name, caption) and the actual table: > My data can be found in Table [[tab:my_data]]. > > #+CAPTION: My data > #+NAME: tab:my_data > > | a | b | > |---+---| > | 2 | 4 | > | 3 | 9 | Delete the line after the #+name and it will work: if you look at the LaTeX, you'll see a table environment around the tabular structure and that's needed to get labels that you can referece. Not sure why the empty line matters, mind you... HTH, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-816-gae83b3