<!DOCTYPE html>
<html lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
<head>

<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta property="og:title" content="$pagetitle$" />
<meta property="og:type" content="book" />
$if(url)$<meta property="og:url" content="$url$" />$endif$
$if(cover-image)$<meta property="og:image" content="$url$$cover-image$" />$endif$
$if(description)$<meta property="og:description" content="$description$" />$endif$
$if(github-repo)$<meta name="github-repo" content="$github-repo$" />$endif$

$for(author-meta)$
<meta name="author" content="$author-meta$" />
$endfor$

$if(date-meta)$
<meta name="date" content="$date-meta$" />
$endif$

$if(math)$
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  TeX: { equationNumbers: { autoNumber: "AMS" } }
});
</script>
  $math$
$endif$

<meta name="description" content="$if(description)$$description$$else$$pagetitle$$endif$">

<title>$if(title-prefix)$$title-prefix$ - $endif$$pagetitle$</title>

$for(header-includes)$
$header-includes$
$endfor$

$if(highlightjs)$
<style type="text/css">code{white-space: pre;}</style>
<link rel="stylesheet"
      href="$highlightjs$/$if(highlightjs-theme)$$highlightjs-theme$$else$default$endif$.css"
      $if(html5)$$else$type="text/css" $endif$/>
<script src="$highlightjs$/highlight.js"></script>
$if(theme)$
<style type="text/css">
  pre:not([class]) {
    background-color: white;
  }
</style>
$endif$
<script type="text/javascript">
if (window.hljs && document.readyState && document.readyState === "complete") {
   window.setTimeout(function() {
      hljs.initHighlighting();
   }, 0);
}
</script>
$endif$

$if(highlighting-css)$
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
$highlighting-css$
</style>
$if(theme)$
<style type="text/css">
  pre:not([class]) {
    background-color: white;
  }
</style>
$endif$
$endif$

$if(abstract)$
<style type="text/css">
  p.abstract{
    text-align: center;
    font-weight: bold;
  }
  div.abstract{
    margin: auto;
    width: 90%;
  }
</style>
$endif$

$for(css)$
<link rel="stylesheet" href="$css$" $if(html5)$$else$type="text/css" $endif$/>
$endfor$

$if(theme)$
<style type = "text/css">
.main-container {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}
code {
  color: inherit;
  background-color: rgba(0, 0, 0, 0.04);
}
img {
  max-width:100%;
  height: auto;
}
</style>
$endif$
</head>

<body>

$if(theme)$
<div class="container-fluid main-container">
$endif$

$for(include-before)$
$include-before$
$endfor$

<!--bookdown:title:start-->
$if(title)$
<div id="$idprefix$header">
<h1 class="title">$title$</h1>
$if(subtitle)$
<h3 class="subtitle"><em>$subtitle$</em></h3>
$endif$
$for(author)$
$if(author.name)$
<h4 class="author"><em>$author.name$</em></h4>
$if(author.affiliation)$
<address class="author_afil">
$author.affiliation$<br>$endif$
$if(author.email)$
<a class="author_email" href="mailto:#">$author.email$</a>
</address>
$endif$
$else$
<h4 class="author"><em>$author$</em></h4>
$endif$
$endfor$
$if(date)$
<h4 class="date"><em>$date$</em></h4>
$endif$
</div>
$if(abstract)$
<div class="abstract">
<p class="abstract">$if(abstract-title)$$abstract-title$$else$Abstract$endif$</p>
$abstract$
</div>
$endif$
$endif$
<!--bookdown:title:end-->

<!--bookdown:toc:start-->
$if(toc)$
<div id="$idprefix$TOC">
$toc$
</div>
$endif$
<!--bookdown:toc:end-->

<!--bookdown:body:start-->
$body$
<!--bookdown:body:end-->

$for(include-after)$
$include-after$
$endfor$

$if(theme)$
</div>

<script>

// add bootstrap table styles to pandoc tables
$$(document).ready(function () {
  $$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
});

</script>
$endif$

</body>
</html>
