Skip to content

Instantly share code, notes, and snippets.

@lynaghk
Created March 20, 2011 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lynaghk/878657 to your computer and use it in GitHub Desktop.
Save lynaghk/878657 to your computer and use it in GitHub Desktop.
Pubtex JSONP
<!DOCTYPE html>
<head>
<meta charset='utf-8'>
</head>
<body>
<h1>Original Page content</h1>
<p>blah blah blah</p>
<div id='my_pubtex'></div>
</body>
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js'></script>
<script src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'>
MathJax.Hub.Config({
extensions: ['tex2jax.js', 'TeX/AMSmath.js','TeX/AMSsymbols.js'],
jax: ['input/TeX','output/HTML-CSS'],
showProcessingMessages: false,
messageStyle: 'none',
tex2jax: {
inlineMath: [
['$','$']
],
}
});
</script>
<script type='text/javascript'>
function pubtex(h){
$('#my_pubtex').append(h.article);
}
$('head').append("<script src='http://examples.pubtex.com/article.js'>");
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment