gt table in bookdown always striped

Hi - I'm stuck with eliminated row striping on gt tables in bookdown.

The following works fine in Rmd, but I need no striping:

#t10
gt::gt(head(mtcars,5),caption='a caption')%>%
  opt_row_striping(row_striping = TRUE)

Attempt to remove striping:

gt::gt(head(mtcars,5),caption='a caption')%>%
  opt_row_striping(row_striping = F)

But in bookdown the latter block just makes the striping fainter (image below).

I'm not sure how to do a minimal example of bookdown, but the minimal version here: minimal bookdown with the above chunks reproduces the issue.

I'm up to date on R and packages.

I'm not sure how to move forward since I cannot reproduce it in Rmd, hence the request for help - many thanks.

This is because gitbook() format uses Gitbook which comes with some predefined styles and plugins. One of which is for table. The stripping comes from there.

There is a table_css argument to opt out Gitbook Table CSS.

  bookdown::gitbook: 
    table_css: FALSE

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.