How do I cross reference a table in the visual editor of R studio? #14514
-
DescriptionHello, To reproduce the issue, I created a new quarto book in R studio, added a table using the table menu, and included a caption. I get the correct behavior when I use only the source editor, I add the tag {#tbl-testing} after the caption, and then use @tbl-testing in other text, when the file is rendered, the table is numbered and the link works. Once I switch to the visual editor, however, the "Table 1" before the caption goes away (and the label is deleted from the source code), and the cross reference is broken. When I search online, some directions state to right click on the table and edit the table properties, but that doesn't exist as a choice. Thank you for any suggestions! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Important Accessibility: To improve accessibility, please add alternative text to your screenshots. This helps all users, including those using screen readers, to understand the context of the images. A brief description can make a big difference! See Good Alt Text, Bad Alt Text — Making Your Content Perceivable. |
Beta Was this translation helpful? Give feedback.
-
|
It seems to be a bug with the visual editor that strip the table attribute. I suggest you use the Div syntax: ::: {#tbl-one}
| A | B | C |
|-----|-----|-----|
| 1 | 2 | 3 |
Caption
::: |
Beta Was this translation helpful? Give feedback.
-
|
Issue tracked at: |
Beta Was this translation helpful? Give feedback.


It seems to be a bug with the visual editor that strip the table attribute.
I suggest you use the Div syntax:
::: {#tbl-one} | A | B | C | |-----|-----|-----| | 1 | 2 | 3 | Caption :::