diff --git a/R/footnote.R b/R/footnote.R
index eeb55e6..121066b 100644
--- a/R/footnote.R
+++ b/R/footnote.R
@@ -28,19 +28,19 @@
   ids.ops <- read.csv(system.file("symbol_index.csv", package = "kableExtra"))
   ids <- ids.ops[, notation]
   ids.intable <- gsub("\\*", "\\\\*", ids)
-  ids.simple <- c(
-    "*", "\u2020", "\u2021", "\u00A7", "\u00B6",
-    "**", "\u2020\u2020", "\u2021\u2021", "\u00A7\u00A7", "\u00B6\u00B6",
-    "***", "\u2020\u2020\u2020", "\u2021\u2021\u2021",
-    "\u00A7\u00A7\u00A7", "\u00B6\u00B6\u00B6",
-    "****", "\u2020\u2020\u2020\u2020", "\u2021\u2021\u2021\u2021",
-    "\u00A7\u00A7\u00A7\u00A7", "\u00B6\u00B6\u00B6\u00B6"
-  )
+  # ids.simple <- c(
+  #   "*", "\u2020", "\u2021", "\u00A7", "\u00B6",
+  #   "**", "\u2020\u2020", "\u2021\u2021", "\u00A7\u00A7", "\u00B6\u00B6",
+  #   "***", "\u2020\u2020\u2020", "\u2021\u2021\u2021",
+  #   "\u00A7\u00A7\u00A7", "\u00B6\u00B6\u00B6",
+  #   "****", "\u2020\u2020\u2020\u2020", "\u2021\u2021\u2021\u2021",
+  #   "\u00A7\u00A7\u00A7\u00A7", "\u00B6\u00B6\u00B6\u00B6"
+  # )
 
   #count the number of items in label and intable notation
   count.label <- length(label)
   count.intablenote <- sum(str_count(input, "\\[note\\]"))
-  if (count.intablenote != 0 & count.label != count.intablenote){
+  if (count.intablenote != 0 & count.label != count.intablenote) {
     warning(paste("You entered", count.label, "labels but you put",
                   count.intablenote, "[note] in your table."))
   }
@@ -55,8 +55,7 @@
       )[[1]],
       "[0-9]{1,2}")))
 
-
-
+  # Pandoc ---------------------------
   # Footnote solution for markdown and pandoc. It is not perfect as
   # markdown doesn't support complex table formats but this solution
   # should be able to satisfy people who don't want to spend extra
@@ -66,7 +65,7 @@
     if (count.intablenote != 0) {
       for (i in 1:count.intablenote) {
         replace_note <- paste0("^", ids.intable[i], "^",
-          paste0(rep(" ", 4 - ceiling(i/5)), collapse = ""))
+                               paste0(rep(" ", 4 - ceiling(i/5)), collapse = ""))
 
         export[which(str_detect(export, "\\[note\\]"))[1]] <-
           sub("\\[note\\]", replace_note,
@@ -74,136 +73,148 @@
       }
     }
     # Fix extra in table notation
-    for(i in extra.notation){
+    for (i in extra.notation) {
       export <- gsub(paste0("\\[note", i, "\\]"),
                      paste0("^", ids.intable[i], "^",
-                            paste0(rep(" ", 4 - ceiling(i/5)),
-                            collapse = "")),
+                            paste0(rep(" ", 4 - ceiling(i/5)), collapse = "")),
                      export)
     }
 
-    export[length(export)+1] <- ""
-    export[length(export)+1] <- "__Note:__"
-    export[length(export)+1] <- paste0(
+    export[length(export) + 1] <- ""
+    export[length(export) + 1] <- "__Note:__"
+    export[length(export) + 1] <- paste0(
       paste0("^", ids[1:length(label)], "^ ", label), collapse = " "
-      )
-    }
+    )
+  }
 
-  # Generate latex table footnote --------------------------------
-  if(attr(input, "format")=="latex"){
+  # LaTeX Tables --------------------------------
+  if (attr(input, "format") == "latex") {
     # Clean the entry for labels
-      label <- knitr:::escape_latex(label)
-      label <- gsub("\\\\", "\\\\\\\\", label)
+    label <- escape_latex(label)
+    label <- gsub("\\\\", "\\\\\\\\", label)
 
     kable_info <- magic_mirror(input)
-    if(kable_info$tabular == "longtable"){
-      if(notation != "number"){
-        warning("Currently, if you enabled longtable in kable, you can only use",
-                " number as your footnote notations. ")
-      }
-      if(threeparttable == T){
-        warning("Currently, threeparttable does not support longtable.")
+    if (kable_info$tabular == "longtable") {
+      if (notation != "number") {
+        warning("Notation is set to 'number' and other formats are not supported.")
+        notation <- "number"
       }
       # If longtable is used, then use page footnote instead of threeparttable
       # as it makes more sense to see the footnote at the bottom of page if
       # table is longer than one page.
+      if (threeparttable == T) {
+        warning("Threeparttable does not support longtable.")
+        threeparttable = F
+      }
 
       # Longtable doesn't support footnote in caption directly.
       # See http://tex.stackexchange.com/questions/50151/footnotes-in-longtable-captions
-      count.in.caption.note <- str_count(kable_info$caption, "\\[note\\]")
-      if (count.in.caption.note != 0){
-        # Since caption is the first part of table, we can just start
-        caption.footnote <- paste0("\\\\addtocounter{footnote}{-", count.in.caption.note, "}")
-        for(i in 1:count.in.caption.note){
+
+      count.in.caption.note <- 0
+      if (!is.na(kable_info$caption)) {
+        count.in.caption.note <- str_count(kable_info$caption, "\\[note\\]")
+      }
+      if (count.in.caption.note != 0) {
+        caption.footnote <- paste0("\\\\addtocounter{footnote}{-",
+                                   count.in.caption.note, "}")
+        for (i in 1:count.in.caption.note) {
           export <- sub("\\[note\\]", "\\\\protect\\\\footnotemark ", export)
           caption.footnote <- paste0(
-            caption.footnote, "\n\\\\stepcounter{footnote}\\\\footnotetext{", label[i], "}"
-          )
+            caption.footnote, "\n\\\\stepcounter{footnote}\\\\footnotetext{",
+            label[i], "}")
         }
 
-        if (str_detect(export, "\\\\toprule")){
+        if (str_detect(export, "\\\\toprule")) {
           export <- sub("\\\\toprule",
                         paste0("\\\\toprule\n", caption.footnote), export)
-        }else{
+        } else {
           export <- sub("\\\\hline",
                         paste0("\\\\hline\n", caption.footnote), export)
         }
       }
-      for(i in (count.in.caption.note + 1):count.intablenote){
+      for (i in (count.in.caption.note + 1):count.intablenote) {
         export <- sub("\\[note\\]",
                       paste0("\\\\footnote[", i, "]{", label[i], "}"), export)
       }
-      for(i in extra.notation){
+      for (i in extra.notation) {
         export <- gsub(paste0("\\[note", i, "\\]"),
                        paste0("\\\\footnotemark[", i, "]"),
                        export)
       }
-    }else{
+    } else {
       # Replace in-table notation with appropriate symbol
-      for(i in 1:count.intablenote){
-        export <- sub("\\[note\\]", paste0("\\\\textsuperscript{", ids.intable[i], "}"), export)
+      for (i in 1:count.intablenote) {
+        export <- sub("\\[note\\]",
+                      paste0("\\\\textsuperscript{", ids.intable[i], "}"),
+                      export)
       }
 
       # Fix extra in table notation
-      for(i in extra.notation){
+      for (i in extra.notation) {
         export <- gsub(paste0("\\[note", i, "\\]"),
                        paste0("\\\\textsuperscript{", ids.intable[i], "}"),
                        export)
       }
-      if(threeparttable == T){
+      if (threeparttable == T) {
         # generate footer with appropriate symbol
         footer <- ""
-        for(i in 1:count.label){
+        for (i in 1:count.label) {
           footer <- paste0(footer,"\\\\item [", ids[i], "] ", label[i], "\n")
         }
 
-        if(grepl("\\\\caption\\{.*?\\}", export)){
-          export <- sub("\\\\caption\\{", "\\\\begin{threeparttable}\n\\\\caption{", export)
-        }else{
+        if (grepl("\\\\caption\\{.*?\\}", export)) {
+          export <- sub("\\\\caption\\{",
+                        "\\\\begin{threeparttable}\n\\\\caption{",
+                        export)
+        } else {
           export <- sub("\\\\begin\\{tabular\\}",
-                        "\\\\begin{threeparttable}\n\\\\begin{tabular}", export)
+                        "\\\\begin{threeparttable}\n\\\\begin{tabular}",
+                        export)
         }
         export <- gsub(
           "\\\\end\\{tabular\\}",
-          paste0(
-            "\\\\end{tabular}\n\\\\begin{tablenotes}\n\\\\small\n",
-            footer, "\\\\end{tablenotes}\n\\\\end{threeparttable}"
-          ),
+          paste0("\\\\end{tabular}\n\\\\begin{tablenotes}\n\\\\small\n",
+                 footer, "\\\\end{tablenotes}\n\\\\end{threeparttable}"),
           export)
-      }else{
-          table.width <- max(nchar(
-            str_replace_all(
-              str_replace_all(kable_info$contents, "\\[note\\]", ""),
-              "\\[note[0-9]{1,2}\\]", ""))) + 2 * (kable_info$ncol - 1)
-          footer <- ""
-          for (i in 1:count.label){
-            label.wrap <- strwrap(label[i], table.width)
-            footer <- paste0(footer, "\\\\multicolumn{", kable_info$ncol,
-                             "}{l}{\\\\textsuperscript{", ids[i], "} ",
-                             label.wrap[1], "}\\\\\\\\\n")
-            if(length(label.wrap) > 1){
-              for (j in 2:length(label.wrap)){
-                footer <- paste0(footer, "\\\\multicolumn{", kable_info$ncol,
-                                 "}{l}{", label.wrap[j], "}\\\\\\\\\n")
-              }
+      } else {
+        table.width <- max(nchar(
+          str_replace_all(
+            str_replace_all(kable_info$contents, "\\[note\\]", ""),
+            "\\[note[0-9]{1,2}\\]", ""))) + 2 * (kable_info$ncol - 1)
+        footer <- ""
+        for (i in 1:count.label) {
+          label.wrap <- strwrap(label[i], table.width)
+          footer <- paste0(footer, "\\\\multicolumn{", kable_info$ncol,
+                           "}{l}{\\\\textsuperscript{", ids[i], "} ",
+                           label.wrap[1], "}\\\\\\\\\n")
+          if (length(label.wrap) > 1) {
+            for (j in 2:length(label.wrap)) {
+              footer <- paste0(footer, "\\\\multicolumn{", kable_info$ncol,
+                               "}{l}{", label.wrap[j], "}\\\\\\\\\n")
             }
           }
-          export <- gsub("\\\\end\\{tabular\\}",
-                         paste0(footer, "\\\\end{tabular}"), export)
+        }
+        export <- gsub("\\\\end\\{tabular\\}",
+                       paste0(footer, "\\\\end{tabular}"),
+                       export)
       }
     }
   }
-  if(attr(input, "format")=="html"){
+
+  # HTML Tables -------------------
+  if (attr(input, "format") == "html") {
     # Clean the entry for labels
-    label <- knitr:::escape_html(label)
+    label <- escape_html(label)
 
     # Replace in-table notation with appropriate symbol
-    for(i in 1:count.intablenote){
-      export <- sub("\\[note\\]", paste0("<sup>", ids.intable[i], "</sup>"), export)
+    for (i in 1:count.intablenote) {
+      export <- sub("\\[note\\]",
+                    paste0("<sup>", ids.intable[i], "</sup>"),
+                    export)
     }
 
     # Fix extra in table notation
-    for(i in extra.notation){
+    for (i in extra.notation) {
       export <- gsub(paste0("\\[note", i, "\\]"),
                      paste0("<sup>", ids.intable[i], "</sup>"),
                      export)
@@ -211,7 +222,7 @@
 
     # Build footer
     footer <- "<tfoot>\n"
-    for(i in 1:count.label){
+    for (i in 1:count.label) {
       footer <- paste0(footer, "<tr>\n<td style = 'padding: 0; border:0;' ",
                        "colspan='100%'><sup>", ids[i],"</sup> ",
                        label[i], "</td>\n</tr>\n")
diff --git a/R/from_knitr.R b/R/from_knitr.R
new file mode 100644
index 0000000..f782a19
--- /dev/null
+++ b/R/from_knitr.R
@@ -0,0 +1,25 @@
+# These functions are imported from knitr/highr as `:::` is not recommended by
+# CRAN
+
+#' escape special LaTeX characters
+#' @author Yihui Xie
+escape_latex <- function(x, newlines = FALSE, spaces = FALSE) {
+  x = gsub('\\\\', '\\\\textbackslash', x)
+  x = gsub('([#$%&_{}])', '\\\\\\1', x)
+  x = gsub('\\\\textbackslash', '\\\\textbackslash{}', x)
+  x = gsub('~', '\\\\textasciitilde{}', x)
+  x = gsub('\\^', '\\\\textasciicircum{}', x)
+  if (newlines) x = gsub('(?<!\n)\n(?!\n)', '\\\\\\\\', x, perl = TRUE)
+  if (spaces) x = gsub('  ', '\\\\ \\\\ ', x)
+  x
+}
+
+#' escape special HTML characters
+#' @author Yihui Xie
+escape_html <- function(x) {
+  x = gsub('&', '&amp;', x)
+  x = gsub('<', '&lt;', x)
+  x = gsub('>', '&gt;', x)
+  x = gsub('"', '&quot;', x)
+  x
+}
