384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
|
# File 'lib/ulmul.rb', line 384
def file(stylesheets=["ulmul2html5.css"],javascripts=[],name="",language="en")
style_lines=""
stylesheets.each{|s| style_lines << " <link rel=\"stylesheet\" href=\"#{s}\" type=\"text/css\" />\n"}
javascript_lines=""
javascripts.each{|j| javascript_lines << " <script src=\"#{j}\" type=\"text/javascript\"></script>\n"}
return "<!DOCTYPE html>
<html lang=\"#{language}\">
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
<title>#{@title}</title>
<meta name=\"author\" content=\"#{name}\" />
<script type=\"text/x-mathjax-config\">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'] ]
}
});
</script>
#{style_lines}#{javascript_lines} <link rel=\"icon\" href=\"favicon.ico\" />
</head>
<body onload=\"prettyPrint()\">
#{body()}
<hr />
<address>Copyright © #{Date.today.year} #{name}</address>
</body>
</html>
"
end
|