问题
I am trying to use knitr::kable
in Rmarkdown to create a table of latex equations. However, I am having difficulties getting special characters such as $\sum$
or $\hat$
to work. For example the following works:
knitr::kable(head(mtcars[,c(1,2)], 10),
row.names = FALSE,
col.names = c("Time", "$\\delta_{m}_1$"))
but when trying to include a hat or bar the following does not work:
knitr::kable(head(mtcars[,c(1,2)], 10),
row.names = FALSE,
col.names = c("Time", "$\\hat{m}_1$"))
Has anyone figured out how to embed these characters using kable
?
Thanks
来源:https://stackoverflow.com/questions/48873875/latex-symbols-in-rmarkdown-table-using-knitrkable