Merge pull request #73 from newtux/master

Fix issue in hold position being used with center default float
diff --git a/R/kable_styling.R b/R/kable_styling.R
index b5ad14b..a2cb9f0 100644
--- a/R/kable_styling.R
+++ b/R/kable_styling.R
@@ -379,7 +379,7 @@
 }
 
 styling_latex_position <- function(x, table_info, position, latex_options) {
-  hold_position <- "hold_position" %in% latex_options
+  hold_position <- intersect(c("hold_position", "HOLD_position"), latex_options)
   switch(
     position,
     center = styling_latex_position_center(x, table_info, hold_position),
@@ -392,7 +392,12 @@
 
 styling_latex_position_center <- function(x, table_info, hold_position) {
   if (!table_info$table_env & table_info$tabular == "tabular") {
-    return(paste0("\\begin{table}[!h]\n\\centering", x, "\n\\end{table}"))
+    x <- paste0("\\begin{table}\n\\centering", x, "\n\\end{table}")
+    if (hold_position == "hold_position") {
+      x <- styling_latex_hold_position(x)
+    } else {
+      x <- styling_latex_HOLD_position(x)
+    }
   }
   return(x)
 }