Created
November 13, 2012 13:49
-
-
Save joshbode/4065848 to your computer and use it in GitHub Desktop.
LaTeX in remark
This file contains hidden or 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"/> | |
<script type="text/javascript" src="https://github.com/downloads/gnab/remark/remark-0.4.2.min.js"></script> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML&delayStartupUntil=configured"> | |
remark.on('ready', function () { | |
MathJax.Hub.Config({ | |
tex2jax: { | |
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'] | |
} | |
}); | |
MathJax.Hub.Queue(function() { | |
$(MathJax.Hub.getAllJax()).map(function(index, elem) { | |
return(elem.SourceElement()); | |
}).parent().addClass('has-jax'); | |
}); | |
MathJax.Hub.Configured(); | |
}); | |
</script> | |
<style type="text/css" media="screen"> | |
code.has-jax {font: inherit; font-size: 100%; background: inherit; border: inherit;} | |
</style> | |
</head> | |
<body> | |
<textarea id="source"> | |
class: center, middle | |
# `\(\LaTeX{}\)` in remark | |
--- | |
# Display and Inline | |
1. This is an inline integral: `\(\int_a^bf(x)dx\)` | |
2. More `\(x={a \over b}\)` formulae. | |
Display formula: | |
$$e^{i\pi} + 1 = 0$$ | |
</textarea> | |
<div id="slideshow" /> | |
</body> | |
</html> |
This seems to no longer work as is with remark 0.5.0 and newer: there is no longer a remark.on
function. It's no longer necessary.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Inspired by the method in this site to fix inline LaTeX