extra changes for footnote with threeparttable
diff --git a/R/footnote.R b/R/footnote.R
index 54929d0..77452ab 100644
--- a/R/footnote.R
+++ b/R/footnote.R
@@ -197,13 +197,10 @@
   table_info <- magic_mirror(kable_input)
   out <- enc2utf8(as.character(kable_input))
 
-  # if (table_info$tabular == "longtable" & threeparttable == TRUE) {
-  #   threeparttable <- FALSE
-  #   warning("threeparttable does not support longtable.")
-  # }
   footnote_text <- latex_tfoot_maker(footnote_table, footnote_as_chunk,
                                      table_info$ncol, threeparttable)
   if (threeparttable) {
+    if (table_info$tabular %in% c("longtable", "longtabu") ) {
       out <- sub(paste0("\\\\begin\\{", table_info$tabular, "\\}"),
                  paste0("\\\\begin{ThreePartTable}\n\\\\begin{TableNotes}",
                         ifelse(footnote_as_chunk, "[para]", ""),
@@ -211,24 +208,43 @@
                         "\n\\\\end{TableNotes}\n\\\\begin{",
                         table_info$tabular, "}"),
                  out)
-    out <- sub(table_info$end_tabular,
-               paste0("\\\\end{", table_info$tabular,
-                      "}\n\\\\end{ThreePartTable}"),
-               out)
-    if (table_info$booktabs) {
-      out <- sub("\\\\bottomrule", "\\\\bottomrule\n\\\\insertTableNotes", out)
+      out <- sub(paste0("\\\\end\\{",table_info$tabular, "\\}"),
+                 paste0("\\\\end{", table_info$tabular,
+                        "}\n\\\\end{ThreePartTable}"),
+                 out)
+      if (table_info$booktabs) {
+        out <- sub("\\\\bottomrule", "\\\\bottomrule\n\\\\insertTableNotes", out)
+      } else {
+        out <- sub("\\\\hline\n\\\\end\\{longtable\\}",
+                   "\\\\hline\n\\\\insertTableNotes\n\\\\end\\{longtable\\}",
+                   out)
+      }
     } else {
-      out <- sub("\\\\hline\n\\\\end\\{longtable\\}",
-                 "\\\\hline\n\\\\insertTableNotes\n\\\\end\\{longtable\\}",
+      if (table_info$tabular == "tabu") {
+        stop("Please use `longtable = T` in your kable function. ",
+             "Full width threeparttable only works with longtable.")
+      }
+      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 if (table_info$booktabs) {
-    out <- sub("\\\\bottomrule",
-               paste0("\\\\bottomrule\n", footnote_text), out)
   } else {
-    out <- sub(table_info$end_tabular,
-               paste0(footnote_text, "\n\\\\end{", table_info$tabular, "}"),
-               out)
+    if (table_info$booktabs) {
+      out <- sub("\\\\bottomrule",
+                 paste0("\\\\bottomrule\n", footnote_text), 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")
diff --git a/R/zzz.R b/R/zzz.R
index 38c06b0..a444d34 100644
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -11,6 +11,7 @@
     usepackage_latex("colortbl")
     usepackage_latex("pdflscape")
     usepackage_latex("tabu")
+    usepackage_latex("threeparttable")
     usepackage_latex("threeparttablex")
     usepackage_latex("ulem", "normalem")
   }
diff --git a/docs/awesome_table_in_html.html b/docs/awesome_table_in_html.html
index 488610d..e6c75b3 100644
--- a/docs/awesome_table_in_html.html
+++ b/docs/awesome_table_in_html.html
@@ -11,7 +11,7 @@
 
 <meta name="author" content="Hao Zhu" />
 
-<meta name="date" content="2018-01-16" />
+<meta name="date" content="2018-03-26" />
 
 <title>Create Awesome HTML Table with knitr::kable and kableExtra</title>
 
@@ -219,7 +219,7 @@
 
 <h1 class="title toc-ignore">Create Awesome HTML Table with knitr::kable and kableExtra</h1>
 <h4 class="author"><em>Hao Zhu</em></h4>
-<h4 class="date"><em>2018-01-16</em></h4>
+<h4 class="date"><em>2018-03-26</em></h4>
 
 </div>
 
@@ -243,9 +243,8 @@
 <div id="getting-started" class="section level1">
 <h1>Getting Started</h1>
 <p>Here we are using the first few columns and rows from dataset <code>mtcars</code></p>
-<pre class="r"><code>library(knitr)</code></pre>
-<pre><code>## Warning: package 'knitr' was built under R version 3.4.3</code></pre>
-<pre class="r"><code>library(kableExtra)
+<pre class="r"><code>library(knitr)
+library(kableExtra)
 dt &lt;- mtcars[1:5, 1:6]</code></pre>
 <p>When you are using <code>kable()</code>, if you don’t specify <code>format</code>, by default it will generate a markdown table and let pandoc handle the conversion from markdown to HTML/PDF. This is the most favorable approach to render most simple tables as it is format independent. If you switch from HTML to pdf, you basically don’t need to change anything in your code. However, markdown doesn’t support complex table. For example, if you want to have a double-row header table, markdown just cannot provide you the functionality you need. As a result, when you have such a need, you should <strong>define <code>format</code> in <code>kable()</code></strong> as either “html” or “latex”. <em>You can also define a global option at the beginning using <code>options(knitr.table.format = &quot;html&quot;)</code> so you don’t repeat the step everytime.</em> <strong>In this tutorial, I’ll still put <code>format=&quot;html&quot;</code> in the function in case users just want to quickly replicate the results.</strong></p>
 <pre class="r"><code>options(knitr.table.format = &quot;html&quot;) 
@@ -2102,7 +2101,8 @@
 <p>This package also comes with a few helper functions, including <code>spec_color</code>, <code>spec_font_size</code> &amp; <code>spec_angle</code>. These functions can rescale continuous variables to certain scales. For example, function <code>spec_color</code> would map a continuous variable to any <a href="https://CRAN.R-project.org/package=viridisLite">viridis color palettes</a>. It offers a very visually impactful representation in a tabular format.</p>
 <pre class="r"><code>iris[1:10, ] %&gt;%
   mutate_if(is.numeric, function(x) {
-    cell_spec(x, &quot;html&quot;, bold = T, color = spec_color(x, end = 0.9),
+    cell_spec(x, &quot;html&quot;, bold = T, 
+              color = spec_color(x, end = 0.9),
               font_size = spec_font_size(x))
   }) %&gt;%
   mutate(Species = cell_spec(
@@ -3125,7 +3125,7 @@
 </td>
 </tr>
 <tr>
-<td style="text-align:left; padding-left: 2em;" indentLevel="1">
+<td style="text-align:left; padding-left: 2em;" indentlevel="1">
 Merc 240D
 </td>
 <td style="text-align:right;">
@@ -3148,7 +3148,7 @@
 </td>
 </tr>
 <tr>
-<td style="text-align:left; padding-left: 2em;" indentLevel="1">
+<td style="text-align:left; padding-left: 2em;" indentlevel="1">
 Merc 230
 </td>
 <td style="text-align:right;">
@@ -3171,7 +3171,7 @@
 </td>
 </tr>
 <tr>
-<td style="text-align:left; padding-left: 2em;" indentLevel="1">
+<td style="text-align:left; padding-left: 2em;" indentlevel="1">
 Merc 280
 </td>
 <td style="text-align:right;">
@@ -3282,7 +3282,7 @@
 </td>
 </tr>
 <tr>
-<td style="text-align:left; padding-left: 2em;" indentLevel="1">
+<td style="text-align:left; padding-left: 2em;" indentlevel="1">
 Datsun 710
 </td>
 <td style="text-align:right;">
@@ -3305,7 +3305,7 @@
 </td>
 </tr>
 <tr>
-<td style="text-align:left; padding-left: 2em;" indentLevel="1">
+<td style="text-align:left; padding-left: 2em;" indentlevel="1">
 Hornet 4 Drive
 </td>
 <td style="text-align:right;">
@@ -3328,7 +3328,7 @@
 </td>
 </tr>
 <tr>
-<td style="text-align:left; padding-left: 2em;" indentLevel="1">
+<td style="text-align:left; padding-left: 2em;" indentlevel="1">
 Hornet Sportabout
 </td>
 <td style="text-align:right;">
@@ -3386,7 +3386,7 @@
 </thead>
 <tbody>
 <tr>
-<td style="text-align:left; padding-left: 2em;" indentLevel="1">
+<td style="text-align:left; padding-left: 2em;" indentlevel="1">
 Mazda RX4
 </td>
 <td style="text-align:right;">
@@ -3432,7 +3432,7 @@
 </td>
 </tr>
 <tr>
-<td style="text-align:left; padding-left: 2em;" indentLevel="1">
+<td style="text-align:left; padding-left: 2em;" indentlevel="1">
 Datsun 710
 </td>
 <td style="text-align:right;">
@@ -3478,7 +3478,7 @@
 </td>
 </tr>
 <tr>
-<td style="text-align:left; padding-left: 2em;" indentLevel="1">
+<td style="text-align:left; padding-left: 2em;" indentlevel="1">
 Hornet Sportabout
 </td>
 <td style="text-align:right;">
@@ -3559,7 +3559,7 @@
 3
 </td>
 <td style="text-align:center;">
-1
+0
 </td>
 </tr>
 <tr>
@@ -3567,7 +3567,7 @@
 4
 </td>
 <td style="text-align:center;">
-1
+0
 </td>
 </tr>
 <tr>
@@ -3575,7 +3575,7 @@
 5
 </td>
 <td style="text-align:center;">
-0
+1
 </td>
 </tr>
 <tr>
@@ -3583,7 +3583,7 @@
 6
 </td>
 <td style="text-align:center;">
-0
+1
 </td>
 </tr>
 <tr>
@@ -3591,7 +3591,7 @@
 7
 </td>
 <td style="text-align:center;">
-0
+1
 </td>
 </tr>
 <tr>
@@ -3602,7 +3602,7 @@
 8
 </td>
 <td style="text-align:center;">
-1
+0
 </td>
 </tr>
 <tr>
@@ -3618,7 +3618,7 @@
 10
 </td>
 <td style="text-align:center;">
-1
+0
 </td>
 </tr>
 <tr>
@@ -3640,7 +3640,7 @@
 12
 </td>
 <td style="text-align:center;">
-1
+0
 </td>
 </tr>
 <tr>
diff --git a/docs/awesome_table_in_pdf.Rmd b/docs/awesome_table_in_pdf.Rmd
index 2faba1b..8e7d092 100644
--- a/docs/awesome_table_in_pdf.Rmd
+++ b/docs/awesome_table_in_pdf.Rmd
@@ -318,6 +318,21 @@
 # Not evaluated. The code above should have the same result as the first example in this section.
 ```
 
+Note that `kable` has a relatively special feature to handle `align` and it may bring troubles to you if you are not using it correctly. In the documentation of the `align` argument of `kable`, it says:
+
+> If `length(align) == 1L`, the string will be expanded to a vector of individual letters, e.g. `'clc'` becomes `c('c', 'l', 'c')`, **unless the output format is LaTeX**.
+
+For example, 
+```{r, eval=F}
+kable(mtcars[1:2, 1:2], "latex", align = c("cl"))
+# \begin{tabular}{l|cl|cl}  # Note the column alignment here
+# \hline
+#   & mpg & cyl\\
+# ...
+```
+
+LaTeX, somehow shows surprisingly high tolerance on that, which is quite unusual. As a result, it won't throw an error if you are just using `kable` to make some simple tables. However, when you use `kableExtra` to make some advanced modification, it will start to throw some bugs. As a result, please try to form a habbit of using a vector in the `align` argument for `kable` (tip: you can use `rep` function to replicate elements. For example, `c("c", rep("l", 10))`). 
+
 ## Row indentation
 Unlike `group_rows()`, which will insert a labeling row, sometimes we want to list a few sub groups under a total one. In that case, `add_indent()` is probably more apporiate. 
 For advanced users, you can even define your own css for the group labeling.
@@ -347,6 +362,8 @@
   collapse_rows(1:2)
 ```
 
+
+
 # Table Footnote
 
 > Now it's recommended to use the new `footnote` function instead of `add_footnote` to make table footnotes. 
@@ -396,6 +413,14 @@
            footnote_as_chunk = T)
 ```
 
+If your table footnote is very long, please consider to put your table in a `ThreePartTable` frame. Note that, in kableExtra version <= 0.7.0, we were using `threeparttable` but since kableExtra 0.8.0, we start to use `ThreePartTable` from `threeparttablex` instead. `ThreePartTable` supports both the `longtable` and `tabu` environments. 
+
+```{r}
+kable(dt, "latex", align = "c", booktabs = T, caption = "s") %>%
+  footnote(general = "Here is a very very very very very very very very very very very very very very very very very very very very long footnote", 
+           threeparttable = T)
+```
+
 # LaTeX Only Features
 ## Table on a Landscape Page
 Sometimes when we have a wide table, we want it to sit on a designated landscape page. The new function `landscape()` can help you on that. Unlike other functions, this little function only serves LaTeX and doesn't have a HTML side.
diff --git a/docs/awesome_table_in_pdf.pdf b/docs/awesome_table_in_pdf.pdf
index 65a491b..3972244 100644
--- a/docs/awesome_table_in_pdf.pdf
+++ b/docs/awesome_table_in_pdf.pdf
Binary files differ
diff --git a/inst/NEWS.md b/inst/NEWS.md
index 1012f3d..b6fda03 100644
--- a/inst/NEWS.md
+++ b/inst/NEWS.md
@@ -3,7 +3,8 @@
 * Fixed #115, a bug in latex footnote about escaping.
 * Fixed #116, a bug about the position of footnote in longtable with booktabs
 * Fixed #119, a bug between collapse_rows and add_header_above
-* Improve footnotes in longtable and replace threeparttable with threeparttablex. Now footnotes works smoothly in longtable, even with full width in tabu. 
+* Improve footnotes in longtable and replace threeparttable with threeparttablex. Now footnotes works smoothly in longtable, even with full width in tabu.
+* Fixed #135, a bug in footnote_marker_symbol
 
 
 kableExtra 0.7.0