kableExtra icon indicating copy to clipboard operation
kableExtra copied to clipboard

Add extra_latex_after= argument to add_header_above() --- Happy to implement.

Open krivit opened this issue 11 months ago • 3 comments

This is to parallel the eponymous argument to row_spec(). I have a preliminary implementation and would be happy to submit a PR.

To Reproduce

---
output: pdf_document
---

```{r}
library(kableExtra)
data(mtcars)
mtcars <- mtcars[1:3, 1:3]
```
```{r}
kable(mtcars) |>
  add_header_above(c("abc"=2, "def"=2), extra_latex_after = "\\cline{3-4}", line=FALSE)
```

produces something like image

krivit avatar Mar 06 '24 12:03 krivit

Oh, sure, I can see the use cases of this functionality. That would be great!

haozhu233 avatar Mar 11 '24 14:03 haozhu233

Oh, sure, I can see the use cases of this functionality. That would be great!

Will try to submit in the next week or so. Is there a contribution guidelines and procedures document? Coding style, documentation style, test cases, whether to add myself to contributors in the DESCRIPTION, that sort of thing?

krivit avatar Mar 11 '24 23:03 krivit

Thanks! There is no need to rush.

For documentation, it would be great if you can add a short example to the pdf version of the doc. You can also add a test on whether your example runs in the test cases. And yeah, please add yourself as a contributor if you want to be included.

haozhu233 avatar Mar 12 '24 03:03 haozhu233