diff --git a/R/footnote.R b/R/footnote.R
index 8724141..e35a9f1 100644
--- a/R/footnote.R
+++ b/R/footnote.R
@@ -14,11 +14,13 @@
 #' "number", "alphabet" and "symbol".
 #'
 #' @export
-add_footnote <- function(input, label = NULL, notation = "alphabet", threeparttable = F) {
+add_footnote <- function(input, label = NULL, notation = "alphabet",
+                         threeparttable = F) {
   if (is.null(label)){return(input)}
   # Define available id list
   if (!notation %in% c("number", "alphabet", "symbol")){
-    warning('Please select your notation within "number", "alphabet" and "symbol". Now add_footnote is using "alphabet" as default.')
+    warning('Please select your notation within "number", "alphabet" and ',
+            '"symbol". Now add_footnote is using "alphabet" as default.')
   }
   if (notation == "symbol") {notation = paste0(notation, ".", attr(input, "format"))}
   ids.ops <- data.frame(
@@ -27,14 +29,18 @@
     symbol.latex = c(
       "*", "\\\\dag", "\\\\ddag", "\\\\S", "\\\\P",
       "**", "\\\\dag\\\\dag", "\\\\ddag\\\\ddag", "\\\\S\\\\S", "\\\\P\\\\P",
-      "***", "\\\\dag\\\\dag\\\\dag", "\\\\ddag\\\\ddag\\\\ddag", "\\\\S\\\\S\\\\S", "\\\\P\\\\P\\\\P",
-      "****", "\\\\dag\\\\dag\\\\dag\\\\dag", "\\\\ddag\\\\ddag\\\\ddag\\\\ddag", "\\\\S\\\\S\\\\S\\\\S", "\\\\P\\\\P\\\\P\\\\P"
+      "***", "\\\\dag\\\\dag\\\\dag", "\\\\ddag\\\\ddag\\\\ddag",
+      "\\\\S\\\\S\\\\S", "\\\\P\\\\P\\\\P",
+      "****", "\\\\dag\\\\dag\\\\dag\\\\dag", "\\\\ddag\\\\ddag\\\\ddag\\\\ddag",
+      "\\\\S\\\\S\\\\S\\\\S", "\\\\P\\\\P\\\\P\\\\P"
     ),
     symbol.html = c(
       "*", "&dagger;", "&Dagger;", "&sect;", "&para;",
       "**", "&dagger;&dagger;", "&Dagger;&Dagger;", "&sect;&sect;", "&para;&para;",
-      "*", "&dagger;&dagger;&dagger;", "&Dagger;&Dagger;&Dagger;", "&sect;&sect;&sect;", "&para;&para;&para;",
-      "**", "&dagger;&dagger;&dagger;&dagger;", "&Dagger;&Dagger;&Dagger;&Dagger;", "&sect;&sect;&sect;&sect;", "&para;&para;&para;&para;"
+      "*", "&dagger;&dagger;&dagger;", "&Dagger;&Dagger;&Dagger;",
+      "&sect;&sect;&sect;", "&para;&para;&para;",
+      "**", "&dagger;&dagger;&dagger;&dagger;", "&Dagger;&Dagger;&Dagger;&Dagger;",
+      "&sect;&sect;&sect;&sect;", "&para;&para;&para;&para;"
     ),
     symbol.markdown = c(
       "\\*", "†", "‡", "§", "¶",
@@ -50,6 +56,7 @@
     )
   )
   ids <- ids.ops[,notation]
+  # pandoc cannot recognize ^*^ as * is a special character. We have to use ^\*^
   ids.intable <- gsub("\\*", "\\\\*", ids)
 
   #count the number of items in label and intable notation
@@ -60,8 +67,14 @@
                   count.intablenoot, "[note] in your table."))
   }
 
+  export <- input
+
+  # 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
+  # time to define their `kable` output.
   if(!attr(input, "format") %in% c("html", "latex")){
-    export <- input
+    # In table notation
     if(count.intablenoot != 0){
       for(i in 1:count.intablenoot){
         export[which(str_detect(export, "\\[note\\]"))[1]] <-
@@ -70,6 +83,20 @@
               collapse = "")), export[which(str_detect(export, "\\[note\\]"))[1]])
       }
     }
+    # Fix extra in table notation
+    extra.notation <- as.numeric(
+      str_extract(
+        str_extract_all(
+          paste0(export, collapse = ""), "\\[note[0-9]{1,2}\\]"
+          )[[1]],
+        "[0-9]{1,2}"))
+    for(i in extra.notation){
+      export <- gsub(paste0("\\[note", i, "\\]"),
+                     paste0("^", ids.intable[i], "^",
+                            paste0(rep(" ", 4 - nchar(as.character(ids[i]))),
+                            collapse = "")),
+                     export)
+    }
 
     export[length(export)+1] <- ""
     export[length(export)+1] <- "__Note:__"
