Closed bheebsh closed 5 years ago
You are welcome to have a go at it. I'd like Thomas Dupont to give his input at some point.
Thanks, Prof. Harrel.
I was able to fix it relatively straightforwardly by adding logic to check for the combination when setting the end-of-group-operators. I traced it back to the latex.s
file, lines 404-433.
In the CRAN version, the end-of-group line is always ""
if ctable
is in use, regardless of whether booktabs
is used. I simply added a condition to use a normal newline if both ctable
and booktabs
are in use and leave it as-is otherwise.
I ran into an issue with the combination of
ctable
andbooktabs
packages in thelatex()
function.Example R Code
This produces the following .tex file which doesn't compile.
The problem is with the
\midrule
and\bottomrule
parts, which require preceding newlines. This isn't an issue withctable = FALSE
option, because both are preceded by\tabularnewline
in that case.The issue (as far as I can tell) is only present when using the combination.
I am getting this on R 3.5.1 and Hmisc 4.1.1.
I am happy to branch and take stab at fixing it myself and putting in a pull request.