Skip to content

Instantly share code, notes, and snippets.

@monofon
Created September 17, 2012 04:37
Show Gist options
  • Save monofon/3735579 to your computer and use it in GitHub Desktop.
Save monofon/3735579 to your computer and use it in GitHub Desktop.
Using remark with jQuery and MathJax
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<!-- Use remark, jQuery and MathJax -->
<script src="https://github.com/downloads/gnab/remark/remark-0.3.6.min.js"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://cdn.mathjax.org/mathjax/2.0-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&delayStartupUntil=configured"></script>
</head>
<body>
<textarea id="source"></textarea>
<script>
/* Configure remark */
require("marked").setOptions({gfm: true});
/* Synchronously load the markdown slides. */
$.ajaxSetup({async:false});
$("#source").load("index.markdown");
$(window).load(function() {
/* Remark already has an onload handler registered. This will run
afterwards. */
$("a").attr("target", "_blank");
MathJax.Hub.Configured();
});
</script>
<div id="slideshow"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment