OverviewThese gadgets use ASCIIMathML to render formulae in the wiki pages of the projects hosted on the Google Code.
There is an open Issue 1431 in the project hosting support. Until such a feature
... [More]
is implemented these gadgets are a viable alternative to using images or plain wiki markup. If you need to write formulae in the wiki hosted by Google Code, then star this issue.
GadgetsThe MathMLGadget can display a single formula.
The AsciiGadget can display some text mixed with formulae in the same paragraph.
For example, the following wiki code
will render like this
.gadget-title {
margin-bottom: 2px;
}
function resizeIframeHandler(opt_height) {
var elem = document.getElementById(this.f);
if (!elem) return;
if (!opt_height) {
elem.style.height = undefined;
}
else {
opt_height = Math.max(10, opt_height);
elem.style.height = opt_height + 'px';
}
}
gadgets.rpc.register("resize_iframe", resizeIframeHandler);
gadgets.rpc.register('set_title', function(title) {
var elem = document.getElementById(this.f + '_title');
if (elem) {
elem.innerHTML = gadgets.util.escape(title);
}
});
and the following wiki code
will render like this
All gadgets have the required content parameter (named as up_content when used from the wiki) to configure the text or formula displayed by the gadget.
The element itself has some additional attributes. The border is usually set to 0 so there is no line border around the content displayed by the gadget. The gadget height (height attribute) is adjusted dynamically to fit the content, but the gadget width (width attribute) is not. If the gadget shows the horizontal scrollbar, the width should be set to either some specific value or to "100%" (the gadget will fill all available horizontal space).
AlternativesAnother similar gadget is http://hosting.gmodules.com/ig/gadgets/file/112026212642543360418/maths.xml (preview) made by Joannes Vermorel.
There are some services that will generate an image of the required formula, for example LaTeX Equation Editor for the Internet by Will Bateman and Steve Mayer and LaTeX Equation Editor from Sitmo. [Less]