DJD
DJD

Reputation: 83

kableExtra::kable_classic_2 not working with Quarto

I am having to rapidly convert some RMarkdown documents into Quarto (using RStudio).

The documents worked fine in RMarkdown.

However, the tables are crashing...below is one of the table code chunks - it works fine EXCEPT for the kable_classic_2 command, which crashes it, leading to the error:

Extra }, or forgotten \endgroup. l.1145 }

I am beginning to suspect that the issue is that in RMarkdown we were producing a PDF via html, and now in Quarto we are going via LaTeX

```{r}  
#| label: tbl-NumPercAds 
#| tbl-cap: Number and percentage of adverts requiring driving.

kableExtra::kable(tab4.1, col.names = names(tab4.1), align="crrcrrc", 
                  format.args = list(big.mark = ",")) %>% 
 kableExtra::kable_classic_2(fixed_thead = T, font_size = 8, full_width = T) %>% 
  column_spec (c(1,4), border_right = T) %>% row_spec (9, bold=TRUE) %>% 
  row_spec( 8, extra_css = "border-bottom: 1px solid")
```

Can anyone please:

a) Explain why kable appears to work OK but not kable_classic_2

b) direct me to some info on quality styling of tables in Quarto using r chunks to produce output of similar quality to the RMarkdown kableExtra route as I can't seem to find it esp. in the Quarto docs e.g. https://quarto.org/docs/authoring/tables.html

Upvotes: 1

Views: 222

Answers (0)

Related Questions