Skip to content

Instantly share code, notes, and snippets.

@takumikinjo
takumikinjo / .gitignore
Created August 5, 2010 13:56
HTML5 Presentation export for Org-mode
README.html
@jessykate
jessykate / Jekyll nd Octopress Liquid tag for MathJax.rb
Created February 18, 2011 23:37
A simple liquid tag for Jekyll/Octopress that converts {% m %} and {% em %} into inline math, and {% math %} and {% endmath %} into block equations, by replacing with the appropriate MathJax script tags.
module Jekyll
class MathJaxBlockTag < Liquid::Tag
def render(context)
'<script type="math/tex; mode=display">'
end
end
class MathJaxInlineTag < Liquid::Tag
def render(context)
'<script type="math/tex">'
end
@revathskumar
revathskumar / git-copy-sample.sh
Created March 13, 2012 13:47
Copy all chaged files with directory structure
./git-copy.sh aabb37fc243675de1194e38f75a554695ed3c111 7b6efc6a0731d0da7ce0d13b19098db2f7da224b ../uploads
@yihui
yihui / knitr-slides.html
Created May 1, 2012 17:58
dzslides made by knitr
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta name="author" content="Yihui Xie" />
<title>Writing beautiful and reproducible slides quickly</title>
<style type="text/css">
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
margin: 0; padding: 0; vertical-align: baseline; border: none; }
table.sourceCode { width: 100%; }
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
@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>
@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.
@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
@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>
@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%;
}
@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>