Created
June 25, 2009 18:29
-
-
Save hamen/136064 to your computer and use it in GitHub Desktop.
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
CmdUtils.CreateCommand({ | |
name: "latex", | |
description: "Write LaTex and render it with mimetex ", | |
help: "Write down some LaTex statement, i.e. \frac{1}{S^2 - 1}", | |
author: {name: "Ivan Morgillo", email: "imorgillo [at] sanniolug [dot] org"}, | |
license: "GPL v3", | |
homepage: "http://hamen.org", | |
arguments: {object: noun_arb_text}, | |
preview: function(pblock, args) { | |
var postdata = args.object.text; | |
var url = "http://operaez.net/mimetex/"; | |
if(postdata != ""){ | |
CmdUtils.previewGet(pblock, url, postdata, function(data){ | |
pblock.innerHTML = "Get this image <table bgcolor='white'><tr><td><img src=http://operaez.net/mimetex/\\HUGE{" + postdata + "}></td></tr></table>http://operaez.net/mimetex/\\HUGE{" + postdata + "}"; | |
}); | |
}else{ | |
pblock.innerHTML = "Write down some LaTex stuff"; | |
} | |
}, | |
execute: function(args) { | |
var postdata = args.object.text; | |
Utils.openUrlInBrowser("http://operaez.net/mimetex/\\LARGE{" + postdata + "}"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment