<!DOCTYPE html>
<html lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
  <head>
    <title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
    <meta charset="utf-8" />
$for(author-meta)$
    <meta name="author" content="$author-meta$" />
$endfor$
$if(date-meta)$
    <meta name="date" content="$date-meta$" />
$endif$
$if(keywords)$
    <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
$endif$
$for(header-includes)$
    $header-includes$
$endfor$
$for(css)$
    <link rel="stylesheet" href="$css$" type="text/css" />
$endfor$
  </head>
  <body>
    <textarea id="source">
$if(title-slide)$
$if(title)$
class: $title-slide-class$

.title[
# $title$
]
$if(subtitle)$
.subtitle[
## $subtitle$
]
$endif$
$for(author)$
.author[
### $author$
]
$endfor$
$if(institute)$
$for(institute)$
.institute[
### $institute$
]
$endfor$
$endif$
$if(date)$
.date[
### $date$
]
$endif$

---
$endif$
$endif$

$for(include-before)$
$include-before$
$endfor$
    </textarea>
$for(include-after)$
$include-after$
$endfor$

$if(mathjax-url)$
<script>
slideshow._releaseMath = function(el) {
  var i, text, code, codes = el.getElementsByTagName('code');
  for (i = 0; i < codes.length;) {
    code = codes[i];
    if (code.parentNode.tagName !== 'PRE' && code.childElementCount === 0) {
      text = code.textContent;
      if (/^\\\((.|\s)+\\\)$$/.test(text) || /^\\\[(.|\s)+\\\]$$/.test(text) ||
          /^\$$\$$(.|\s)+\$$\$$$$/.test(text) ||
          /^\\begin\{([^}]+)\}(.|\s)+\\end\{[^}]+\}$$/.test(text)) {
        code.outerHTML = code.innerHTML;  // remove <code></code>
        continue;
      }
    }
    i++;
  }
};
slideshow._releaseMath(document);
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
  var script = document.createElement('script');
  script.type = 'text/javascript';
  script.src  = '$mathjax-url$';
  if (location.protocol !== 'file:' && /^https?:/.test(script.src))
    script.src  = script.src.replace(/^https?:/, '');
  document.getElementsByTagName('head')[0].appendChild(script);
})();
</script>
$endif$
  </body>
</html>
