This is a follow-up question from this question, where I asked how to suppress bootstrap-layouting of tables in quarto v1.3. The solution was to add #| output: asis
to the chunk-options and then add |> print_html()
to the end of the code.
This works perfectly for normal use. However, when used in a callout-block, printing the table as HTML seems to disable the callout-block.
I found a workaround for this, which is to leave out the |> print_html()
, like so:
---
title: Table style
format: html
---
::: {.callout-important}
Some text about the table
```{r}
#| echo: false
#| warning: false
#| output: asis
library(huxtable)
t1 <- matrix(c("", "", "Success", "", "",
"", "", "no", "yes", "",
"Medication", "A", 4, 2, 6,
"", "B", 2, 5, 7,
"", "", 6, 7, 13),
nrow = 5, byrow = T)
huxtable::as_hux(t1) |>
set_bottom_border(row = c(2,4), col = 2:5) |>
set_bottom_border(row = c(1,5), col = c(3,4)) |>
set_right_border(row = 2:5, col = c(2,4)) |>
set_right_border(row = c(3,4), col = c(1,5)) |>
set_bold(row = 1, col = 3) |>
set_bold(row = 3, col = 1) |>
set_col_width(col = everywhere, 0.2)
```
:::
Again, this works fine, but it generates a grey line above the table, which I'd rather not have:
I found, that this is caused by the last code-line
set_col_width()
, but I absolutely need to set the col-width because the table looks ridiculous without.
Any ideas on how I could get rid of that grey horizontal line?