emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Loris Bennett <loris.bennett@fu-berlin.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Colon in block name?
Date: Thu, 12 Feb 2015 16:03:16 +0000	[thread overview]
Message-ID: <87wq3njewr.fsf@ucl.ac.uk> (raw)
In-Reply-To: <877fvnxime.fsf@hornfels.zedat.fu-berlin.de> (Loris Bennett's message of "Thu, 12 Feb 2015 16:19:21 +0100")

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

  reply	other threads:[~2015-02-12 16:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 15:19 Colon in block name? Loris Bennett
2015-02-12 16:03 ` Eric S Fraga [this message]
2015-02-13  7:49   ` Loris Bennett
2015-02-13 10:10     ` Eric S Fraga
2015-02-13 10:16       ` Loris Bennett
2015-02-13 10:34         ` Loris Bennett
2015-02-13 11:18           ` Stefan Nobis
2015-02-13 12:36             ` Loris Bennett
2015-02-13 18:43               ` Eric S Fraga
2015-04-11 16:14               ` Nicolas Goaziou
2015-04-15  9:02                 ` Loris Bennett
2015-02-13 19:11 ` Nick Dokos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wq3njewr.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=loris.bennett@fu-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).