有没有办法在 rmarkdown pdf 中使用 kable extra 为 table 的边框添加颜色?
Is there a way to add color to borders of table using kable extra in rmarkdown pdf?
我想要全边框 table 并将边框线设为绿色。我没有在 column_spec 或 row_spec.
中找到任何使线条变为绿色的属性
'kbl(df,booktabs = T,longtable = T,align = c("l", "c", "c", "c")) %>%
kable_styling(latex_options = c("hold_position","repeat_header"),bootstrap_options = "bordered",full_width = F)%>%
column_spec(1, width = "8.5cm",border_left = T, border_right = T)%>%
column_spec(2:4, width = "2.5cm", border_right = T)%>%
collapse_rows(latex_hline = "full")%>%
row_spec(0, bold = T, color = "white", background = "#008752")
如何消除边框线之间的空隙
您可以添加
\usepackage{colortbl}
\arrayrulecolor{green}
您的页眉包括将线条颜色更改为绿色
我想要全边框 table 并将边框线设为绿色。我没有在 column_spec 或 row_spec.
中找到任何使线条变为绿色的属性'kbl(df,booktabs = T,longtable = T,align = c("l", "c", "c", "c")) %>%
kable_styling(latex_options = c("hold_position","repeat_header"),bootstrap_options = "bordered",full_width = F)%>%
column_spec(1, width = "8.5cm",border_left = T, border_right = T)%>%
column_spec(2:4, width = "2.5cm", border_right = T)%>%
collapse_rows(latex_hline = "full")%>%
row_spec(0, bold = T, color = "white", background = "#008752")
如何消除边框线之间的空隙
您可以添加
\usepackage{colortbl}
\arrayrulecolor{green}
您的页眉包括将线条颜色更改为绿色