5  Tables in a for loop

Outputting tables (or figure) in a for loop works fine in Quarto, but there is no way to set the table numbers dynamically and get all the cross-references working in Word, HTML and PDF. We really need that dynamic numbering and cross-reference feature in a big report.

5.1 Example of tables produced in a for loop

Look at the Code (link at top in HTML output) to see the cat(knitr::knit_print(tab)) trick for getting your tables to appear.

We can set a caption but no way to cross-reference it
mpg cyl disp hp
Mazda RX4 21 6 160 110
Mazda RX4 Wag 21 6 160 110
Note:
kable
We can set a caption but no way to cross-reference it
mpg cyl disp hp
Mazda RX4 21 6 160 110
Mazda RX4 Wag 21 6 160 110
Note:
kable