add row_spec latex part
diff --git a/R/row_spec.R b/R/row_spec.R
index 81b0190..c19044c 100644
--- a/R/row_spec.R
+++ b/R/row_spec.R
@@ -68,12 +68,16 @@
   target_row <- table_info$contents[row + 1]
   new_row <- latex_row_cells(target_row)
   if (bold) {
-    new_row <- paste0("\\{bfseries", new_row, "}")
+    new_row <- lapply(new_row, function(x) {
+      paste0("\\\\bfseries{", x, "}")
+    })
   }
   if (italic) {
-    new_row <- paste0("\\{em", new_row, "}")
+    new_row <- lapply(new_row, function(x) {
+      paste0("\\\\em{", x, "}")
+    })
   }
-  new_row <- paste(new_row, collapse = " & ")
+  new_row <- paste(unlist(new_row), collapse = " & ")
 
   out <- sub(target_row, new_row, as.character(kable_input), perl = T)
   out <- structure(out, format = "latex", class = "knitr_kable")