@@ -80,13 +107,17 @@
 
   # Generate latex table footnote --------------------------------
   if(attr(input, "format")=="latex"){
+    kable_info <- magic_mirror(input)
+    if(threeparttable == F | latex.tabular == "longtable"){
+
+    }
     # 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(grepl("\\\\begin\\{longtable\\}", input)){
-
       for(i in 1:count.intablenoot){
-        input <- sub("\\[note\\]", paste0("\\\\footnote[", ids[i], "]{", label[i], "}"), input)
+        export <- sub("\\[note\\]",
+                    paste0("\\\\footnote[", ids[i], "]{", label[i], "}"), export)
       }
     }else{
       # Regular cases other than longtable
@@ -98,13 +129,14 @@
 
       # Replace in-table notation with appropriate symbol
       for(i in 1:count.intablenoot){
-        input <- sub("\\[note\\]", paste0("\\\\textsuperscript{", ids[i], "}"), input)
+        export <- sub("\\[note\\]", paste0("\\\\textsuperscript{", ids[i], "}"), export)
       }
 
-      if(grepl("\\\\caption\\{.*?\\}", input)){
-        export <- sub("\\\\caption\\{", "\\\\begin{threeparttable}\n\\\\caption{", input)
+      if(grepl("\\\\caption\\{.*?\\}", export)){
+        export <- sub("\\\\caption\\{", "\\\\begin{threeparttable}\n\\\\caption{", export)
       }else{
-        export <- sub("\\\\begin\\{tabular\\}", "\\\\begin{threeparttable}\n\\\\begin{tabular}", input)
+        export <- sub("\\\\begin\\{tabular\\}",
+                      "\\\\begin{threeparttable}\n\\\\begin{tabular}", export)
       }
       export <- gsub(
         "\\\\end\\{tabular\\}",
@@ -116,7 +148,6 @@
     }
   }
   if(attr(input, "format")=="html"){
-    export <- input
   }
   return(export)
 }
diff --git a/R/magic_mirror.R b/R/magic_mirror.R
index 0fa726c..af77b50 100644
--- a/R/magic_mirror.R
+++ b/R/magic_mirror.R
@@ -5,24 +5,46 @@
 #' @export
 
 magic_mirror <- function(input){
-  if(!"knitr_kable" %in% attr(input, "format")){
+  if(!"knitr_kable" %in% attr(input, "class")){
     warning("magic_mirror may not be able to produce correct result if the",
             " input table is not rendered by knitr::kable. ")
   }
   kable_format <- attr(input, "format")
   if (kable_format == "latex"){
-    magic_mirror_latex(input)
+    kable_info <- magic_mirror_latex(input)
   }
   if (kable_format == "html"){
-    magic_mirror_html(input)
+    kable_info <- magic_mirror_html(input)
   }
+  return(kable_info)
 }
 
 #' Magic mirror for latex tables
 magic_mirror_latex <- function(input){
-  # kable will put a begin{table} shell if caption is not NULL
-  caption <- ifelse(
-    str_detect(input, "\\\\caption\\{.*?\\}"),
-    str_match(input, "caption\\{(.*?)\\}")[2], NULL
+  kable_info <- list(tabular = NULL, booktabs = NULL, align = NULL,
+                     ncol=NULL, nrow=NULL, colnames = NULL, rownames = NULL,
+                     caption = NULL, contents = NULL)
+  # Tabular
+  kable_info$tabular <- ifelse(
+    grepl("\\\\begin\\{tabular\\}", input),
+    "tabular", "longtable"
   )
+  # Booktabs
+  kable_info$booktabs <- ifelse(grepl("\\\\toprule", input), TRUE, FALSE)
+  # Align
+  kable_info$align <- gsub("\\|", "", str_match(
+    input, paste0("\\\\begin\\{", kable_info$tabular,"\\}\\{(.*?)\\}"))[2])
+  # N of columns
+  kable_info$ncol <- nchar(kable_info$align)
+  # N of rows
+  kable_info$nrow <- str_count(input, "\\\\\n")
+  # Caption
+  kable_info$caption <- str_match(input, "caption\\{(.*?)\\}")[2]
+  # Contents
+  kable_info$contents <- str_match_all(input, "\n(.*)\\\\\\\\")[[1]][,2]
+  # Column names
+  kable_info$colnames <- str_split(kable_info$contents[1], " \\& ")[[1]]
+  # Row names
+  kable_info$rownames <- str_extract(kable_info$contents, "^[^ &]*")
+  return(kable_info)
 }
