---
title: Knitr Table Test
format: asciidoc
keep-md: true
_quarto:
tests:
asciidoc:
ensureFileRegexMatches:
# The checks here are looser than I'd like, because checking for asciidoc
# nested structures in line-by-line regexes seems impossible, but this
# is the only smoke-all test we can run in asciidoc..
#
# TODO this is a problem.
-
- "\\[\\[tbl-cars\\]\\]"
- "\\[\\[tbl-pressure\\]\\]"
- "\\[#tbl-tables\\]" # TODO understand the difference between [[foo]] and [#foo]. From my reading of the asciidoc docs it seems ok but we should double-check.
- "\\. Tables"
- "\\. Cars"
- "\\. Pressure"
- []
---
::: {#tbl-tables .cell layout-ncol="2" tbl-cap='Tables'}
```{.r .cell-code}
library(knitr)
```
::: {.cell-output .cell-output-stderr}
```
Warning: le package 'knitr' a été compilé avec la version R 4.2.3
```
:::
```{.r .cell-code}
kable(head(cars), caption = "Cars {#tbl-cars}")
```
::: {.cell-output-display}
Table: Cars {#tbl-cars}
| speed| dist|
|-----:|----:|
| 4| 2|
| 4| 10|
| 7| 4|
| 7| 22|
| 8| 16|
| 9| 10|
:::
```{.r .cell-code}
kable(head(pressure), caption = "Pressure {#tbl-pressure}")
```
::: {.cell-output-display}
Table: Pressure {#tbl-pressure}
| temperature| pressure|
|-----------:|--------:|
| 0| 0.0002|
| 20| 0.0012|
| 40| 0.0060|
| 60| 0.0300|
| 80| 0.0900|
| 100| 0.2700|
:::
:::
See @tbl-cars for more information.
Since we merge #6620 I believe and also #6851 we have a few issues - possible an interaction between both of them:
quarto render docs\smoke-all\crossrefs\float\jats\jats-knitr-table-captions-1.qmd --to jatsfailling on windows. @cscheid same reason as other tests when there is a warning as output of a chunk.intermediate md
quarto render docs\smoke-all\crossrefs\float\asciidoc\asciidoc-knitr-table-captions-1.qmd --to asciidoc. Same reasonIntermediate markdown
quarto render docs\smoke-all\lightbox\lightbox-explicit.qmd --to html. Issue with Lightbox (671ad9c)Lua error
quarto render docs\smoke-all\lightbox\options.qmd --to html. Same as above (bbb46a4)Lua error