Created
September 17, 2012 04:37
-
-
Save monofon/3735579 to your computer and use it in GitHub Desktop.
Using remark with jQuery and MathJax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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