bump version for cran release but it seems that they are on vacation :P
diff --git a/docs/awesome_table_in_pdf.Rmd b/docs/awesome_table_in_pdf.Rmd
index db06969..4a2a67f 100644
--- a/docs/awesome_table_in_pdf.Rmd
+++ b/docs/awesome_table_in_pdf.Rmd
@@ -286,7 +286,6 @@
kable_paper("striped", full_width = F)
# You can also do this with dplyr and use one pipe from top to bottom
-# library(dplyr)
# mtcars[1:10, 1:2] %>%
# mutate(
# car = row.names(.),
@@ -543,7 +542,7 @@
Item = c("Hello\nWorld", "This\nis a cat"),
Value = c(10, 100)
)
-dt_lb$Item = linebreak(Item)
+dt_lb$Item = linebreak(dt_lb$Item)
# Or you can use
# dt_lb <- dt_lb %>%
@@ -571,6 +570,28 @@
landscape()
```
+## Decimal Alignment
+Decimal alignment has been a requested feature by many LaTeX users. However, since the syntax for either `siunitx` or `dcolumn` are a little different, it is sort of difficult to integrate them into the pipeline of this package without breaking other features. If you need this feature, Brandon Bertelsen (@1beb) provided a very nice solution on github (https://github.com/haozhu233/kableExtra/issues/174, thanks). Here is a working example.
+
+In the `header-includes` section of the yaml header, include the following settings. If you need different rounding options, you can make changes here.
+
+```
+\usepackage{siunitx}
+\newcolumntype{d}{S[table-format=3.2]}
+```
+
+For your table, you need to modify the column names and use `d` to as the `align` options.
+
+```{r, eval = FALSE}
+# not evaluated
+k <- mtcars[1:10,1:5]
+names(k) <- paste("{", names(k), "}")
+kableExtra::kable(
+ k, "latex", booktabs = TRUE, longtable = TRUE,
+ align = c("l", rep("d", 4)), linesep = "", escape = FALSE) %>%
+ kable_styling(full_width=FALSE)
+```
+
## Use LaTeX table in HTML or Word
If you want to save a LaTeX table to a image, you may consider using `save_kable()`. We also provide an `as_image()` function as a convenience wrapper for `save_kable()`. It will save the image to a temp location. Note that this feature requires you to have [magick](https://github.com/ropensci/magick) installed (`install.packages("magick")`). Also, if you are planning to use it on Windows, you need to install [Ghostscript](https://www.ghostscript.com/). This feature may not work if you are using tinytex. If you are using tinytex, please consider using other alternatives to this function.