diff --git a/R/add_header_above.R b/R/add_header_above.R
index 29ab6d7..39b6273 100644
--- a/R/add_header_above.R
+++ b/R/add_header_above.R
@@ -92,12 +92,23 @@
 pdfTable_add_header_above <- function(kable_input, header = NULL) {
   table_info <- magic_mirror(kable_input)
   header <- standardize_header_input(header)
+  header$header <- escape_latex(header$header)
+  header$header <- gsub("\\\\", "\\\\\\\\", header$header)
   hline_type <- switch(table_info$booktabs + 1, "\\\\hline", "\\\\toprule")
+  new_header_split <- pdfTable_new_header_generator(header, table_info$booktabs)
+  new_header <- paste0(new_header_split[1], "\n", new_header_split[2])
   out <- sub(hline_type,
-             paste0(hline_type, "\n",
-                    pdfTable_new_header_generator(header, table_info$booktabs)),
+             paste0(hline_type, "\n", new_header),
              as.character(kable_input))
   out <- structure(out, format = "latex", class = "knitr_kable")
+  # new_header_row <- latex_contents_escape(new_header_split[1])
+  if (is.null(table_info$new_header_row)) {
+    table_info$new_header_row <- new_header_split[1]
+    table_info$header_df <- list(header)
+  } else {
+    table_info$new_header_row <- c(table_info$new_header_row, new_header_split[1])
+    table_info$header_df[[length(table_info$header_df) + 1]] <- header
+  }
   attr(out, "original_kable_meta") <- table_info
   return(out)
 }
@@ -115,6 +126,11 @@
     paste0('\\\\multicolumn{', x[2], '}{', x[3], '}{', x[1], "}")
   })
   header_text <- paste(paste(header_items, collapse = " & "), "\\\\\\\\")
+  cline <- cline_gen(header_df, booktabs)
+  return(c(header_text, cline))
+}
+
+cline_gen <- function(header_df, booktabs) {
   cline_end <- cumsum(header_df$colspan)
   cline_start <- c(0, cline_end) + 1
   cline_start <- cline_start[-length(cline_start)]
@@ -124,6 +140,7 @@
   cline <- paste0(cline_type, cline_start, "-", cline_end, "}")
   cline <- cline[trimws(header_df$header) != ""]
   cline <- paste(cline, collapse = " ")
-  header_text <- paste(header_text, cline)
-  return(header_text)
+  return(cline)
 }
+
+
diff --git a/R/add_header_left.R b/R/add_header_left.R
index b91a38c..6fa6971 100644
--- a/R/add_header_left.R
+++ b/R/add_header_left.R
@@ -3,7 +3,8 @@
 #' @description Experimenting. Please don't use it in production
 #'
 #' @export
-add_header_left <- function(kable_input, header = NULL, header_name = "") {
+add_header_left <- function(kable_input, header = NULL, header_name = "",
+                            align = "c") {
   if (is.null(header)) return(kable_input)
   kable_format <- attr(kable_input, "format")
   if (!kable_format %in% c("html", "latex")) {
@@ -11,31 +12,33 @@
          "generic markdown table using pandoc is not supported.")
   }
   if (kable_format == "html") {
-    return(add_header_left_html(kable_input, header, header_name))
+    return(add_header_left_html(kable_input, header, header_name, align))
   }
   if (kable_format == "latex") {
-    return(add_header_left_latex(kable_input, header, header_name))
+    return(add_header_left_latex(kable_input, header, header_name, align))
   }
 }
 
 # HTML
-add_header_left_html <- function(kable_input, header, header_name) {
+add_header_left_html <- function(kable_input, header, header_name, align) {
   kable_attrs <- attributes(kable_input)
   kable_xml <- read_xml(as.character(kable_input), options = "COMPACT")
   kable_thead <- xml_tpart(kable_xml, "thead")
   kable_tbody <- xml_tpart(kable_xml, "tbody")
 
+  align <- switch(align, "c" = "center", "l" = "left", "r" = "right")
+
   new_header <- paste0(
-    '<th style="text-align:center;" rowspan="',
+    '<th style="text-align:', align, '; vertical-align: bottom;" rowspan="',
     length(xml_children(kable_thead)), '">', header_name, '</th>'
   )
   new_header <- read_xml(new_header, options = c("COMPACT"))
   xml_add_child(xml_child(kable_thead, 1), new_header, .where = 0)
 
-  header <- standardize_rowheader_input(header, length(xml_children(kable_tbody)))
+  header <- standardize_header(header, length(xml_children(kable_tbody)))
   for (i in 1:nrow(header)) {
     new_row_item <- paste0(
-      '<td style="text-align:center; vertical-align: middle;" rowspan="',
+      '<td style="text-align:', align, '; vertical-align: middle;" rowspan="',
       header$rowspan[i], '">', header$header[i], '</td>')
     new_row_item <- read_xml(new_row_item, options = "COMPACT")
     target_row <- xml_child(kable_tbody, header$row[i])
@@ -48,7 +51,7 @@
   return(out)
 }
 
-standardize_rowheader_input <- function(header, n_row) {
+standardize_header <- function(header, n_row) {
   header_names <- names(header)
 
   if (is.null(header_names)) {
@@ -71,6 +74,100 @@
     ))
 }
 
-add_header_left_latex <- function(kable_input, header, header_name) {
-  return(kable_input)
+add_header_left_latex <- function(kable_input, header, header_name, align) {
+  table_info <- magic_mirror(kable_input)
+  usepackage_latex("multirow")
+  if (!table_info$booktabs) {
+    warning("add_header_left only supports LaTeX table with booktabs. Please",
+            " use kable(..., booktabs = T) in your kable function.")
+  }
+  out <- as.character(kable_input)
+  contents <- table_info$contents
+  header_name <- escape_latex(header_name)
+  header <- standardize_header(header, length(contents) - 1)
+  header$header <- escape_latex(header$header)
+  header$header <- gsub("\\\\", "\\\\\\\\", header$header)
+  header$row <- header$row + 1
+  header$row_end <- header$row + header$rowspan - 1
+
+  # Align
+  out <- sub(paste0(table_info$begin_tabular, "\\{"),
+             paste0(table_info$begin_tabular, "{", align,
+                    ifelse(table_info$booktabs, "", "|")),
+             out, perl = T)
+
+  # Header
+  if (!is.null(table_info$new_header_row)) {
+    new_header_row <- table_info$new_header_row
+    for (i in 1:length(new_header_row)) {
+      out <- sub(regex_escape(new_header_row[i]),
+                 paste0(" & ", new_header_row[i]), out)
+      cline_old <- cline_gen(table_info$header_df[[i]], table_info$booktabs)
+      cline_old <- regex_escape(cline_old)
+      table_info$header_df[[i]] <- rbind(
+        data.frame(header = " ", colspan = 1),
+        table_info$header_df[[i]]
+      )
+      cline_new <- cline_gen(table_info$header_df[[i]], table_info$booktabs)
+      out <- sub(cline_old, cline_new, out)
+    }
+  }
+  out <- sub(contents[1], paste0(header_name, " & ", contents[1]), out)
+  table_info$contents[1] <- paste0(header_name, " & ", contents[1])
+
+  # move existing midrules if exists
+  out_lines <- read_lines(out)
+  tbody_start_row <- which(out_lines == "\\midrule")
+  tbody_end_row <- which(out_lines == "\\bottomrule")
+  before_tbody <- out_lines[seq(1, tbody_start_row)]
+  tbody <- out_lines[seq(tbody_start_row + 1, tbody_end_row - 1)]
+  after_tbody <- out_lines[seq(tbody_end_row, length(out_lines))]
+
+  # Remove addlinespace in this case
+  tbody <- tbody[tbody != "\\addlinespace"]
+
+  midrule_exist <- str_sub(tbody, 1, 9) == "\\cmidrule"
+  if (sum(midrule_exist) > 0) {
+    existing_midrules <- which(midrule_exist)
+    tbody[existing_midrules] <- unlist(lapply(
+      tbody[existing_midrules], cmidrule_plus_one
+    ))
+    out <- paste0(c(before_tbody, tbody, after_tbody), collapse = "\n")
+  }
+
+  for (j in 1:nrow(header)) {
+    new_row_pre <- paste0(
+      "\\\\multirow\\{", -header$rowspan[j], "\\}\\{\\*\\}\\{", header$header[j], "\\} & "
+    )
+    new_row_text <- paste0(new_row_pre, contents[header$row_end[j]])
+    out <- sub(contents[header$row_end[j]], new_row_text, out)
+    table_info$contents[header$row_end[j]] <- new_row_text
+    if (j != nrow(header)) {
+      out <- sub(
+        paste0(contents[header$row_end[j]], "\\\\\\\\\n"),
+        paste0(contents[header$row_end[j]],
+               "\\\\\\\\\n\\\\cmidrule[0.5pt](l{2pt}r{2pt}){1-1}\n"),
+        out
+      )
+    }
+  }
+
+  for (k in setdiff(seq(2, length(contents)), header$row_end)) {
+    out <- sub(contents[k],
+               paste0("  & ", contents[k]),
+               out)
+    table_info$contents[k] <- paste0("  & ", contents[k])
+  }
+
+  out <- structure(out, format = "latex", class = "knitr_kable")
+  attr(out, "original_kable_meta") <- table_info
+  return(out)
+}
+
+cmidrule_plus_one <- function(x) {
+  start_pos <- as.numeric(str_match(x, "\\)\\{(.*)-")[2]) + 1
+  stop_pos <- as.numeric(str_match(x, "-(.*)\\}")[2]) + 1
+  return(
+    paste0("\\cmidrule[0.5pt](l{2pt}r{2pt}){", start_pos, "-", stop_pos, "}")
+  )
 }
diff --git a/R/add_indent.R b/R/add_indent.R
index 3fc2837..ae3548f 100644
--- a/R/add_indent.R
+++ b/R/add_indent.R
@@ -39,12 +39,15 @@
   for (i in positions) {
     rowtext <- table_info$contents[i + 1]
     out <- sub(rowtext, latex_indent_unit(rowtext), out, perl = TRUE)
+    table_info$contents[i + 1] <- latex_indent_unit(rowtext)
   }
+  out <- structure(out, format = "latex", class = "knitr_kable")
+  attr(out, "original_kable_meta") <- table_info
   return(out)
 }
 
 latex_indent_unit <- function(rowtext) {
-  paste0("\\\\hspace{1em}", rowtext)
+  paste0("\\\\hspace\\{1em\\}", rowtext)
 }
 
 # Add indentation for HTML
diff --git a/R/magic_mirror.R b/R/magic_mirror.R
index 6276eae..d200a9d 100644
--- a/R/magic_mirror.R
+++ b/R/magic_mirror.R
@@ -71,7 +71,7 @@
     )
   # Contents
   kable_info$contents <- str_match_all(kable_input, "\n(.*)\\\\\\\\")[[1]][,2]
-  kable_info$contents <- latex_contents_escape(kable_info$contents)
+  kable_info$contents <- regex_escape(kable_info$contents, T)
   if (kable_info$tabular == "longtable" & !is.na(kable_info$caption)) {
     kable_info$contents <- kable_info$contents[-1]
   }
@@ -87,15 +87,6 @@
   return(kable_info)
 }
 
-latex_contents_escape <- function(x) {
-  x <- gsub("\\\\", "\\\\\\\\", x)
-  x <- gsub("\\$", "\\\\\\$", x)
-  x <- gsub("\\(", "\\\\(", x)
-  x <- gsub("\\)", "\\\\)", x)
-  x <- gsub("\\[", "\\\\]", x)
-  x <- gsub("\\[", "\\\\]", x)
-}
-
 #' Magic Mirror for html table --------
 #'
 #' @param kable_input The output of kable
diff --git a/R/util.R b/R/util.R
index a500879..802a56a 100644
--- a/R/util.R
+++ b/R/util.R
@@ -68,4 +68,18 @@
   return(mapping_matrix)
 }
 
+regex_escape <- function(x, double_backslash = FALSE) {
+  if (double_backslash) {
+    x <- gsub("\\\\", "\\\\\\\\", x)
+  }
+  x <- gsub("\\$", "\\\\\\$", x)
+  x <- gsub("\\(", "\\\\(", x)
+  x <- gsub("\\)", "\\\\)", x)
+  x <- gsub("\\[", "\\\\]", x)
+  x <- gsub("\\[", "\\\\]", x)
+  x <- gsub("\\{", "\\\\{", x)
+  x <- gsub("\\}", "\\\\}", x)
+  x <- gsub("\\*", "\\\\*", x)
+  return(x)
+}
 
