Skip to content

Table label disappears when moving between source and visual view #17890

Open

Description

@Voorhoeve

System details

RStudio Edition : Desktop
RStudio Version : 2026.05.0
OS Version      : Windows 10
R Version       : 4.5.3

Steps to reproduce the problem

| Col1 | Col2 | Col3 |
|------|------|------|
| A    | B    | C    |
| E    | F    | G    |
| A    | G    | G    |

: My Caption {#tbl-letters}

See @tbl-letters.
  • Switch to visual view in source pane
  • Switch back

Describe the problem in detail

After switch back, the {#tbl-letters} label disappeared, I get:

| Col1 | Col2 | Col3 |
|------|------|------|
| A    | B    | C    |
| E    | F    | G    |
| A    | G    | G    |

: My Caption

See @tbl-letters.

Describe the behavior you expected

I expected to see this after switch back:

| Col1 | Col2 | Col3 |
|------|------|------|
| A    | B    | C    |
| E    | F    | G    |
| A    | G    | G    |

: My Caption {#tbl-letters}

See @tbl-letters.

Notes

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Activity

  1. added theissue type on Jun 7, 2026
  2. added
    visual markdown
    on Jun 7, 2026
  3. added this to the Pacific Dogwood milestone on Jun 10, 2026
  4. bwelman commented on Jun 23, 2026

    @bwelman

    I have the same issue

  5. self-assigned this
    on Jul 9, 2026
  6. gtritchie commented on Jul 9, 2026

    @gtritchie
    Member

    Note, this is an issue on the Visual Editor/Panmirror side, per quarto-dev/quarto#977.

  7. removed their assignment
    on Jul 9, 2026
  8. stefanocoretta commented on Jul 27, 2026

    @stefanocoretta

    As a temporary solution, placing the table inside a fenced div ::: and adding the label there works. For example:

    ::: {#tbl-treat}
    | `IsWord`       | $w$ |
    |----------------|:---:|
    | IsWord = TRUE  |  0  |
    | IsWord = FALSE |  1  |
    
    : Treatment contrasts coding of the categorical predictor `IsWord`.
    :::
  9. KevinShook commented on Aug 17, 2026

    @KevinShook

    I have the same issue.
    Although placing the table inside fenced divs preserves the table label, the labels of sub-tables are still lost when switching to visual mode.

  10. MW-Clements commented on Dec 2, 2026

    @MW-Clements

    I found the same issue today - Rstudio Version 2026.11.0+203, Quarto version 1.10.19

  11. modified the milestones: Later, 2027.01 on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugescapeeexternalquartoregressionsupportvisual markdown

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions