update the bookdown guide book
diff --git a/docs/bookdown/cross-format-tables-in-bookdown.html b/docs/bookdown/cross-format-tables-in-bookdown.html
index 57f28c7..f73d627 100644
--- a/docs/bookdown/cross-format-tables-in-bookdown.html
+++ b/docs/bookdown/cross-format-tables-in-bookdown.html
@@ -25,7 +25,7 @@
 <meta name="author" content="Hao Zhu">
 
 
-<meta name="date" content="2018-10-16">
+<meta name="date" content="2018-10-23">
 
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <meta name="apple-mobile-web-app-capable" content="yes">
@@ -132,7 +132,7 @@
 <li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Introduction</a></li>
 <li class="chapter" data-level="2" data-path="cross-format-tables-in-bookdown.html"><a href="cross-format-tables-in-bookdown.html"><i class="fa fa-check"></i><b>2</b> Cross-format Tables in Bookdown</a><ul>
 <li class="chapter" data-level="2.1" data-path="cross-format-tables-in-bookdown.html"><a href="cross-format-tables-in-bookdown.html#use-the-k-m-approach-instead-of-m-k"><i class="fa fa-check"></i><b>2.1</b> Use the “K-M” approach instead of “M-K”</a></li>
-<li class="chapter" data-level="2.2" data-path="cross-format-tables-in-bookdown.html"><a href="cross-format-tables-in-bookdown.html#prepare-your-tables-for-both-formats"><i class="fa fa-check"></i><b>2.2</b> Prepare Your Tables for Both Formats</a></li>
+<li class="chapter" data-level="2.2" data-path="cross-format-tables-in-bookdown.html"><a href="cross-format-tables-in-bookdown.html#prepare-your-tables-for-all-formats"><i class="fa fa-check"></i><b>2.2</b> Prepare Your Tables for All Formats</a></li>
 </ul></li>
 <li class="chapter" data-level="3" data-path="use-bootstrap-tables-in-gitbooks-epub.html"><a href="use-bootstrap-tables-in-gitbooks-epub.html"><i class="fa fa-check"></i><b>3</b> Use Bootstrap Tables in gitbooks &amp; epub</a><ul>
 <li class="chapter" data-level="3.1" data-path="use-bootstrap-tables-in-gitbooks-epub.html"><a href="use-bootstrap-tables-in-gitbooks-epub.html#gitbook"><i class="fa fa-check"></i><b>3.1</b> Gitbook</a></li>
@@ -174,155 +174,226 @@
   ui:
     chapter_name: &quot;Chapter &quot;</code></pre>
 </div>
-<div id="prepare-your-tables-for-both-formats" class="section level2">
-<h2><span class="header-section-number">2.2</span> Prepare Your Tables for Both Formats</h2>
+<div id="prepare-your-tables-for-all-formats" class="section level2">
+<h2><span class="header-section-number">2.2</span> Prepare Your Tables for All Formats</h2>
 <p>In most cases, functions in <code>kable</code> and <code>kableExtra</code> use the same API to accomplish the same styling task in HTML and LaTeX. However, you also need some format specific settings so your tables will look good in both formats. Some common items here include the <code>booktabs</code> and <code>longtable</code> settings in <code>kable</code> and the <code>bootstrap_options</code> and <code>latex_options</code> in <code>kable_styling</code>.</p>
-<p>Here is an example for a table that will work in both HTML and LaTeX.</p>
+<p>Here is an example for a table that will work in HTML, LaTeX &amp; EPUB.</p>
 <pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(kableExtra)
