我怎样才能摆脱 `xaringan` 幻灯片中 `kableExtra` 生成的 table 内的反色?

How can I get rid of the back-tic inside a table generated by `kableExtra` in `xaringan` slides?

如何去除 kableExtraxaringan 幻灯片中生成的 table 中的反向标记?

library(knitr)
library(kableExtra)

text_tbl <- data.frame(
   a= c("1", "2","...","L",""),
   b= c("$O_{11}$","$O_{21}$","...","$O_{L1}$","$n_{.1}$"),
   c= c("$O_{11}$","$O_{22}$","...","$O_{L2}$","$n_{.2}$"),
   d= c("...","...","...","...","..."),
   e= c("$O_{C1}$","$O_{C2}$","...","$O_{LC}$","$n_{.C}$"),
   f= c("$n_{1.}$","$n_{2.}$","...","$n_{L.}$","$N$"))
kable(text_tbl, "html", booktabs = T, col.names = c("","1","2","...","C"," "), escape=F) %>%
  kable_styling(full_width = F,bootstrap_options = "striped") %>%
  add_header_above(c(" Variável A", "Variável B" = 4, " ")) %>%
  column_spec(1, bold = T) %>%
  column_spec(2)

我检查了生成的 HTML 代码,但没有看到任何反向代码。

您可以将数学 $ 替换为 \\( 或 \\)。例如。 $O_{11}$ 用 \\(O_{11}\\) 代替。

library(knitr)
library(kableExtra)

text_tbl <- data.frame(
   a= c("1", "2","...","L",""),
   b= c("\(O_{11}\)","\(O_{21}\)","...","\(O_{L1}\)","\(n_{.1}\)"),
   c= c("\(O_{11}\)","\(O_{22}\)","...","\(O_{L2}\)","\(n_{.2}\)"),
   d= c("...","...","...","...","..."),
   e= c("\(O_{C1}\)","\(O_{C2}\)","...","\(O_{LC}\)","\(n_{.C}\)"),
   f= c("\(n_{1.}\)","\(n_{2.}\)","...","\(n_{L.}\)","\(N\)"))
kable(text_tbl, "html", booktabs = T, col.names = c("","1","2","...","C"," "), escape=F) %>%
  kable_styling(full_width = F,bootstrap_options = "striped") %>%
  add_header_above(c(" Variável A", "Variável B" = 4, " ")) %>%
  column_spec(1, bold = T) %>%
  column_spec(2)