Loving the new visual markdown editor feature in RStudio preview release (1.4.869). The table editor is really useful for quickly generating text-heavy tables. I'm struggling to cross reference the simple tables generated by RStudio though. Here's a sample output generated by RStudio: when I knit this it correctly generates the table caption and numbers the table accordingly. But, I can't figure out how to then cross reference that generated table, e.g. what would normally be "See Table.\@ref(tab:my-table)" when the table is generated in a chunk with name "my-table". Since the table is being numbered correctly it seems like it must be possible?
| Col1 | Col2 | Col3 |
|------|------|------|
| a | b | c |
| d | e | f |
| g | h | i |
Table: Test
---
title: Referencing table
output: bookdown::html_document2
---
| Col1 | Col2 | Col3 |
|------|------|------|
| a | b | c |
| d | e | f |
| g | h | i |
: (\#tab:test) A caption Test
See table \@ref(tab:test)
Thanks for the quick reply, I can confirm that that solves it when knitting to pdf, word, and html using bookdown
Seems like this would be good to add to the bookdown documentation, particularly given the likely increase in these kinds of tables that the visual editor will create, I can take a stab at one