diff options
author | Christian Franke <nobody@nowhere.ws> | 2013-04-09 14:31:22 +0200 |
---|---|---|
committer | Christian Franke <nobody@nowhere.ws> | 2013-04-09 14:31:22 +0200 |
commit | 5a774ef6f3b38b19b26913a34b1388530c72334e (patch) | |
tree | 543127427771d75f652fc9e726cc39aa1a72571c /deck.js/extensions/simplemath |
Initial Commit
Diffstat (limited to 'deck.js/extensions/simplemath')
-rw-r--r-- | deck.js/extensions/simplemath/deck.simplemath.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/deck.js/extensions/simplemath/deck.simplemath.js b/deck.js/extensions/simplemath/deck.simplemath.js new file mode 100644 index 0000000..c09d6f3 --- /dev/null +++ b/deck.js/extensions/simplemath/deck.simplemath.js @@ -0,0 +1,25 @@ +/*! +Deck JS - deck.simplemath +Copyright (c) 2012 RĂ©mi Emonet, +using a modified version of the script from http://gold-saucer.afraid.org/mathml/greasemonkey/ by Steve Cheng +*/ + +/* +This module provides a support for latex equation syntax. +*/ + +(function($, deck, undefined) { + var $d = $(document); + var may = function(f) {return f ? f : function() {}}; + + $d.bind('deck.init', function() { + var container = $[deck]('getContainer'); + $('.latex', container).each(function() { + var it = this; + var v = $(it).text(); + it.innerHTML = "$\\displaystyle "+v+"$"; + new latex2mml().patch_element(it); + }); + }); + +})(jQuery, 'deck');
\ No newline at end of file |