diff --git a/R/column_spec.R b/R/column_spec.R
index 21eb99c..377ceb5 100644
--- a/R/column_spec.R
+++ b/R/column_spec.R
@@ -180,6 +180,13 @@
   out <- sub(kable_align_old, kable_align_new,
              solve_enc(kable_input),
              perl = T)
+
+  if (!is.null(width)) {
+    fix_newline <- replace_makecell_with_newline(out, table_info, column)
+    out <- fix_newline[[1]]
+    table_info <- fix_newline[[2]]
+  }
+
   out <- structure(out, format = "latex", class = "knitr_kable")
   if (!is.null(width)) {
     if (is.null(table_info$column_width)) {
@@ -232,3 +239,36 @@
 
   return(x)
 }
+
+replace_makecell_with_newline <- function(kable_input, table_info, column) {
+  if (!str_detect(kable_input, "makecell")) return(list(kable_input, table_info))
+  contents_table <- data.frame(sapply(table_info$contents,
+                           function(x) {str_split(x, " \\& ")[[1]]}),
+                           stringsAsFactors = F)
+  names(contents_table) <- paste0("x", 1:table_info$nrow)
+  rows_check_makecell <- str_detect(contents_table[column, ], "makecell")
+  if (sum(rows_check_makecell) == 0) return(list(kable_input, table_info))
+  rows_to_replace <- which(rows_check_makecell)
+
+  for (i in column) {
+    target_column <- contents_table[i, ]
+    for (j in which(str_detect(target_column, "\\\\\\\\makecell"))) {
+      contents_table[i, j] <- str_replace(
+        contents_table[i, j], "\\\\\\\\makecell\\\\\\[.\\\\\\]\\\\\\{", "")
+      contents_table[i, j] <- str_replace(
+        contents_table[i, j], "\\}$", "")
+      contents_table[i, j] <- str_replace_all(
+        contents_table[i, j], "\\\\\\\\\\\\\\\\", "\\\\\\\\newline "
+      )
+    }
+  }
+
+  new_contents <- unlist(lapply(contents_table, paste, collapse = " & "))
+  for (i in rows_to_replace) {
+    kable_input <- sub(table_info$contents[i], new_contents[i], kable_input,
+                       perl = T)
+    table_info$contents[i] <- new_contents[i]
+  }
+
+  return(list(kable_input, table_info))
+}
diff --git a/R/kable_styling.R b/R/kable_styling.R
index 3d488fc..b7677df 100644
--- a/R/kable_styling.R
+++ b/R/kable_styling.R
@@ -332,7 +332,7 @@
     return(x)
   }
   x <- sub(table_info$begin_tabular,
-           paste0("\\\\resizebox\\{\\\\linewidth\\}\\{\\!\\}\\{",
+           paste0("\\\\resizebox\\{\\\\linewidth\\}\\{\\!\\}\\{\n",
                   table_info$begin_tabular),
            x)
   sub(table_info$end_tabular, paste0(table_info$end_tabular, "\\}"), x)
diff --git a/R/row_spec.R b/R/row_spec.R
index fcbd226..3108de8 100644
--- a/R/row_spec.R
+++ b/R/row_spec.R
@@ -194,7 +194,13 @@
                                      underline, strikeout,
                                      color, background, align, font_size, angle,
                                      hline_after, extra_latex_after)
-    out <- sub(paste0(target_row, "\\\\\\\\"), new_row, out, perl = T)
+    if (length(new_row) == 1) {
+      out <- sub(target_row, new_row, out, perl = T)
+    } else {
+      out <- sub(paste0(target_row, "\\\\\\\\"),
+                 paste(new_row, collapse = ""), out, perl = T)
+    }
+    table_info$contents[i] <- new_row
   }
 
   out <- structure(out, format = "latex", class = "knitr_kable")
@@ -209,49 +215,49 @@
   new_row <- latex_row_cells(target_row)
   if (bold) {
     new_row <- lapply(new_row, function(x) {
-      paste0("\\\\textbf{", x, "}")
+      paste0("\\\\textbf\\{", x, "\\}")
     })
   }
   if (italic) {
     new_row <- lapply(new_row, function(x) {
-      paste0("\\\\em{", x, "}")
+      paste0("\\\\em\\{", x, "\\}")
     })
   }
   if (monospace) {
     new_row <- lapply(new_row, function(x) {
-      paste0("\\\\ttfamily{", x, "}")
+      paste0("\\\\ttfamily\\{", x, "\\}")
     })
   }
   if (underline) {
     new_row <- lapply(new_row, function(x) {
-      paste0("\\\\underline{", x, "}")
+      paste0("\\\\underline\\{", x, "\\}")
     })
   }
   if (strikeout) {
     new_row <- lapply(new_row, function(x) {
-      paste0("\\\\sout{", x, "}")
+      paste0("\\\\sout\\{", x, "\\}")
     })
   }
   if (!is.null(color)) {
     new_row <- lapply(new_row, function(x) {
-      paste0("\\\\textcolor", latex_color(color), "{", x, "}")
+      paste0("\\\\textcolor", latex_color(color), "\\{", x, "\\}")
     })
   }
   if (!is.null(font_size)) {
     new_row <- lapply(new_row, function(x) {
-      paste0("\\\\begingroup\\\\fontsize{", font_size, "}{",
+      paste0("\\\\begingroup\\\\fontsize\\{", font_size, "\\}\\{",
              as.numeric(font_size) + 2,
-             "}\\\\selectfont ", x, "\\\\endgroup")})
+             "\\}\\\\selectfont ", x, "\\\\endgroup")})
   }
   if (!is.null(align)) {
     new_row <- lapply(new_row, function(x) {
-      paste0("\\\\multicolumn{1}{", align, "}{", x, "}")
+      paste0("\\\\multicolumn\\{1\\}\\{", align, "\\}\\{", x, "\\}")
     })
   }
 
   if (!is.null(angle)) {
     new_row <- lapply(new_row, function(x) {
-      paste0("\\\\rotatebox{", angle, "}{", x, "}")
+      paste0("\\\\rotatebox\\{", angle, "\\}\\{", x, "\\}")
     })
   }
 
@@ -261,14 +267,18 @@
     new_row <- paste0("\\\\rowcolor", latex_color(background), "  ", new_row)
   }
 
-  new_row <- paste0(new_row, "\\\\\\\\")
-
-  if (hline_after) {
-    new_row <- paste0(new_row, "\n\\\\hline")
+  if (!hline_after & is.null(extra_latex_after)) {
+    return(new_row)
+  } else {
+    latex_after <- "\\\\\\\\"
+    if (hline_after) {
+      latex_after <- paste0(latex_after, "\n\\\\hline")
+    }
+    if (!is.null(extra_latex_after)) {
+      latex_after <- paste0(latex_after, "\n",
+                            regex_escape(extra_latex_after,
+                                         double_backslash = TRUE))
+    }
+    return(c(new_row, latex_after))
   }
-  if (!is.null(extra_latex_after)) {
-    new_row <- paste0(new_row, "\n",
-                      regex_escape(extra_latex_after, double_backslash = TRUE))
-  }
-  return(new_row)
 }
