* captioned named table in org-babel R is dangling link in latex export
@ 2021-04-06 20:16 James Powell
2021-04-07 14:33 ` William Denton
0 siblings, 1 reply; 2+ messages in thread
From: James Powell @ 2021-04-06 20:16 UTC (permalink / raw)
To: emacs-orgmode
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
--
James E. Powell, MS
Pronouns: he/him/his
Applied Physics PhD Candidate
Department of Physics
Portland State University
Home page: http://web.pdx.edu/~powellj
Office: SRTC 409B Phone: +1-503-725-8515
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: captioned named table in org-babel R is dangling link in latex export
2021-04-06 20:16 captioned named table in org-babel R is dangling link in latex export James Powell
@ 2021-04-07 14:33 ` William Denton
0 siblings, 0 replies; 2+ messages in thread
From: William Denton @ 2021-04-07 14:33 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1843 bytes --]
It works if you put a #+label on the table ... which confuses me, because I
looked through the manual for #+label and there's no mention of it at all, but a
bunch of my Org files use it (for LaTeX export).
# -----
#+name: t1
#+begin_src R :exports both
library(tidyverse)
x <- tribble(~a, ~b, 1, 3)
x
#+end_src
#+caption: Org table.
#+label: tab_t1
#+RESULTS: t1
| 1 | 3 |
I want to refer to Table [[tab_t1]].
# ------
Bill
On 6 April 2021, James Powell wrote:
> 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
>
>
--
William Denton :: Toronto, Canada --- Listening to Art: https://listeningtoart.org/
https://www.miskatonic.org/ --- GHG.EARTH: https://ghg.earth/
Caveat lector. --- STAPLR: https://staplr.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-07 14:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-06 20:16 captioned named table in org-babel R is dangling link in latex export James Powell
2021-04-07 14:33 ` William Denton
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.