How do I create table caption and numbering without a code chunk? #5223
-
How do I create table caption and numbering without a code chunk? Say I have a table just manually pasted.
: This is a caption {#tbl-iris} Figures that are not generated from code can be captioned and numbered like this:
Is there something similar for table not generated from code? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
We have documentation on that: https://quarto.org/docs/authoring/tables.html |
Beta Was this translation helpful? Give feedback.
-
@royfrancis Can you please provide us with a working example so we can try and reproduce what you are seeing? Thank you. |
Beta Was this translation helpful? Give feedback.
-
Here is an example:
|
Beta Was this translation helpful? Give feedback.
The last two are not table - they are not using a Table syntax, and so can't be parsed as table. First one is normal text, and second one if codeblock - nothing indicates that they are table. Quarto uses Pandoc's markdown and its feature as described in Markdown Basics and other examples. Same way as you need to use
#
to create a header, you need to follow the expected syntax for tables. The syntax is a way to indicate to Quarto and Pandoc that the text is indeed a Table and should be parsed and handled as such. The: This is a caption {#tbl-iris}
syntax is part of the Table Markdown parsing.Additionnaly to Markdown, HTML table will be parsed - LaTeX tables can be used for PDF document o…