Different behavior between pdf_document and bookdown::pdf_document2 when using compareGroups

Viewed 1222

I am having an issue when knit-ing documents using bookdown::pdf_document2 that don't appear when using the standard pdf_document.

Specifically, I am using the compareGroups library and the export2md function to output comparison tables such as the one shown below:

enter image description here

This is successful when I use output:pdf_document. However, The table is not properly created when I use output: bookdown:pdf_document2.enter image description here

There are clearly differences in the tex files and I am manually able to copy the table from the tex outputed by pdf_document to pdf_document2. Does anyone have any thoughts on how to get bookdown to correctly create the table? I have create a repo with my bug found here for more details: https://github.com/vitallish/bookdown-bug

2 Answers

This problem with export2md has been solved in the latest version of compareGroups package (4.0) available on github. You can install this newest version by typing:

library(devtools)
devtools::install_github("isubirana/compareGroups")

I hope this version will be submitted to CRAN very soon.

Related