I have a goal: make a table in R using org-babel and have it appear in
the latex export. I also want to be able to refer to the table by name in
the org file and have that become a hypertext link in the latex export.
Using Org mode version 9.4.4 I build this document:
<<begin>>
#+NAME: t1
#+begin_src R :exports both
library(tidyverse)
x <- tribble(~a, ~b, 1, 3)
x
#+end_src
#+CAPTION: Org Table
#+RESULTS: t1
| 1 | 3 |
I want to refer to Table [[t1]].
<<end>>
What I expect: the latex export will include the table and link to it.
What happens instead: the code and table appear, numbered and captioned.
However, the link is broken ("I want to refer to Table ??"). Looking in
the latex, this line reads
I want to refer to Table \ref{org993764c}.
but that label org993764c appears nowhere else in the file.
Org-lint doesn't complain about the file at all. I searched the archives
and the intertubes, I don't see any discussion of this.
Any help would be greatly appreciated.
- JP