Mathematical formulae in documentation / Mathjax
Luc Bourhis via Digitalmars-d
digitalmars-d at puremagic.com
Thu Dec 4 06:33:16 PST 2014
Hi,
MathJax is a Javascript trick that can nicely typeset
mathematical equations written in TeX, on-the-fly, in any HTML
document. Enabling it is easily done by adding some <script
...></script> in the <head>, which I managed to do by overriding
DDOC. However, if I have a piece of code like
/// Return \(x^2\)
int square(int x)
dmd -D produces
.... Return \(<i>x</i>\) ....
Mathjax searches for \( ... \) in the page and then typeset as if
it was written in TeX it but here it does not recognise <i> and
gives up. Editing DDOC_PARAM is not an option of course.
Is there a way around?
Thanks in advance!
More information about the Digitalmars-d
mailing list