bug fix to column_spec
diff --git a/tests/visual_tests/add_header_left.Rmd b/tests/visual_tests/add_header_left.Rmd
index be34a14..3083fa3 100644
--- a/tests/visual_tests/add_header_left.Rmd
+++ b/tests/visual_tests/add_header_left.Rmd
@@ -11,9 +11,9 @@
mtcars[1:10, 1:6] %>%
kable("latex", booktabs= T) %>%
- # kable_styling(latex_options = "striped") %>%
+ 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%knjnuulkjlkj" = 3, "b" = 7), "new", align = "l") %>%
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/column_row_spec_pdf.Rmd b/tests/visual_tests/column_row_spec_pdf.Rmd
index d76c802..b639092 100644
--- a/tests/visual_tests/column_row_spec_pdf.Rmd
+++ b/tests/visual_tests/column_row_spec_pdf.Rmd
@@ -39,35 +39,8 @@
)
)
-kable(dt, "latex", booktabs = T) %>%
- kable_styling(latex_options = "scale_down") %>%
- column_spec(2, "30em", bold = T) %>%
+kable(dt, "latex", booktabs = T, align = "r") %>%
+ column_spec(2, "3cm", bold = T) %>%
column_spec(4, "3cm", 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) %>%
- group_rows("Group 1", 2, 4) %>%
- 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, "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)
-```
-
diff --git a/tests/visual_tests/kable_styling_pdf.Rmd b/tests/visual_tests/kable_styling_pdf.Rmd
index ba1f1a2..7acd914 100644
--- a/tests/visual_tests/kable_styling_pdf.Rmd
+++ b/tests/visual_tests/kable_styling_pdf.Rmd
@@ -65,3 +65,8 @@
```
+```{r}
+usepackage_latex("caption", "singlelinecheck=false")
+kable(dt, format = "latex", booktabs = T, caption = "long caption long caption long caption long caption long caption long caption long caption") %>%
+ kable_styling(latex_options = c("striped", "hold_position"))
+```