<html>
	<!-- kramdown - -template ~/Sites/document-mathjax -->
  <head>
<%
extend ::Kramdown::Utils::Html
title = ''
h = @converter.root.children.find {|c| c.type == :header}
if h
  collector = lambda {|c| c.children.collect {|cc| cc.type == :text ? escape_html(cc.value, :text) : collector.call(cc)}.join('')}
  title = collector.call(h)
end
%>
    <title><%= title %></title>
    <meta name="generator" content="kramdown <%= ::Kramdown::VERSION %>" />
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css">
html {
	background-color: rgb(211,211,220);
}
</style>
	<!-- http://docs.mathjax.org/en/latest/configuration.html#using-in-line-configuration-options -->
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX", "output/HTML-CSS"],
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
      processEscapes: true
    },
    "HTML-CSS": { availableFonts: ["TeX"] }
  });
</script>
	  <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js">
	  <!-- http://docs.mathjax.org/en/latest/configuration.html#loading-cdn -->
	  </script>
  </head>
  <body>
  <%= @body %>
  </body>
</html>
