emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Colon in block name?


From: Loris Bennett
Subject: [O] Colon in block name?
Date: Thu, 12 Feb 2015 16:19:21 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

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

Obviously, and perhaps not surprisingly, the use of the colon in the
name seems to be problematic.

Should this work?  If not, is there a common alternative to the idiom
tab:shootings_in_the_foot and fig:foot_with_hole?

Cheers,

Loris

PS: In the example below, the last table is not exported to the LaTeX
file, but this is presumably an unrelated issue ...

Example:

* Test with block names containing a colon
** Data
My data can be found in Table [[tab:my_data]].
#+CAPTION: My data
#+NAME: tab:my_data
| a | b |
|---+---|
| 2 | 4 |
| 3 | 9 |

** Code

My code can be found in Listing [[code:my_code]].

#+CAPTION: My code
#+NAME: code:my_code
#+HEADER: :var data=tab:my_data :colnames yes
#+BEGIN_SRC R
d <- data
#+END_SRC

** Results

My results can be found in Table [[tab:my_results]].

#+CAPTION: My results
#+NAME: tab:my_results
#+RESULTS: code:my_code
| a | b |
|---+---|
| 2 | 4 |
| 3 | 9 |

** Conclusions

Names with colons don't work.

-- 
This signature is currently under construction.




reply via email to

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