rreferencer-markdowncross-reference

Cross-reference table in R Markdown


Is there a way to cross-reference a table in R Markdown? Please note that I'm not refering to a table of type kable, but the base one, the one you can insert directly from the visual panel.


Solution

  • Create a new quarto project, any kind will do. In the index.qmd paste the following and render.

    | Col1 | Col2 | Col3 |
    |------|------|------|
    | A    | B    | C    |
    | E    | F    | G    |
    | A    | G    | G    |
    
    : My Caption {#tbl-letters}
    
    See @tbl-letters.
    

    Output is the following. enter image description here

    https://quarto.org/docs/authoring/cross-references.html#tables