hughjonesd / huxtable

An R package to create styled tables in multiple output formats, with a friendly, modern interface.

Home Page:http://hughjonesd.github.io/huxtable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

change to_latex so tabularnewline takes a parameter

JEAN71 opened this issue · comments

Hello there,
Is it possible to change to__latex to take a parameter that can be given to tabularnewline ? I am thinking something like
to_latex<-function(.., tnewline=0.5, ..){..}

content_rows <- apply(contents, 1, function (x) {
x <- x[nzchar(x)]
row <- paste(x, collapse = " &\n")
paste(row, paste("\tabularnewline[-",tnewline,"pt]", sep=""))
})

for the content_rows function (line 463 in the latex.R file). I did try to change it myself but it seems to be getting a problem to work. The reason why this would be beneficial is because the border_padding does not affect the rowspans if I want the font size small.
Thanks

I'm very loth to allow parameters to change individual bits of LaTeX; once you start down that track you can go on adding complexity forever.

  1. Is there a reason you can't use gsub() on the result of to_latex()?

  2. Can you clarify exactly why you want this? Last sentence isn't too clear. I.e. what is the underlying bug here?

Closing. Feel free to reopen if you have comments.