Open eeholmes opened 4 years ago
I'm having a similar issue with vphantom
being inserted for rows that have the same set of values. However, I'm using pack_rows
and getting this issue.
toydata <- data.frame(Var1 = c("1973","1974", "1973", "1974"), Var2 = c("0", "2", "0", "5"))
toydata %>% kbl(caption="Test", booktab=TRUE, format="latex") %>% kable_styling(full_width = T, font_size = 6) %>% pack_rows("AMF", 1,2) %>% pack_rows("UMF", 3,4)
This line inserts \vphantom{}
before the first non whitespace character, which breaks when the line ends with \kern 1em
https://github.com/haozhu233/kableExtra/blob/master/R/util.R#L239
This is a new version of previous issues #433 , #161 , #145 . The problem reappeared when I used
column_spec()
. Was fine without.The
\vphantom
is inserted between the\kern
and1em
thus breaking the LaTeX code.