Skip to content

Instantly share code, notes, and snippets.

@monofon
monofon / index.html
Created September 17, 2012 04:37
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>
@kianwilcox
kianwilcox / gist:3628288
Created September 5, 2012 00:01
Calculator view in RubyMotion
class Calculator < UIView
attr_accessor :entryView
attr_accessor :stepView
attr_accessor :keyboardView
attr_accessor :current_problem
attr_accessor :nextInput
attr_accessor :hint
attr_accessor :reveal
attr_accessor :explain
@jiewmeng
jiewmeng / MathJaxMarkdownEditor.coffee
Created August 31, 2012 13:45
MathJax/Markdown Editor in CoffeeScript
define [
"marked",
"jquery",
"mathjax"
], (marked, $, MathJax) ->
# see: http://cdn.mathjax.org/mathjax/latest/test/sample-dynamic-2.html
class MathJaxMarkdownEditor
inputName: "#editor"
@mitya57
mitya57 / mathjax-error-test.html
Created August 30, 2012 14:09
HTML after MathJax processing
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/x-mathjax-config;executed=true">
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Startup",function () {
var HTMLCSS = MathJax.OutputJax["HTML-CSS"];
HTMLCSS.Font.checkWebFont = function (check,font,callback) {
if (check.time(callback)) return;
if (check.total === 0) {
HTMLCSS.Font.testFont(font);
setTimeout(check,200);
@mitya57
mitya57 / qtwebkit-test.py
Created August 28, 2012 12:31
QtWebKit + MathJax test
#!/usr/bin/env python
import sys
from PyQt4.QtCore import QFile, QFileInfo, QTextStream, QUrl
from PyQt4.QtGui import QApplication
from PyQt4.QtWebKit import QWebView
pageSource = """<html><head>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</head><body>
@chrisbrich
chrisbrich / MathJax.css
Created August 19, 2012 03:37
Reusable Component: MathJax label
rect {
fill:yellow
}
.xlabel div.holder{
position: relative;
height: 100%;
width: 100%;
}
@ramnathv
ramnathv / mathjax.html
Created July 29, 2012 21:00
Mathjax Fallback
<!-- MathJax: Fall back to local if CDN offline but local image fonts are not supported (saves >100MB) -->
<script src="https://c328740.ssl.cf1.rackcdn.com/mathjax/2.0-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script>window.MathJax || document.write('<script type="text/x-mathjax-config">MathJax.Hub.Config({"HTML-CSS":{imageFont:null}});<\/script><script src="{{ url.mathjax }}/MathJax.js?config=TeX-AMS-MML_HTMLorMML"><\/script>')</script>
@npisenti
npisenti / showjax.js
Created July 1, 2012 17:05
Mathjax + Showdown (markdown)
/* 'showjax' script from ls_atomic.
* used to render markdown (via showdown.js)
* and then render mathjax.
*/
$(document).ready(function() {
$(".markdown").each(function() { $(this).markdown(); }); // when document loads, render markdown + mathjax
$(".jaxonly").each(function() {$(this).renderJax(); }); // render sections that are mathjax-only
@jeromyanglim
jeromyanglim / example-r-markdown.rmd
Created May 17, 2012 04:23
Example of using R Markdown
This post examines the features of [R Markdown](http://www.rstudio.org/docs/authoring/using_markdown)
using [knitr](http://yihui.name/knitr/) in Rstudio 0.96.
This combination of tools provides an exciting improvement in usability for
[reproducible analysis](http://stats.stackexchange.com/a/15006/183).
Specifically, this post
(1) discusses getting started with R Markdown and `knitr` in Rstudio 0.96;
(2) provides a basic example of producing console output and plots using R Markdown;
(3) highlights several code chunk options such as caching and controlling how input and output is displayed;
(4) demonstrates use of standard Markdown notation as well as the extended features of formulas and tables; and
(5) discusses the implications of R Markdown.
@hidsh
hidsh / MathJax-jquery.html
Last active February 18, 2022 00:32
mathjax interactive preview
<!-- this document is fully based on MathJax-jquery.html by kurokigen. -->
<html>
<head>
<title>Live Preview of MathJax Type Setting</title>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ["\\(","\\)"]] } });
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>