haozhu233 / haozhu233/kableExtra

toprule in kbl() creates hline under pack_rows

Open
#653 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
737
Forks
149
PR merge metrics
No merged PRs in 30d

Description

When specifying a top rule in kbl, and additional line comes under a header introduced by pack_rows

This is the reproducible example:

```
library(kableExtra)
kbl(mtcars[1:10, 1:6], format= "latex", caption = "Group Rows", booktabs = T, toprule = "\\hline \\hline") %>%
kable_styling() %>%
pack_rows("Group 1", 4, 7) %>%
pack_rows("Group 2", 8, 10)

```

This is a great package, the most flexible I've worked with. Hopefully there is a quick fix to what appears to be a bug.

Contributor guide

No contributing guide indexed for this repository

Research direction

Run the reproducible R example using kbl(), kable_styling(), and pack_rows() with LaTeX output, then trace how the top rule and packed-row headers are generated. Done means the extra hline no longer appears beneath a header introduced by pack_rows while the requested top rule remains.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex, r
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.