| 1 |
<!DOCTYPE html> |
| 2 |
|
| 3 |
<html$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$> |
| 4 |
|
| 5 |
<head> |
| 6 |
|
| 7 |
<meta charset="utf-8" /> |
| 8 |
<meta name="generator" content="pandoc" /> |
| 9 |
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" /> |
| 10 |
|
| 11 |
$if(theme)$ |
| 12 |
$else$ |
| 13 |
<meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 14 |
$endif$ |
| 15 |
|
| 16 |
$for(author-meta)$ |
| 17 |
<meta name="author" content="$author-meta$" /> |
| 18 |
$endfor$ |
| 19 |
|
| 20 |
$if(date-meta)$ |
| 21 |
<meta name="date" content="$date-meta$" /> |
| 22 |
$endif$ |
| 23 |
|
| 24 |
<title>$if(title-prefix)$$title-prefix$ - $endif$$pagetitle$</title> |
| 25 |
|
| 26 |
$for(header-includes)$ |
| 27 |
$header-includes$ |
| 28 |
$endfor$ |
| 29 |
|
| 30 |
<style type="text/css"> |
| 31 |
code{white-space: pre-wrap;} |
| 32 |
span.smallcaps{font-variant: small-caps;} |
| 33 |
span.underline{text-decoration: underline;} |
| 34 |
div.column{display: inline-block; vertical-align: top; width: 50%;} |
| 35 |
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} |
| 36 |
ul.task-list{list-style: none;} |
| 37 |
$if(quotes)$ |
| 38 |
q { quotes: "“" "”" "‘" "’"; } |
| 39 |
$endif$ |
| 40 |
$if(displaymath-css)$ |
| 41 |
.display.math{display: block; text-align: center; margin: 0.5rem auto;} |
| 42 |
$endif$ |
| 43 |
</style> |
| 44 |
|
| 45 |
$if(highlightjs)$ |
| 46 |
<style type="text/css">code{white-space: pre;}</style> |
| 47 |
<script type="text/javascript"> |
| 48 |
if (window.hljs) { |
| 49 |
hljs.configure({languages: []}); |
| 50 |
hljs.initHighlightingOnLoad(); |
| 51 |
if (document.readyState && document.readyState === "complete") { |
| 52 |
window.setTimeout(function() { hljs.initHighlighting(); }, 0); |
| 53 |
} |
| 54 |
} |
| 55 |
</script> |
| 56 |
$endif$ |
| 57 |
|
| 58 |
$if(highlight-downlit)$ |
| 59 |
<style type="text/css"> |
| 60 |
/* from bookdown::bs4_book() css */ |
| 61 |
code a:any-link { |
| 62 |
color: inherit; /* use colour from syntax highlighting */ |
| 63 |
text-decoration: underline; |
| 64 |
text-decoration-color: #ccc; |
| 65 |
} |
| 66 |
</style> |
| 67 |
$endif$ |
| 68 |
|
| 69 |
$if(highlighting-css)$ |
| 70 |
<style type="text/css"> |
| 71 |
code { |
| 72 |
white-space: pre; |
| 73 |
} |
| 74 |
.sourceCode { |
| 75 |
overflow: visible; |
| 76 |
} |
| 77 |
</style> |
| 78 |
<style type="text/css" data-origin="pandoc"> |
| 79 |
$highlighting-css$ |
| 80 |
|
| 81 |
$if(code_folding)$ |
| 82 |
.sourceCode .row { |
| 83 |
width: 100%; |
| 84 |
} |
| 85 |
.sourceCode { |
| 86 |
overflow-x: auto; |
| 87 |
} |
| 88 |
.code-folding-btn { |
| 89 |
margin-right: -30px; |
| 90 |
} |
| 91 |
$endif$ |
| 92 |
</style> |
| 93 |
<script> |
| 94 |
// apply pandoc div.sourceCode style to pre.sourceCode instead |
| 95 |
(function() { |
| 96 |
var sheets = document.styleSheets; |
| 97 |
for (var i = 0; i < sheets.length; i++) { |
| 98 |
if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue; |
| 99 |
try { var rules = sheets[i].cssRules; } catch (e) { continue; } |
| 100 |
var j = 0; |
| 101 |
while (j < rules.length) { |
| 102 |
var rule = rules[j]; |
| 103 |
// check if there is a div.sourceCode rule |
| 104 |
if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") { |
| 105 |
j++; |
| 106 |
continue; |
| 107 |
} |
| 108 |
var style = rule.style.cssText; |
| 109 |
// check if color or background-color is set |
| 110 |
if (rule.style.color === '' && rule.style.backgroundColor === '') { |
| 111 |
j++; |
| 112 |
continue; |
| 113 |
} |
| 114 |
// replace div.sourceCode by a pre.sourceCode rule |
| 115 |
sheets[i].deleteRule(j); |
| 116 |
sheets[i].insertRule('pre.sourceCode{' + style + '}', j); |
| 117 |
} |
| 118 |
} |
| 119 |
})(); |
| 120 |
</script> |
| 121 |
$endif$ |
| 122 |
|
| 123 |
$if(abstract)$ |
| 124 |
<style type="text/css"> |
| 125 |
p.abstract{ |
| 126 |
text-align: center; |
| 127 |
font-weight: bold; |
| 128 |
} |
| 129 |
div.abstract{ |
| 130 |
margin: auto; |
| 131 |
width: 90%; |
| 132 |
} |
| 133 |
</style> |
| 134 |
$endif$ |
| 135 |
|
| 136 |
$if(source_embed)$ |
| 137 |
<style type="text/css"> |
| 138 |
#rmd-source-code { |
| 139 |
display: none; |
| 140 |
} |
| 141 |
</style> |
| 142 |
$endif$ |
| 143 |
|
| 144 |
$if(csl-css)$ |
| 145 |
<style type="text/css"> |
| 146 |
/* for pandoc --citeproc since 2.11 */ |
| 147 |
div.csl-bib-body { } |
| 148 |
div.csl-entry { |
| 149 |
clear: both; |
| 150 |
$if(csl-entry-spacing)$ |
| 151 |
margin-bottom: $csl-entry-spacing$; |
| 152 |
$endif$ |
| 153 |
} |
| 154 |
.hanging div.csl-entry { |
| 155 |
margin-left:2em; |
| 156 |
text-indent:-2em; |
| 157 |
} |
| 158 |
div.csl-left-margin { |
| 159 |
min-width:2em; |
| 160 |
float:left; |
| 161 |
} |
| 162 |
div.csl-right-inline { |
| 163 |
margin-left:2em; |
| 164 |
padding-left:1em; |
| 165 |
} |
| 166 |
div.csl-indent { |
| 167 |
margin-left: 2em; |
| 168 |
} |
| 169 |
</style> |
| 170 |
$endif$ |
| 171 |
|
| 172 |
$for(css)$ |
| 173 |
<link rel="stylesheet" href="$css$" $if(html5)$$else$type="text/css" $endif$/> |
| 174 |
$endfor$ |
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
$if(theme)$ |
| 179 |
<style type = "text/css"> |
| 180 |
.main-container { |
| 181 |
max-width: 940px; |
| 182 |
margin-left: auto; |
| 183 |
margin-right: auto; |
| 184 |
} |
| 185 |
img { |
| 186 |
max-width:100%; |
| 187 |
} |
| 188 |
.tabbed-pane { |
| 189 |
padding-top: 12px; |
| 190 |
} |
| 191 |
.html-widget { |
| 192 |
margin-bottom: 20px; |
| 193 |
} |
| 194 |
button.code-folding-btn:focus { |
| 195 |
outline: none; |
| 196 |
} |
| 197 |
summary { |
| 198 |
display: list-item; |
| 199 |
} |
| 200 |
details > summary > p:only-child { |
| 201 |
display: inline; |
| 202 |
} |
| 203 |
pre code { |
| 204 |
padding: 0; |
| 205 |
} |
| 206 |
</style> |
| 207 |
|
| 208 |
$if(kable-scroll)$ |
| 209 |
<style type="text/css"> |
| 210 |
.kable-table { |
| 211 |
border: 1px solid #ccc; |
| 212 |
border-radius: 4px; |
| 213 |
overflow: auto; |
| 214 |
padding-left: 8px; |
| 215 |
padding-right: 8px; |
| 216 |
margin-bottom: 20px; |
| 217 |
max-height: 350px; |
| 218 |
} |
| 219 |
|
| 220 |
.kable-table table { |
| 221 |
margin-bottom: 0px; |
| 222 |
} |
| 223 |
|
| 224 |
.kable-table table>thead>tr>th { |
| 225 |
border: none; |
| 226 |
border-bottom: 2px solid #dddddd; |
| 227 |
} |
| 228 |
|
| 229 |
.kable-table table>thead { |
| 230 |
background-color: #fff; |
| 231 |
} |
| 232 |
</style> |
| 233 |
$endif$ |
| 234 |
|
| 235 |
$if(navbar)$ |
| 236 |
<style type="text/css"> |
| 237 |
.dropdown-submenu { |
| 238 |
position: relative; |
| 239 |
} |
| 240 |
.dropdown-submenu>.dropdown-menu { |
| 241 |
top: 0; |
| 242 |
left: 100%; |
| 243 |
margin-top: -6px; |
| 244 |
margin-left: -1px; |
| 245 |
border-radius: 0 6px 6px 6px; |
| 246 |
} |
| 247 |
.dropdown-submenu:hover>.dropdown-menu { |
| 248 |
display: block; |
| 249 |
} |
| 250 |
.dropdown-submenu>a:after { |
| 251 |
display: block; |
| 252 |
content: " "; |
| 253 |
float: right; |
| 254 |
width: 0; |
| 255 |
height: 0; |
| 256 |
border-color: transparent; |
| 257 |
border-style: solid; |
| 258 |
border-width: 5px 0 5px 5px; |
| 259 |
border-left-color: #cccccc; |
| 260 |
margin-top: 5px; |
| 261 |
margin-right: -10px; |
| 262 |
} |
| 263 |
.dropdown-submenu:hover>a:after { |
| 264 |
border-left-color: #adb5bd; |
| 265 |
} |
| 266 |
.dropdown-submenu.pull-left { |
| 267 |
float: none; |
| 268 |
} |
| 269 |
.dropdown-submenu.pull-left>.dropdown-menu { |
| 270 |
left: -100%; |
| 271 |
margin-left: 10px; |
| 272 |
border-radius: 6px 0 6px 6px; |
| 273 |
} |
| 274 |
</style> |
| 275 |
|
| 276 |
<script type="text/javascript"> |
| 277 |
// manage active state of menu based on current page |
| 278 |
$$(document).ready(function () { |
| 279 |
// active menu anchor |
| 280 |
href = window.location.pathname |
| 281 |
href = href.substr(href.lastIndexOf('/') + 1) |
| 282 |
if (href === "") |
| 283 |
href = "index.html"; |
| 284 |
var menuAnchor = $$('a[href="' + href + '"]'); |
| 285 |
|
| 286 |
// mark the anchor link active (and if it's in a dropdown, also mark that active) |
| 287 |
var dropdown = menuAnchor.closest('li.dropdown'); |
| 288 |
if (window.bootstrap) { // Bootstrap 4+ |
| 289 |
menuAnchor.addClass('active'); |
| 290 |
dropdown.find('> .dropdown-toggle').addClass('active'); |
| 291 |
} else { // Bootstrap 3 |
| 292 |
menuAnchor.parent().addClass('active'); |
| 293 |
dropdown.addClass('active'); |
| 294 |
} |
| 295 |
|
| 296 |
// Navbar adjustments |
| 297 |
var navHeight = $$(".navbar").first().height() + 15; |
| 298 |
var style = document.createElement('style'); |
| 299 |
var pt = "padding-top: " + navHeight + "px; "; |
| 300 |
var mt = "margin-top: -" + navHeight + "px; "; |
| 301 |
var css = ""; |
| 302 |
// offset scroll position for anchor links (for fixed navbar) |
| 303 |
for (var i = 1; i <= 6; i++) { |
| 304 |
css += ".section h" + i + "{ " + pt + mt + "}\n"; |
| 305 |
} |
| 306 |
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css; |
| 307 |
document.head.appendChild(style); |
| 308 |
}); |
| 309 |
</script> |
| 310 |
$endif$ |
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
<style type="text/css"> |
| 315 |
.tabset-dropdown > .nav-tabs { |
| 316 |
display: inline-table; |
| 317 |
max-height: 500px; |
| 318 |
min-height: 44px; |
| 319 |
overflow-y: auto; |
| 320 |
border: 1px solid #ddd; |
| 321 |
border-radius: 4px; |
| 322 |
} |
| 323 |
|
| 324 |
.tabset-dropdown > .nav-tabs > li.active:before, .tabset-dropdown > .nav-tabs.nav-tabs-open:before { |
| 325 |
content: "\e259"; |
| 326 |
font-family: 'Glyphicons Halflings'; |
| 327 |
display: inline-block; |
| 328 |
padding: 10px; |
| 329 |
border-right: 1px solid #ddd; |
| 330 |
} |
| 331 |
|
| 332 |
.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before { |
| 333 |
content: "\e258"; |
| 334 |
font-family: 'Glyphicons Halflings'; |
| 335 |
border: none; |
| 336 |
} |
| 337 |
|
| 338 |
.tabset-dropdown > .nav-tabs > li.active { |
| 339 |
display: block; |
| 340 |
} |
| 341 |
|
| 342 |
.tabset-dropdown > .nav-tabs > li > a, |
| 343 |
.tabset-dropdown > .nav-tabs > li > a:focus, |
| 344 |
.tabset-dropdown > .nav-tabs > li > a:hover { |
| 345 |
border: none; |
| 346 |
display: inline-block; |
| 347 |
border-radius: 4px; |
| 348 |
background-color: transparent; |
| 349 |
} |
| 350 |
|
| 351 |
.tabset-dropdown > .nav-tabs.nav-tabs-open > li { |
| 352 |
display: block; |
| 353 |
float: none; |
| 354 |
} |
| 355 |
|
| 356 |
.tabset-dropdown > .nav-tabs > li { |
| 357 |
display: none; |
| 358 |
} |
| 359 |
</style> |
| 360 |
|
| 361 |
|
| 362 |
$if(code_menu)$ |
| 363 |
<style type="text/css"> |
| 364 |
.code-folding-btn { margin-bottom: 4px; } |
| 365 |
</style> |
| 366 |
$endif$ |
| 367 |
|
| 368 |
|
| 369 |
$if(toc_float)$ |
| 370 |
|
| 371 |
<style type="text/css"> |
| 372 |
|
| 373 |
#$idprefix$TOC { |
| 374 |
margin: 25px 0px 20px 0px; |
| 375 |
} |
| 376 |
@media (max-width: 768px) { |
| 377 |
#$idprefix$TOC { |
| 378 |
position: relative; |
| 379 |
width: 100%; |
| 380 |
} |
| 381 |
} |
| 382 |
|
| 383 |
@media print { |
| 384 |
$if(toc_print)$ |
| 385 |
$else$ |
| 386 |
#$idprefix$TOC { |
| 387 |
display: none !important; |
| 388 |
} |
| 389 |
$endif$ |
| 390 |
.toc-content { |
| 391 |
/* see https://github.com/w3c/csswg-drafts/issues/4434 */ |
| 392 |
float: right; |
| 393 |
} |
| 394 |
} |
| 395 |
|
| 396 |
.toc-content { |
| 397 |
padding-left: 30px; |
| 398 |
padding-right: 40px; |
| 399 |
} |
| 400 |
|
| 401 |
div.main-container { |
| 402 |
max-width: 1200px; |
| 403 |
} |
| 404 |
|
| 405 |
div.tocify { |
| 406 |
width: 20%; |
| 407 |
max-width: 260px; |
| 408 |
max-height: 85%; |
| 409 |
} |
| 410 |
|
| 411 |
@media (min-width: 768px) and (max-width: 991px) { |
| 412 |
div.tocify { |
| 413 |
width: 25%; |
| 414 |
} |
| 415 |
} |
| 416 |
|
| 417 |
@media (max-width: 767px) { |
| 418 |
div.tocify { |
| 419 |
width: 100%; |
| 420 |
max-width: none; |
| 421 |
} |
| 422 |
} |
| 423 |
|
| 424 |
.tocify ul, .tocify li { |
| 425 |
line-height: 20px; |
| 426 |
} |
| 427 |
|
| 428 |
.tocify-subheader .tocify-item { |
| 429 |
font-size: 0.90em; |
| 430 |
} |
| 431 |
|
| 432 |
.tocify .list-group-item { |
| 433 |
border-radius: 0px; |
| 434 |
} |
| 435 |
|
| 436 |
$if(toc_collapsed)$ |
| 437 |
$else$ |
| 438 |
.tocify-subheader { |
| 439 |
display: inline; |
| 440 |
} |
| 441 |
.tocify-subheader .tocify-item { |
| 442 |
font-size: 0.95em; |
| 443 |
} |
| 444 |
$endif$ |
| 445 |
|
| 446 |
</style> |
| 447 |
|
| 448 |
$endif$ |
| 449 |
|
| 450 |
$endif$ |
| 451 |
|
| 452 |
</head> |
| 453 |
|
| 454 |
<body> |
| 455 |
|
| 456 |
$if(theme)$ |
| 457 |
|
| 458 |
<div class="container-fluid main-container"> |
| 459 |
|
| 460 |
$if(toc_float)$ |
| 461 |
|
| 462 |
|
| 463 |
<div class="row"> |
| 464 |
$if(bs3)$ |
| 465 |
<div class="col-xs-12 col-sm-4 col-md-3"> |
| 466 |
$else$ |
| 467 |
<div class="col-sm-12 col-md-4 col-lg-3"> |
| 468 |
$endif$ |
| 469 |
$if(toc-title)$ |
| 470 |
<h2 id="$idprefix$toc-title">$toc-title$</h2> |
| 471 |
$endif$ |
| 472 |
<div id="$idprefix$TOC" class="tocify"> |
| 473 |
</div> |
| 474 |
</div> |
| 475 |
|
| 476 |
$if(bs3)$ |
| 477 |
<div class="toc-content col-xs-12 col-sm-8 col-md-9"> |
| 478 |
$else$ |
| 479 |
<div class="toc-content col-sm-12 col-md-8 col-lg-9"> |
| 480 |
$endif$ |
| 481 |
|
| 482 |
$endif$ |
| 483 |
|
| 484 |
$endif$ |
| 485 |
|
| 486 |
$for(include-before)$ |
| 487 |
$include-before$ |
| 488 |
$endfor$ |
| 489 |
|
| 490 |
$if(theme)$ |
| 491 |
<div id="$idprefix$header"> |
| 492 |
|
| 493 |
$if(code_menu)$ |
| 494 |
<div class="btn-group pull-right float-right"> |
| 495 |
<button type="button" class="btn btn-default btn-xs btn-secondary btn-sm dropdown-toggle" data-toggle="dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span>Code</span> <span class="caret"></span></button> |
| 496 |
<ul class="dropdown-menu dropdown-menu-right" style="min-width: 50px;"> |
| 497 |
$if(code_folding)$ |
| 498 |
<li><a id="rmd-show-all-code" href="#">Show All Code</a></li> |
| 499 |
<li><a id="rmd-hide-all-code" href="#">Hide All Code</a></li> |
| 500 |
$if(source_embed)$ |
| 501 |
<li role="separator" class="divider"></li> |
| 502 |
$endif$ |
| 503 |
$endif$ |
| 504 |
$if(source_embed)$ |
| 505 |
<li><a id="rmd-download-source" href="#">Download Rmd</a></li> |
| 506 |
$endif$ |
| 507 |
</ul> |
| 508 |
</div> |
| 509 |
|
| 510 |
$endif$ |
| 511 |
|
| 512 |
$endif$ |
| 513 |
|
| 514 |
$if(title)$ |
| 515 |
<h1 class="title toc-ignore">$title$</h1> |
| 516 |
$if(subtitle)$ |
| 517 |
<h3 class="subtitle">$subtitle$</h3> |
| 518 |
$endif$ |
| 519 |
$for(author)$ |
| 520 |
$if(author.name)$ |
| 521 |
<h4 class="author">$author.name$</h4> |
| 522 |
$if(author.affiliation)$ |
| 523 |
<address class="author_afil"> |
| 524 |
$author.affiliation$<br>$endif$ |
| 525 |
$if(author.email)$ |
| 526 |
<a class="author_email" href="mailto:#">$author.email$</a> |
| 527 |
</address> |
| 528 |
$endif$ |
| 529 |
$else$ |
| 530 |
<h4 class="author">$author$</h4> |
| 531 |
$endif$ |
| 532 |
$endfor$ |
| 533 |
$if(date)$ |
| 534 |
<h4 class="date">$date$</h4> |
| 535 |
$endif$ |
| 536 |
$if(abstract)$ |
| 537 |
<div class="abstract"> |
| 538 |
<p class="abstract">Abstract</p> |
| 539 |
$abstract$ |
| 540 |
</div> |
| 541 |
$endif$ |
| 542 |
$endif$ |
| 543 |
|
| 544 |
$if(theme)$ |
| 545 |
</div> |
| 546 |
$endif$ |
| 547 |
|
| 548 |
$if(toc_float)$ |
| 549 |
$else$ |
| 550 |
$if(toc)$ |
| 551 |
<div id="$idprefix$TOC"> |
| 552 |
$if(toc-title)$ |
| 553 |
<h2 id="$idprefix$toc-title">$toc-title$</h2> |
| 554 |
$endif$ |
| 555 |
$toc$ |
| 556 |
</div> |
| 557 |
$endif$ |
| 558 |
$endif$ |
| 559 |
|
| 560 |
$body$ |
| 561 |
|
| 562 |
$for(include-after)$ |
| 563 |
$include-after$ |
| 564 |
$endfor$ |
| 565 |
|
| 566 |
$if(theme)$ |
| 567 |
|
| 568 |
$if(toc_float)$ |
| 569 |
</div> |
| 570 |
</div> |
| 571 |
$endif$ |
| 572 |
|
| 573 |
</div> |
| 574 |
|
| 575 |
<script> |
| 576 |
|
| 577 |
// add bootstrap table styles to pandoc tables |
| 578 |
function bootstrapStylePandocTables() { |
| 579 |
$$('tr.odd').parent('tbody').parent('table').addClass('table table-condensed'); |
| 580 |
} |
| 581 |
$$(document).ready(function () { |
| 582 |
bootstrapStylePandocTables(); |
| 583 |
}); |
| 584 |
|
| 585 |
$if(kable-scroll)$ |
| 586 |
$$(document).ready(function () { |
| 587 |
$$('.knitsql-table').addClass('kable-table'); |
| 588 |
var container = $$('.kable-table'); |
| 589 |
container.each(function() { |
| 590 |
|
| 591 |
// move the caption out of the table |
| 592 |
var table = $$(this).children('table'); |
| 593 |
var caption = table.children('caption').detach(); |
| 594 |
caption.insertBefore($$(this)).css('display', 'inherit'); |
| 595 |
}); |
| 596 |
}); |
| 597 |
$endif$ |
| 598 |
|
| 599 |
</script> |
| 600 |
|
| 601 |
|
| 602 |
|
| 603 |
<script> |
| 604 |
$$(document).ready(function () { |
| 605 |
window.buildTabsets("$idprefix$TOC"); |
| 606 |
}); |
| 607 |
|
| 608 |
$$(document).ready(function () { |
| 609 |
$$('.tabset-dropdown > .nav-tabs > li').click(function () { |
| 610 |
$$(this).parent().toggleClass('nav-tabs-open'); |
| 611 |
}); |
| 612 |
}); |
| 613 |
</script> |
| 614 |
$endif$ |
| 615 |
|
| 616 |
|
| 617 |
$if(code_menu)$ |
| 618 |
<script> |
| 619 |
$$(document).ready(function () { |
| 620 |
$if(source_embed)$ |
| 621 |
window.initializeSourceEmbed("$source_embed$"); |
| 622 |
$endif$ |
| 623 |
$if(code_folding)$ |
| 624 |
window.initializeCodeFolding("$code_folding$" === "show"); |
| 625 |
$endif$ |
| 626 |
}); |
| 627 |
</script> |
| 628 |
$endif$ |
| 629 |
|
| 630 |
$if(toc_float)$ |
| 631 |
<script> |
| 632 |
$$(document).ready(function () { |
| 633 |
|
| 634 |
// temporarily add toc-ignore selector to headers for the consistency with Pandoc |
| 635 |
$$('.unlisted.unnumbered').addClass('toc-ignore') |
| 636 |
|
| 637 |
// move toc-ignore selectors from section div to header |
| 638 |
$$('div.section.toc-ignore') |
| 639 |
.removeClass('toc-ignore') |
| 640 |
.children('h1,h2,h3,h4,h5').addClass('toc-ignore'); |
| 641 |
|
| 642 |
// establish options |
| 643 |
var options = { |
| 644 |
selectors: "$toc_selectors$", |
| 645 |
theme: "bootstrap3", |
| 646 |
context: '.toc-content', |
| 647 |
hashGenerator: function (text) { |
| 648 |
return text.replace(/[.\\/?&!#<>]/g, '').replace(/\s/g, '_'); |
| 649 |
}, |
| 650 |
ignoreSelector: ".toc-ignore", |
| 651 |
scrollTo: 0 |
| 652 |
}; |
| 653 |
$if(toc_collapsed)$ |
| 654 |
options.showAndHide = true; |
| 655 |
$else$ |
| 656 |
options.showAndHide = false; |
| 657 |
$endif$ |
| 658 |
$if(toc_smooth_scroll)$ |
| 659 |
options.smoothScroll = true; |
| 660 |
$else$ |
| 661 |
options.smoothScroll = false; |
| 662 |
$endif$ |
| 663 |
|
| 664 |
// tocify |
| 665 |
var toc = $$("#$idprefix$TOC").tocify(options).data("toc-tocify"); |
| 666 |
}); |
| 667 |
</script> |
| 668 |
$endif$ |
| 669 |
|
| 670 |
$if(mathjax-url)$ |
| 671 |
|
| 672 |
<script> |
| 673 |
(function () { |
| 674 |
var script = document.createElement("script"); |
| 675 |
script.type = "text/javascript"; |
| 676 |
script.src = "$mathjax-url$"; |
| 677 |
document.getElementsByTagName("head")[0].appendChild(script); |
| 678 |
})(); |
| 679 |
</script> |
| 680 |
$endif$ |
| 681 |
|
| 682 |
</body> |
| 683 |
</html> |