@Math Example
It might be nice to have this fallback to images generated with the undocumented Latex support in the Google Chart API for Safari etc., see below.
Or of course with the jsMath support in Pandoc, which looks like it does a good job too.
E.g.
I have some JavaScript code to do this (i.e. convert latex to the appropriate markdown to generate these images) which I would be willing to share, if that would be useful.
In fact here it is, just in case,
convert_latex_to_markdown: function(text) {
var latex_regex = /\$(.+?)\$/g;
var img_url_prefix = 'http://chart.apis.google.com/chart?cht=tx&chf=bg,s,FFFFFF00&chl=';
// The first argument passed to the function is the complete match.
// Followed by a variable number of arguments, one for each capture.
var text_with_latex = text.replace(latex_regex, function (match, latex) {
return '![' + latex + ']' +
'(' + img_url_prefix + $.URLEncode(latex) + ' "' + latex + '")';
});
return text_with_latex;
}
It is copyright Jiva Technology Ltd 2010 (my employer) and is made available under an MIT style licence.
