diff --git a/R/footnote.R b/R/footnote.R
index 96af153..9999be7 100644
--- a/R/footnote.R
+++ b/R/footnote.R
@@ -47,9 +47,9 @@
   if (kable_format == "html") {
     return(footnote_html(kable_input, footnote_table, footnote_as_chunk))
   }
-  # if (kable_format == "latex") {
-  #   return(footnote_latex(kable_input, footnote_table))
-  # }
+  if (kable_format == "latex") {
+    return(footnote_latex(kable_input, footnote_table, footnote_as_chunk))
+  }
 }
 
 footnote_table_maker <- function(format, footnote_titles, footnote_contents) {
@@ -147,8 +147,55 @@
 # LaTeX
 footnote_latex <- function(kable_input, footnote_table, footnote_as_chunk) {
   table_info <- magic_mirror(kable_input)
+  out <- enc2utf8(as.character(kable_input))
+  if (table_info$tabular == "longtable") {
+    return()
+  }
+  footnote_text <- latex_tfoot_maker(footnote_table, footnote_as_chunk,
+                                     table_info$ncol)
+  out <- sub(table_info$end_tabular,
+             paste0(footnote_text, "\n\\\\end{", table_info$tabular, "}"),
+             out)
+  out <- structure(out, format = "latex", class = "knitr_kable")
+  attr(out, "kable_meta") <- table_info
+  return(out)
 
+}
 
+latex_tfoot_maker <- function(footnote_table, footnote_as_chunk, ncol) {
+  footnote_types <- names(footnote_table$contents)
+  footnote_text <- c()
+  for (i in footnote_types) {
+    footnote_text <- c(footnote_text, latex_tfoot_maker_(
+      footnote_table$contents[[i]], footnote_table$titles[[i]], i,
+      footnote_as_chunk, ncol))
+  }
+  footnote_text <- paste0(footnote_text, collapse = "\n")
+  return(footnote_text)
+}
 
-
+latex_tfoot_maker_ <- function(ft_contents, ft_title, ft_type, ft_chunk, ncol) {
+  footnote_text <- apply(ft_contents, 1, function(x) {
+    if (x[1] == "") {
+      x[2]
+    } else {
+      paste0('\\\\textsuperscript{', x[1], '} ', x[2])
+    }
+  })
+  if (ft_title != "") {
+    title_text <- paste0('\\\\textbf{', ft_title, '} ')
+    footnote_text <- c(title_text, footnote_text)
+  }
+  if (!ft_chunk) {
+    footnote_text <- paste0(
+      '\\\\multicolumn{', ncol, '}{l}{', footnote_text, '}\\\\\\\\'
+    )
+  } else {
+    footnote_text <- paste0(
+      '\\\\multicolumn{', ncol, '}{l}{',
+      paste0(footnote_text, collapse = " "),
+      '}\\\\\\\\'
+    )
+  }
+  return(footnote_text)
 }
diff --git a/R/footnote_marker.R b/R/footnote_marker.R
index b0d1988..45ffafb 100644
--- a/R/footnote_marker.R
+++ b/R/footnote_marker.R
@@ -11,7 +11,7 @@
   if (format == "html") {
     return(paste0("<sup>", x, "</sup>"))
   } else {
-    return(paste0("\\\\textsuperscript{", x, "}"))
+    return(paste0("\\textsuperscript{", x, "}"))
   }
 }
 
@@ -28,7 +28,7 @@
   if (format == "html") {
     return(paste0("<sup>", x, "</sup>"))
   } else {
-    return(paste0("\\\\textsuperscript{", x, "}"))
+    return(paste0("\\textsuperscript{", x, "}"))
   }
 }
 
@@ -48,6 +48,6 @@
     return(paste0("<sup>", x, "</sup>"))
   } else {
     x <- number_index$symbol.latex[x]
-    return(paste0("\\\\textsuperscript{", x, "}"))
+    return(paste0("\\textsuperscript{", x, "}"))
   }
 }
