You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Losing table labels in cross references in quarto - markdown tables #13204
---title: "Table cross-reference repro"format: html---
Going to include some code here. See @tbl-params for the parameters used.
| Variable | Value ||-------------------|-----------------|| Reference Channel | 2 || Ref. Channel cal. | 4 |
: Parameters used. {#tbl-params}
I used Edit in Visual Mode to switch to visual mode. I then saved the document.
Next, I used Edit in Source Mode to switch to source mode. After doing this, the document looked like:
---title: "Table cross-reference repro"format: html---
Going to include some code here. See @tbl-params for the parameters used.
| Variable | Value ||-------------------|-------|| Reference Channel | 2 || Ref. Channel cal. | 4 |
: Parameters used.
Can I ask you to look at this, @cscheid, to let me know if we think we should protect against losing these kinds of IDs when round-tripping between visual and source mode?
Sorry, I should have been clearer in that message! I should have said "it's not surprising that this behavior changed, because Pandoc changed how they handle these attributes". I didn't mean "this should no longer work"!
The fix here will almost certainly involve a change in the Lua filter we use for the visual editor writer.
I can confirm that the Div syntax works nicely - although with my hamfisted modification to the actual quarto document I ended up with :::::: at the end of (quite long) document. Presumably an autocomplete that was not appropriate in this case. Very easy to fix though!
Activity
softwarenerd commentedon Apr 27, 2026
Starting with:
I used Edit in Visual Mode to switch to visual mode. I then saved the document.
Next, I used Edit in Source Mode to switch to source mode. After doing this, the document looked like:
And
{#tbl-params}was lost.juliasilge commentedon Apr 28, 2026
We chatted about this in quarto-dev/quarto#944 (comment), and it sounds like @cscheid thought this was an expected change with the new version of pandoc.
Can I ask you to look at this, @cscheid, to let me know if we think we should protect against losing these kinds of IDs when round-tripping between visual and source mode?
cscheid commentedon Apr 28, 2026
Sorry, I should have been clearer in that message! I should have said "it's not surprising that this behavior changed, because Pandoc changed how they handle these attributes". I didn't mean "this should no longer work"!
The fix here will almost certainly involve a change in the Lua filter we use for the visual editor writer.
mcanouil commentedon May 14, 2026
Workaround/recommendation to avoid the issue is to use the Div syntax:
::: {#tbl-one} | A | B | C | |-----|-----|-----| | 1 | 2 | 3 | Caption :::SWilsonWoll commentedon May 20, 2026
I can confirm that the Div syntax works nicely - although with my hamfisted modification to the actual quarto document I ended up with :::::: at the end of (quite long) document. Presumably an autocomplete that was not appropriate in this case. Very easy to fix though!
volumen25 commentedon Aug 21, 2026
I have a similar problem with LaTeX when switching to the Visual Editor
becomes
Likewise, a table identifier:
becomes
more details here
The workaround
works but LaTeX escape character is still lost.