Get rid of \addlinespace in kable

后端 未结 1 1795
日久生厌
日久生厌 2020-11-30 07:10

In a knitr/Sweave report, the kable function of knitr with the option booktabs=TRUE adds a \\addlinespace each fifth line

1条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-30 07:49

    You can add the argument linesep = "" to kable. This will be passed on to kable_latex where it overwrites the default

    linesep = if (booktabs) c('', '', '', '', '\\addlinespace') else '\\hline'
    

    Example:

    kable(cars, format = "latex", booktabs = TRUE, linesep = "")
    

    0 讨论(0)
提交回复
热议问题