1

I use org-ref in org-mode to handle cross references, and I use labels like tab:one, fig:two, etc., to identify label types and format them accordingly (using cleveref in LaTeX export). I then have source blocks that take input from tables using the :var NAME=ASSIGN mechanism. It looks like org-mode always interprets a colon in ASSIGN as a filename (this is what the manual says) and so it cannot find the reference. I have tried escaping in various ways but I have found no solution. For example, none of these work:

| x |
|---|
| 1 |

# reference not found
#+begin_src R :var data=tab:one
  data$x
#+end_src

# reference not found
#+begin_src R :var data=tab\:one
  data$x
#+end_src

# assigns the string "tab:one", not table content
#+begin_src R :var data="tab:one"
  data$x
#+end_src

# same as above
#+begin_src R :var data='tab:one'
  data$x
#+end_src

Is there a way to make this work? I guess it may be possible to reconfigure org-ref to use a different delimiter, but I would prefer keeping the standard setting.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.