diff --git a/R/footnote.R b/R/footnote.R
index 296c977..7fdec04 100644
--- a/R/footnote.R
+++ b/R/footnote.R
@@ -20,6 +20,10 @@
 #' the footnotes should be printed in a chunk (without line break).
 #' @param escape T/F value. It controls whether the contents and titles should
 #' be escaped against HTML or LaTeX. Default is TRUE.
+#' @param threeparttable T/F value for whether to use LaTeX package
+#' threeparttable. Threeparttable will force the width of caption and
+#' footnotes be the width of the original table. It's useful when you have
+#' long paragraph of footnotes.
 #' @param general_title Section header for general footnotes. Default is
 #' "Note: ".
 #' @param number_title Section header for number footnotes. Default is "".
@@ -39,6 +43,7 @@
                                         "alphabet", "symbol"),
                      footnote_as_chunk = FALSE,
                      escape = TRUE,
+                     threeparttable = FALSE,
                      general_title = "Note: ",
                      number_title = "",
                      alphabet_title = "",
@@ -87,7 +92,8 @@
     return(footnote_html(kable_input, footnote_table, footnote_as_chunk))
   }
   if (kable_format == "latex") {
-    return(footnote_latex(kable_input, footnote_table, footnote_as_chunk))
+    return(footnote_latex(kable_input, footnote_table, footnote_as_chunk,
+                          threeparttable))
   }
 }
 
@@ -183,32 +189,67 @@
 }
 
 # LaTeX
-footnote_latex <- function(kable_input, footnote_table, footnote_as_chunk) {
+footnote_latex <- function(kable_input, footnote_table, footnote_as_chunk,
+                           threeparttable) {
   table_info <- magic_mirror(kable_input)
   out <- enc2utf8(as.character(kable_input))
+
+  if (table_info$tabular == "longtable") {
+    threeparttable <- FALSE
+    warning("threeparttable does not support longtable.")
+  }
   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)
+                                     table_info$ncol, threeparttable)
+  if (threeparttable) {
+    if (grepl("\\\\caption\\{.*?\\}", out)) {
+      out <- sub("\\\\caption\\{", "\\\\begin{threeparttable}\n\\\\caption{",
+                 out)
+    } else {
+      out <- sub(paste0("\\\\begin\\{", table_info$tabular, "\\}"),
+                 paste0("\\\\begin{threeparttable}\n\\\\begin{",
+                        table_info$tabular, "}"),
+                 out)
+    }
+    out <- sub(table_info$end_tabular,
+               paste0("\\\\end{", table_info$tabular,
+                      "}\n\\\\begin{tablenotes}",
+                      ifelse(footnote_as_chunk, "[para]", ""),
+                      "\n\\\\small\n", footnote_text,
+                      "\n\\\\end{tablenotes}\n\\\\end{threeparttable}"),
+               out)
+  } else {
+    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) {
+latex_tfoot_maker <- function(footnote_table, footnote_as_chunk, ncol,
+                              threeparttable) {
   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))
+  if (threeparttable) {
+    for (i in footnote_types) {
+      footnote_text <- c(footnote_text, latex_tfoot_maker_tpt_(
+        footnote_table$contents[[i]], footnote_table$titles[[i]],
+        footnote_as_chunk, ncol))
+    }
+  } else {
+    for (i in footnote_types) {
+      footnote_text <- c(footnote_text, latex_tfoot_maker_(
+        footnote_table$contents[[i]], footnote_table$titles[[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) {
+latex_tfoot_maker_ <- function(ft_contents, ft_title, ft_chunk, ncol) {
   footnote_text <- apply(ft_contents, 1, function(x) {
     if (x[1] == "") {
       x[2]
@@ -233,3 +274,24 @@
   }
   return(footnote_text)
 }
+
+latex_tfoot_maker_tpt_ <- function(ft_contents, ft_title, ft_chunk, ncol) {
+  footnote_text <- apply(ft_contents, 1, function(x) {
+    if (x[1] == "") {
+      paste0('\\\\item ', x[2])
+    } else {
+      paste0('\\\\item[', x[1], '] ', x[2])
+    }
+  })
+  if (ft_title != "") {
+    title_text <- paste0('\\\\item \\\\textbf{', ft_title, '} ')
+    footnote_text <- c(title_text, footnote_text)
+  }
+  footnote_text <- paste0(footnote_text, collapse = "\n")
+  # if (!ft_chunk) {
+  #   footnote_text <- paste0(footnote_text, collapse = "\n")
+  # } else {
+  #   footnote_text <- paste0(footnote_text, collapse = " ")
+  # }
+  return(footnote_text)
+}