-<span class="kw">options</span>(<span class="dt">kableExtra.html.bsTable =</span> T)
-mtcars[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">5</span>] <span class="op">%&gt;%</span>
-<span class="st">  </span><span class="kw">kable</span>(<span class="dt">booktabs =</span> T) <span class="op">%&gt;%</span><span class="st"> </span>
-<span class="st">  </span><span class="kw">kable_styling</span>(
-    <span class="dt">latex_options =</span> <span class="kw">c</span>(<span class="st">&quot;striped&quot;</span>),
-    <span class="dt">full_width =</span> F
-  ) <span class="op">%&gt;%</span>
-<span class="st">  </span><span class="kw">column_spec</span>(<span class="dv">1</span>, <span class="dt">bold =</span> T) <span class="op">%&gt;%</span>
-<span class="st">  </span><span class="kw">add_header_above</span>(<span class="kw">c</span>(<span class="st">&quot; &quot;</span>, <span class="st">&quot;Group A&quot;</span> =<span class="st"> </span><span class="dv">2</span>, <span class="st">&quot;Group B&quot;</span> =<span class="st"> </span><span class="dv">3</span>))</code></pre>
-<table class="table" style="width: auto !important; margin-left: auto; margin-right: auto;">
+<span class="kw">library</span>(dplyr)</code></pre>
+<pre><code>## Warning: package &#39;dplyr&#39; was built under R version 3.5.1</code></pre>
+<pre><code>## 
+## Attaching package: &#39;dplyr&#39;</code></pre>
+<pre><code>## The following objects are masked from &#39;package:stats&#39;:
+## 
+##     filter, lag</code></pre>
+<pre><code>## The following objects are masked from &#39;package:base&#39;:
+## 
+##     intersect, setdiff, setequal, union</code></pre>
+<pre class="sourceCode r"><code class="sourceCode r"><span class="kw">options</span>(<span class="dt">kableExtra.html.bsTable =</span> T)
+iris[<span class="dv">1</span><span class="op">:</span><span class="dv">10</span>, ] <span class="op">%&gt;%</span>
+<span class="st">  </span><span class="kw">mutate_if</span>(is.numeric, <span class="cf">function</span>(x) {
+    <span class="kw">cell_spec</span>(x, <span class="dt">bold =</span> T, 
+              <span class="dt">color =</span> <span class="kw">spec_color</span>(x, <span class="dt">end =</span> <span class="fl">0.9</span>),
+              <span class="dt">font_size =</span> <span class="kw">spec_font_size</span>(x))
+  }) <span class="op">%&gt;%</span>
+<span class="st">  </span><span class="kw">mutate</span>(<span class="dt">Species =</span> <span class="kw">cell_spec</span>(
+    Species, <span class="dt">color =</span> <span class="st">&quot;white&quot;</span>, <span class="dt">bold =</span> T,
+    <span class="dt">background =</span> <span class="kw">spec_color</span>(<span class="dv">1</span><span class="op">:</span><span class="dv">10</span>, <span class="dt">end =</span> <span class="fl">0.9</span>, 
+                            <span class="dt">option =</span> <span class="st">&quot;A&quot;</span>, <span class="dt">direction =</span> <span class="dv">-1</span>)
+  )) <span class="op">%&gt;%</span>
+<span class="st">  </span><span class="kw">kable</span>(<span class="dt">escape =</span> F, <span class="dt">align =</span> <span class="st">&quot;c&quot;</span>, <span class="dt">booktabs =</span> T) <span class="op">%&gt;%</span>
+<span class="st">  </span><span class="kw">kable_styling</span>(<span class="kw">c</span>(<span class="st">&quot;striped&quot;</span>, <span class="st">&quot;condensed&quot;</span>), 
+                <span class="dt">latex_options =</span> <span class="st">&quot;striped&quot;</span>, 
+                <span class="dt">full_width =</span> F)</code></pre>
+<table class="table table-striped table-condensed" style="width: auto !important; margin-left: auto; margin-right: auto;">
 <thead>
 <tr>
-<th style="border-bottom:hidden" colspan="1">
+<th style="text-align:center;">
+Sepal.Length
 </th>
-<th style="border-bottom:hidden; padding-bottom:0; padding-left:3px;padding-right:3px;text-align: center; " colspan="2">
-<div style="border-bottom: 1px solid #ddd; padding-bottom: 5px; ">
-Group A
-</div>
+<th style="text-align:center;">
+Sepal.Width
 </th>
-<th style="border-bottom:hidden; padding-bottom:0; padding-left:3px;padding-right:3px;text-align: center; " colspan="3">
-<div style="border-bottom: 1px solid #ddd; padding-bottom: 5px; ">
-Group B
-</div>
+<th style="text-align:center;">
+Petal.Length
 </th>
-</tr>
-<tr>
-<th style="text-align:left;">
+<th style="text-align:center;">
+Petal.Width
 </th>
-<th style="text-align:right;">
-mpg
-</th>
-<th style="text-align:right;">
-cyl
-</th>
-<th style="text-align:right;">
-disp
-</th>
-<th style="text-align:right;">
-hp
-</th>
-<th style="text-align:right;">
-drat
+<th style="text-align:center;">
+Species
 </th>
 </tr>
 </thead>
 <tbody>
 <tr>
-<td style="text-align:left;font-weight: bold;">
-Mazda RX4
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(40, 174, 128, 1);font-size: 14px;">5.1</span>
 </td>
-<td style="text-align:right;">
-21.0
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(31, 154, 138, 1);font-size: 13px;">3.5</span>
 </td>
-<td style="text-align:right;">
-6
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(62, 75, 138, 1);font-size: 10px;">1.4</span>
 </td>
-<td style="text-align:right;">
-160
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(53, 96, 141, 1);font-size: 11px;">0.2</span>
 </td>
-<td style="text-align:right;">
-110
-</td>
-<td style="text-align:right;">
-3.90
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(254, 206, 145, 1);">setosa</span>
 </td>
 </tr>
 <tr>
-<td style="text-align:left;font-weight: bold;">
-Mazda RX4 Wag
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(37, 131, 142, 1);font-size: 12px;">4.9</span>
 </td>
-<td style="text-align:right;">
-21.0
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(72, 34, 116, 1);font-size: 9px;">3</span>
 </td>
-<td style="text-align:right;">
-6
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(62, 75, 138, 1);font-size: 10px;">1.4</span>
 </td>
-<td style="text-align:right;">
-160
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(53, 96, 141, 1);font-size: 11px;">0.2</span>
 </td>
-<td style="text-align:right;">
-110
-</td>
-<td style="text-align:right;">
-3.90
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(254, 160, 109, 1);">setosa</span>
 </td>
 </tr>
 <tr>
-<td style="text-align:left;font-weight: bold;">
-Datsun 710
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(57, 87, 140, 1);font-size: 10px;">4.7</span>
 </td>
-<td style="text-align:right;">
-22.8
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(56, 88, 140, 1);font-size: 10px;">3.2</span>
 </td>
-<td style="text-align:right;">
-4
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(68, 1, 84, 1);font-size: 8px;">1.3</span>
 </td>
-<td style="text-align:right;">
-108
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(53, 96, 141, 1);font-size: 11px;">0.2</span>
 </td>
-<td style="text-align:right;">
-93
-</td>
-<td style="text-align:right;">
-3.85
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(246, 110, 92, 1);">setosa</span>
 </td>
 </tr>
 <tr>
-<td style="text-align:left;font-weight: bold;">
-Hornet 4 Drive
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(67, 62, 133, 1);font-size: 10px;">4.6</span>
 </td>
-<td style="text-align:right;">
-21.4
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(67, 62, 133, 1);font-size: 10px;">3.1</span>
 </td>
-<td style="text-align:right;">
-6
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(37, 131, 142, 1);font-size: 12px;">1.5</span>
 </td>
-<td style="text-align:right;">
-258
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(53, 96, 141, 1);font-size: 11px;">0.2</span>
 </td>
-<td style="text-align:right;">
-110
-</td>
-<td style="text-align:right;">
-3.08
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(222, 73, 104, 1);">setosa</span>
 </td>
 </tr>
 <tr>
-<td style="text-align:left;font-weight: bold;">
-Hornet Sportabout
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(31, 154, 138, 1);font-size: 13px;">5</span>
 </td>
-<td style="text-align:right;">
-18.7
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(41, 175, 127, 1);font-size: 14px;">3.6</span>
 </td>
-<td style="text-align:right;">
-8
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(62, 75, 138, 1);font-size: 10px;">1.4</span>
 </td>
-<td style="text-align:right;">
-360
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(53, 96, 141, 1);font-size: 11px;">0.2</span>
 </td>
-<td style="text-align:right;">
-175
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(183, 55, 121, 1);">setosa</span>
 </td>
-<td style="text-align:right;">
-3.15
+</tr>
+<tr>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(187, 223, 39, 1);font-size: 16px;">5.4</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(187, 223, 39, 1);font-size: 16px;">3.9</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(187, 223, 39, 1);font-size: 16px;">1.7</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(187, 223, 39, 1);font-size: 16px;">0.4</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(140, 41, 129, 1);">setosa</span>
+</td>
+</tr>
+<tr>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(67, 62, 133, 1);font-size: 10px;">4.6</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(37, 131, 142, 1);font-size: 12px;">3.4</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(62, 75, 138, 1);font-size: 10px;">1.4</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(34, 168, 132, 1);font-size: 13px;">0.3</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(100, 26, 128, 1);">setosa</span>
+</td>
+</tr>
+<tr>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(31, 154, 138, 1);font-size: 13px;">5</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(37, 131, 142, 1);font-size: 12px;">3.4</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(37, 131, 142, 1);font-size: 12px;">1.5</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(53, 96, 141, 1);font-size: 11px;">0.2</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(60, 15, 112, 1);">setosa</span>
+</td>
+</tr>
+<tr>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(68, 1, 84, 1);font-size: 8px;">4.4</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(68, 1, 84, 1);font-size: 8px;">2.9</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(62, 75, 138, 1);font-size: 10px;">1.4</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(53, 96, 141, 1);font-size: 11px;">0.2</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(20, 14, 54, 1);">setosa</span>
+</td>
+</tr>
+<tr>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(37, 131, 142, 1);font-size: 12px;">4.9</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(67, 62, 133, 1);font-size: 10px;">3.1</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(37, 131, 142, 1);font-size: 12px;">1.5</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: rgba(68, 1, 84, 1);font-size: 8px;">0.1</span>
+</td>
+<td style="text-align:center;">
+<span style=" font-weight: bold;    color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(0, 0, 4, 1);">setosa</span>
 </td>
 </tr>
 </tbody>