Made changes to add_header_left.
Change the name of attr original_kable_meta to kable_meta
diff --git a/tests/visual_tests/add_header_above_html.Rmd b/tests/visual_tests/add_header_above_html.Rmd
index 8451d6c..0eb1c65 100644
--- a/tests/visual_tests/add_header_above_html.Rmd
+++ b/tests/visual_tests/add_header_above_html.Rmd
@@ -14,7 +14,7 @@
kable_styling(bootstrap_options = c("striped", "condensed"),
latex_options = c("striped", "hold_position"),
full_width = F) %>%
- add_header_above(c(" ", "Group 1" = 2, "Group 2[note]" = 2)) %>%
+ add_header_above(c(" ", "Group 1" = 2, "Group 2[note]" = 2), italic = T) %>%
add_footnote(c("table footnote"))
```
diff --git a/tests/visual_tests/add_header_above_pdf.Rmd b/tests/visual_tests/add_header_above_pdf.Rmd
index 39797bf..1b91989 100644
--- a/tests/visual_tests/add_header_above_pdf.Rmd
+++ b/tests/visual_tests/add_header_above_pdf.Rmd
@@ -16,8 +16,8 @@
kable(dt, format = "latex", booktabs = T, caption = "Demo Table") %>%
kable_styling() %>%
- add_header_above(c(" ", "Group 1" = 2, "Group 2[note]" = 2)) %>%
- add_footnote(c("table footnote"))
+ add_header_above(c(" ", "Group 1" = 2, "Group 2[note]" = 2), bold = T, italic = T) %>%
+ add_footnote(c("table footnote"))
```
```{r}
diff --git a/tests/visual_tests/add_header_left.Rmd b/tests/visual_tests/add_header_left.Rmd
index 6d1f6c6..be34a14 100644
--- a/tests/visual_tests/add_header_left.Rmd
+++ b/tests/visual_tests/add_header_left.Rmd
@@ -14,7 +14,6 @@
# kable_styling(latex_options = "striped") %>%
add_header_above(c(" ", "a%" = 3, "b" = 3)) %>%
add_header_left(c("a%" = 3, "b" = 7), "new") %>%
- add_header_left(c("a" = 4, "b" = 6), "new2") %>%
- group_rows("aasd", 4, 6)
-
+ add_header_left(c("aadjfoi adlfsjs adsa" = 4, "b" = 6), "new2", width = "1.5cm") %>%
+ add_header_left(c("a" = 5, "b" = 5), "xx", width = "1cm", align = "r")
```
diff --git a/tests/visual_tests/add_header_left_html.Rmd b/tests/visual_tests/add_header_left_html.Rmd
index 794543f..09e739f 100644
--- a/tests/visual_tests/add_header_left_html.Rmd
+++ b/tests/visual_tests/add_header_left_html.Rmd
@@ -11,6 +11,7 @@
kable("html") %>%
kable_styling() %>%
add_header_above(c(" ", "a" = 3, "b" = 3)) %>%
- add_header_left(c("a" = 2, "b" = 3)) %>%
- add_header_left(c("a%" = 3, "b" = 7))
+ add_header_left(c("a" = 2, "b" = 3), width = "3cm", bold = T) %>%
+ add_header_left(c("a%" = 3, "b" = 7)) %>%
+ column_spec(1, bold = T, width = "1cm")
```
diff --git a/tests/visual_tests/column_row_spec_html.Rmd b/tests/visual_tests/column_row_spec_html.Rmd
index 5ef4f21..aee5f70 100644
--- a/tests/visual_tests/column_row_spec_html.Rmd
+++ b/tests/visual_tests/column_row_spec_html.Rmd
@@ -55,3 +55,17 @@
column_spec(7, bold = T) %>%
row_spec(5, bold = T, italic = T)
```
+
+```{r}
+dt <- mtcars[1:5, 1:6]
+dt$wt <- paste(dt$wt, "%")
+dt$mpg <- paste(dt$mpg, "&")
+dt$cyl <- paste(dt$cyl, "$")
+
+kable(dt, "html") %>%
+ kable_styling(full_width = F) %>%
+ add_header_left(c("aaa" = 4, "bbb"), "A") %>%
+ add_header_left(c("cccasjof jsafjiosadjfxclxz cjoiwdjosfns daflasfj asiofjsdfio" = 2, "ddd" = 3), "B") %>%
+ column_spec(1, bold = T, width = "2cm") %>%
+ column_spec(2, italic = T)
+```
diff --git a/tests/visual_tests/column_row_spec_pdf.Rmd b/tests/visual_tests/column_row_spec_pdf.Rmd
index 4b9b31e..d76c802 100644
--- a/tests/visual_tests/column_row_spec_pdf.Rmd
+++ b/tests/visual_tests/column_row_spec_pdf.Rmd
@@ -57,3 +57,17 @@
row_spec(5, bold = T, italic = T)
```
+
+```{r}
+dt <- mtcars[1:5, 1:6]
+dt$wt <- paste(dt$wt, "%")
+dt$mpg <- paste(dt$mpg, "&")
+dt$cyl <- paste(dt$cyl, "$")
+
+kable(dt, "latex", booktabs = T) %>%
+ add_header_left(c("aaa aaa aaa aaa aaa" = 2, "bbb" = 3), "A") %>%
+ column_spec(8, bold = T) %>%
+ column_spec(1, bold = T, width = "1em") %>%
+ row_spec(5, bold = T, italic = T)
+```
+