blob: f73d627447ef7bccda7ad5a5e2d1d9526961483e [file] [log] [blame]
Hao Zhuc1450882018-10-03 17:56:26 -04001<!DOCTYPE html>
2<html >
3
4<head>
5
6 <meta charset="UTF-8">
7 <meta http-equiv="X-UA-Compatible" content="IE=edge">
Hao Zhuc859dba2018-10-03 18:05:55 -04008 <title>Using kableExtra in Bookdown</title>
Hao Zhuc1450882018-10-03 17:56:26 -04009 <meta name="description" content="This example provides documentations for using kableExtra to customize tables in bookdown projects.">
10 <meta name="generator" content="bookdown and GitBook 2.6.7">
11
Hao Zhuc859dba2018-10-03 18:05:55 -040012 <meta property="og:title" content="Using kableExtra in Bookdown" />
Hao Zhuc1450882018-10-03 17:56:26 -040013 <meta property="og:type" content="book" />
14
15
16 <meta property="og:description" content="This example provides documentations for using kableExtra to customize tables in bookdown projects." />
17
18
19 <meta name="twitter:card" content="summary" />
Hao Zhuc859dba2018-10-03 18:05:55 -040020 <meta name="twitter:title" content="Using kableExtra in Bookdown" />
Hao Zhuc1450882018-10-03 17:56:26 -040021
22 <meta name="twitter:description" content="This example provides documentations for using kableExtra to customize tables in bookdown projects." />
23
24
25<meta name="author" content="Hao Zhu">
26
27
Hao Zhu5250ab52018-10-23 15:25:14 -040028<meta name="date" content="2018-10-23">
Hao Zhuc1450882018-10-03 17:56:26 -040029
30 <meta name="viewport" content="width=device-width, initial-scale=1">
31 <meta name="apple-mobile-web-app-capable" content="yes">
32 <meta name="apple-mobile-web-app-status-bar-style" content="black">
33
34
35<link rel="prev" href="index.html">
36<link rel="next" href="use-bootstrap-tables-in-gitbooks-epub.html">
37<script src="libs/jquery-2.2.3/jquery.min.js"></script>
38<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
39<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
40<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
41<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
42<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
43
44
45
46
47
48
49
50<script src="libs/kePrint-0.0.1/kePrint.js"></script>
51<link href="libs/bsTable-3.3.7/bootstrapTable.min.css" rel="stylesheet" />
52
53
54<style type="text/css">
55a.sourceLine { display: inline-block; line-height: 1.25; }
56a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
57a.sourceLine:empty { height: 1.2em; position: absolute; }
58.sourceCode { overflow: visible; }
59code.sourceCode { white-space: pre; position: relative; }
60div.sourceCode { margin: 1em 0; }
61pre.sourceCode { margin: 0; }
62@media screen {
63div.sourceCode { overflow: auto; }
64}
65@media print {
66code.sourceCode { white-space: pre-wrap; }
67a.sourceLine { text-indent: -1em; padding-left: 1em; }
68}
69pre.numberSource a.sourceLine
70 { position: relative; }
71pre.numberSource a.sourceLine:empty
72 { position: absolute; }
73pre.numberSource a.sourceLine::before
74 { content: attr(data-line-number);
75 position: absolute; left: -5em; text-align: right; vertical-align: baseline;
76 border: none; pointer-events: all;
77 -webkit-touch-callout: none; -webkit-user-select: none;
78 -khtml-user-select: none; -moz-user-select: none;
79 -ms-user-select: none; user-select: none;
80 padding: 0 4px; width: 4em;
81 color: #aaaaaa;
82 }
83pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
84div.sourceCode
85 { }
86@media screen {
87a.sourceLine::before { text-decoration: underline; }
88}
89code span.al { color: #ff0000; font-weight: bold; } /* Alert */
90code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
91code span.at { color: #7d9029; } /* Attribute */
92code span.bn { color: #40a070; } /* BaseN */
93code span.bu { } /* BuiltIn */
94code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
95code span.ch { color: #4070a0; } /* Char */
96code span.cn { color: #880000; } /* Constant */
97code span.co { color: #60a0b0; font-style: italic; } /* Comment */
98code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
99code span.do { color: #ba2121; font-style: italic; } /* Documentation */
100code span.dt { color: #902000; } /* DataType */
101code span.dv { color: #40a070; } /* DecVal */
102code span.er { color: #ff0000; font-weight: bold; } /* Error */
103code span.ex { } /* Extension */
104code span.fl { color: #40a070; } /* Float */
105code span.fu { color: #06287e; } /* Function */
106code span.im { } /* Import */
107code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
108code span.kw { color: #007020; font-weight: bold; } /* Keyword */
109code span.op { color: #666666; } /* Operator */
110code span.ot { color: #007020; } /* Other */
111code span.pp { color: #bc7a00; } /* Preprocessor */
112code span.sc { color: #4070a0; } /* SpecialChar */
113code span.ss { color: #bb6688; } /* SpecialString */
114code span.st { color: #4070a0; } /* String */
115code span.va { color: #19177c; } /* Variable */
116code span.vs { color: #4070a0; } /* VerbatimString */
117code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
118</style>
119
120</head>
121
122<body>
123
124
125
126 <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
127
128 <div class="book-summary">
129 <nav role="navigation">
130
131<ul class="summary">
132<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>
133<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>
134<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>
Hao Zhu5250ab52018-10-23 15:25:14 -0400135<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>
Hao Zhuc1450882018-10-03 17:56:26 -0400136</ul></li>
137<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>
138<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>
139<li class="chapter" data-level="3.2" data-path="use-bootstrap-tables-in-gitbooks-epub.html"><a href="use-bootstrap-tables-in-gitbooks-epub.html#epub"><i class="fa fa-check"></i><b>3.2</b> Epub</a></li>
140</ul></li>
141</ul>
142
143 </nav>
144 </div>
145
146 <div class="book-body">
147 <div class="body-inner">
148 <div class="book-header" role="navigation">
149 <h1>
Hao Zhuc859dba2018-10-03 18:05:55 -0400150 <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Using kableExtra in Bookdown</a>
Hao Zhuc1450882018-10-03 17:56:26 -0400151 </h1>
152 </div>
153
154 <div class="page-wrapper" tabindex="-1" role="main">
155 <div class="page-inner">
156
157 <section class="normal" id="section-">
158<div id="cross-format-tables-in-bookdown" class="section level1">
159<h1><span class="header-section-number">Chapter 2</span> Cross-format Tables in Bookdown</h1>
160<blockquote>
161<p>Note that if kableExtra 0.9.0 doesn’t support the EPUB format. If you need to output tables in <code>.epub</code>, please upgrade to the dev version or version 1.0 on CRAN once it’s released.</p>
162</blockquote>
163<div id="use-the-k-m-approach-instead-of-m-k" class="section level2">
164<h2><span class="header-section-number">2.1</span> Use the “K-M” approach instead of “M-K”</h2>
165<p>Please read this chapter about the “K-M”/“M-K” approaches in <code>bookdown</code>:
166<a href="https://bookdown.org/yihui/bookdown/new-session.html" class="uri">https://bookdown.org/yihui/bookdown/new-session.html</a></p>
167<p>To generate cross-format tables with <code>kableExtra</code> in a multi-format bookdown project, you will have to use the “M-K” approach by setting <code>new_session: true</code> in <code>_bookdown.yml</code>. Somehow the “M-K” approach, which merges chapters to a big Rmd and then renders, shares the global environment across formats. For now, I’m not sure if this is a bug or intended behavior. It might be fixable in the future but please don’t count on that. By setting <code>new_session: true</code>, we force R to use a new session for every chapter for different formats. In this way, tables are generated differently in different formats.</p>
168<p>Note that the “M-K” approach is slower than the “K-M” approach. At the same time, packages and data are not shared accross chapter.</p>
169<pre><code># Example _bookdown.yml
170book_filename: &quot;bookdown_example&quot;
171delete_merged_file: true
172new_session: true
173language:
174 ui:
175 chapter_name: &quot;Chapter &quot;</code></pre>
176</div>
Hao Zhu5250ab52018-10-23 15:25:14 -0400177<div id="prepare-your-tables-for-all-formats" class="section level2">
178<h2><span class="header-section-number">2.2</span> Prepare Your Tables for All Formats</h2>
Hao Zhuc1450882018-10-03 17:56:26 -0400179<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>
Hao Zhu5250ab52018-10-23 15:25:14 -0400180<p>Here is an example for a table that will work in HTML, LaTeX &amp; EPUB.</p>
Hao Zhuc1450882018-10-03 17:56:26 -0400181<pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(kableExtra)
Hao Zhu5250ab52018-10-23 15:25:14 -0400182<span class="kw">library</span>(dplyr)</code></pre>
183<pre><code>## Warning: package &#39;dplyr&#39; was built under R version 3.5.1</code></pre>
184<pre><code>##
185## Attaching package: &#39;dplyr&#39;</code></pre>
186<pre><code>## The following objects are masked from &#39;package:stats&#39;:
187##
188## filter, lag</code></pre>
189<pre><code>## The following objects are masked from &#39;package:base&#39;:
190##
191## intersect, setdiff, setequal, union</code></pre>
192<pre class="sourceCode r"><code class="sourceCode r"><span class="kw">options</span>(<span class="dt">kableExtra.html.bsTable =</span> T)
193iris[<span class="dv">1</span><span class="op">:</span><span class="dv">10</span>, ] <span class="op">%&gt;%</span>
194<span class="st"> </span><span class="kw">mutate_if</span>(is.numeric, <span class="cf">function</span>(x) {
195 <span class="kw">cell_spec</span>(x, <span class="dt">bold =</span> T,
196 <span class="dt">color =</span> <span class="kw">spec_color</span>(x, <span class="dt">end =</span> <span class="fl">0.9</span>),
197 <span class="dt">font_size =</span> <span class="kw">spec_font_size</span>(x))
198 }) <span class="op">%&gt;%</span>
199<span class="st"> </span><span class="kw">mutate</span>(<span class="dt">Species =</span> <span class="kw">cell_spec</span>(
200 Species, <span class="dt">color =</span> <span class="st">&quot;white&quot;</span>, <span class="dt">bold =</span> T,
201 <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>,
202 <span class="dt">option =</span> <span class="st">&quot;A&quot;</span>, <span class="dt">direction =</span> <span class="dv">-1</span>)
203 )) <span class="op">%&gt;%</span>
204<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>
205<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>),
206 <span class="dt">latex_options =</span> <span class="st">&quot;striped&quot;</span>,
207 <span class="dt">full_width =</span> F)</code></pre>
208<table class="table table-striped table-condensed" style="width: auto !important; margin-left: auto; margin-right: auto;">
Hao Zhuc1450882018-10-03 17:56:26 -0400209<thead>
210<tr>
Hao Zhu5250ab52018-10-23 15:25:14 -0400211<th style="text-align:center;">
212Sepal.Length
Hao Zhuc1450882018-10-03 17:56:26 -0400213</th>
Hao Zhu5250ab52018-10-23 15:25:14 -0400214<th style="text-align:center;">
215Sepal.Width
Hao Zhuc1450882018-10-03 17:56:26 -0400216</th>
Hao Zhu5250ab52018-10-23 15:25:14 -0400217<th style="text-align:center;">
218Petal.Length
Hao Zhuc1450882018-10-03 17:56:26 -0400219</th>
Hao Zhu5250ab52018-10-23 15:25:14 -0400220<th style="text-align:center;">
221Petal.Width
Hao Zhuc1450882018-10-03 17:56:26 -0400222</th>
Hao Zhu5250ab52018-10-23 15:25:14 -0400223<th style="text-align:center;">
224Species
Hao Zhuc1450882018-10-03 17:56:26 -0400225</th>
226</tr>
227</thead>
228<tbody>
229<tr>
Hao Zhu5250ab52018-10-23 15:25:14 -0400230<td style="text-align:center;">
231<span style=" font-weight: bold; color: rgba(40, 174, 128, 1);font-size: 14px;">5.1</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400232</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400233<td style="text-align:center;">
234<span style=" font-weight: bold; color: rgba(31, 154, 138, 1);font-size: 13px;">3.5</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400235</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400236<td style="text-align:center;">
237<span style=" font-weight: bold; color: rgba(62, 75, 138, 1);font-size: 10px;">1.4</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400238</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400239<td style="text-align:center;">
240<span style=" font-weight: bold; color: rgba(53, 96, 141, 1);font-size: 11px;">0.2</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400241</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400242<td style="text-align:center;">
243<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>
Hao Zhuc1450882018-10-03 17:56:26 -0400244</td>
245</tr>
246<tr>
Hao Zhu5250ab52018-10-23 15:25:14 -0400247<td style="text-align:center;">
248<span style=" font-weight: bold; color: rgba(37, 131, 142, 1);font-size: 12px;">4.9</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400249</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400250<td style="text-align:center;">
251<span style=" font-weight: bold; color: rgba(72, 34, 116, 1);font-size: 9px;">3</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400252</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400253<td style="text-align:center;">
254<span style=" font-weight: bold; color: rgba(62, 75, 138, 1);font-size: 10px;">1.4</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400255</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400256<td style="text-align:center;">
257<span style=" font-weight: bold; color: rgba(53, 96, 141, 1);font-size: 11px;">0.2</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400258</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400259<td style="text-align:center;">
260<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>
Hao Zhuc1450882018-10-03 17:56:26 -0400261</td>
262</tr>
263<tr>
Hao Zhu5250ab52018-10-23 15:25:14 -0400264<td style="text-align:center;">
265<span style=" font-weight: bold; color: rgba(57, 87, 140, 1);font-size: 10px;">4.7</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400266</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400267<td style="text-align:center;">
268<span style=" font-weight: bold; color: rgba(56, 88, 140, 1);font-size: 10px;">3.2</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400269</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400270<td style="text-align:center;">
271<span style=" font-weight: bold; color: rgba(68, 1, 84, 1);font-size: 8px;">1.3</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400272</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400273<td style="text-align:center;">
274<span style=" font-weight: bold; color: rgba(53, 96, 141, 1);font-size: 11px;">0.2</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400275</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400276<td style="text-align:center;">
277<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>
Hao Zhuc1450882018-10-03 17:56:26 -0400278</td>
279</tr>
280<tr>
Hao Zhu5250ab52018-10-23 15:25:14 -0400281<td style="text-align:center;">
282<span style=" font-weight: bold; color: rgba(67, 62, 133, 1);font-size: 10px;">4.6</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400283</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400284<td style="text-align:center;">
285<span style=" font-weight: bold; color: rgba(67, 62, 133, 1);font-size: 10px;">3.1</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400286</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400287<td style="text-align:center;">
288<span style=" font-weight: bold; color: rgba(37, 131, 142, 1);font-size: 12px;">1.5</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400289</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400290<td style="text-align:center;">
291<span style=" font-weight: bold; color: rgba(53, 96, 141, 1);font-size: 11px;">0.2</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400292</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400293<td style="text-align:center;">
294<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>
Hao Zhuc1450882018-10-03 17:56:26 -0400295</td>
296</tr>
297<tr>
Hao Zhu5250ab52018-10-23 15:25:14 -0400298<td style="text-align:center;">
299<span style=" font-weight: bold; color: rgba(31, 154, 138, 1);font-size: 13px;">5</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400300</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400301<td style="text-align:center;">
302<span style=" font-weight: bold; color: rgba(41, 175, 127, 1);font-size: 14px;">3.6</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400303</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400304<td style="text-align:center;">
305<span style=" font-weight: bold; color: rgba(62, 75, 138, 1);font-size: 10px;">1.4</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400306</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400307<td style="text-align:center;">
308<span style=" font-weight: bold; color: rgba(53, 96, 141, 1);font-size: 11px;">0.2</span>
Hao Zhuc1450882018-10-03 17:56:26 -0400309</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400310<td style="text-align:center;">
311<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>
Hao Zhuc1450882018-10-03 17:56:26 -0400312</td>
Hao Zhu5250ab52018-10-23 15:25:14 -0400313</tr>
314<tr>
315<td style="text-align:center;">
316<span style=" font-weight: bold; color: rgba(187, 223, 39, 1);font-size: 16px;">5.4</span>
317</td>
318<td style="text-align:center;">
319<span style=" font-weight: bold; color: rgba(187, 223, 39, 1);font-size: 16px;">3.9</span>
320</td>
321<td style="text-align:center;">
322<span style=" font-weight: bold; color: rgba(187, 223, 39, 1);font-size: 16px;">1.7</span>
323</td>
324<td style="text-align:center;">
325<span style=" font-weight: bold; color: rgba(187, 223, 39, 1);font-size: 16px;">0.4</span>
326</td>
327<td style="text-align:center;">
328<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>
329</td>
330</tr>
331<tr>
332<td style="text-align:center;">
333<span style=" font-weight: bold; color: rgba(67, 62, 133, 1);font-size: 10px;">4.6</span>
334</td>
335<td style="text-align:center;">
336<span style=" font-weight: bold; color: rgba(37, 131, 142, 1);font-size: 12px;">3.4</span>
337</td>
338<td style="text-align:center;">
339<span style=" font-weight: bold; color: rgba(62, 75, 138, 1);font-size: 10px;">1.4</span>
340</td>
341<td style="text-align:center;">
342<span style=" font-weight: bold; color: rgba(34, 168, 132, 1);font-size: 13px;">0.3</span>
343</td>
344<td style="text-align:center;">
345<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>
346</td>
347</tr>
348<tr>
349<td style="text-align:center;">
350<span style=" font-weight: bold; color: rgba(31, 154, 138, 1);font-size: 13px;">5</span>
351</td>
352<td style="text-align:center;">
353<span style=" font-weight: bold; color: rgba(37, 131, 142, 1);font-size: 12px;">3.4</span>
354</td>
355<td style="text-align:center;">
356<span style=" font-weight: bold; color: rgba(37, 131, 142, 1);font-size: 12px;">1.5</span>
357</td>
358<td style="text-align:center;">
359<span style=" font-weight: bold; color: rgba(53, 96, 141, 1);font-size: 11px;">0.2</span>
360</td>
361<td style="text-align:center;">
362<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>
363</td>
364</tr>
365<tr>
366<td style="text-align:center;">
367<span style=" font-weight: bold; color: rgba(68, 1, 84, 1);font-size: 8px;">4.4</span>
368</td>
369<td style="text-align:center;">
370<span style=" font-weight: bold; color: rgba(68, 1, 84, 1);font-size: 8px;">2.9</span>
371</td>
372<td style="text-align:center;">
373<span style=" font-weight: bold; color: rgba(62, 75, 138, 1);font-size: 10px;">1.4</span>
374</td>
375<td style="text-align:center;">
376<span style=" font-weight: bold; color: rgba(53, 96, 141, 1);font-size: 11px;">0.2</span>
377</td>
378<td style="text-align:center;">
379<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>
380</td>
381</tr>
382<tr>
383<td style="text-align:center;">
384<span style=" font-weight: bold; color: rgba(37, 131, 142, 1);font-size: 12px;">4.9</span>
385</td>
386<td style="text-align:center;">
387<span style=" font-weight: bold; color: rgba(67, 62, 133, 1);font-size: 10px;">3.1</span>
388</td>
389<td style="text-align:center;">
390<span style=" font-weight: bold; color: rgba(37, 131, 142, 1);font-size: 12px;">1.5</span>
391</td>
392<td style="text-align:center;">
393<span style=" font-weight: bold; color: rgba(68, 1, 84, 1);font-size: 8px;">0.1</span>
394</td>
395<td style="text-align:center;">
396<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>
Hao Zhuc1450882018-10-03 17:56:26 -0400397</td>
398</tr>
399</tbody>
400</table>
401
402</div>
403</div>
404 </section>
405
406 </div>
407 </div>
408 </div>
409<a href="index.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
410<a href="use-bootstrap-tables-in-gitbooks-epub.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
411 </div>
412 </div>
413<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
414<script src="libs/gitbook-2.6.7/js/lunr.js"></script>
415<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
416<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
417<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
418<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
419<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
420<script>
421gitbook.require(["gitbook"], function(gitbook) {
422gitbook.start({
423"sharing": {
424"github": false,
425"facebook": true,
426"twitter": true,
427"google": false,
428"linkedin": false,
429"weibo": false,
430"instapper": false,
431"vk": false,
432"all": ["facebook", "google", "twitter", "linkedin", "weibo", "instapaper"]
433},
434"fontsettings": {
435"theme": "white",
436"family": "sans",
437"size": 2
438},
439"edit": {
440"link": null,
441"text": null
442},
443"download": ["bookdown_example.pdf", "bookdown_example.epub"],
444"toc": {
445"collapse": "subsection"
446}
447});
448});
449</script>
450
451</body>
452
453</html>