On 29.05.2016 22:49, siko1056 wrote:

> Dear Fernando,

>

> I can hardly add anything to this conversation.

>

> * No 30 MB Javascript needs to be included, too many people are 24/7 online

> these days, use the CDN.

> * There should be a PDF version generated by makeinfo attached to a package

> for reading offline / print.

> * I guess rendering issues will be solved with upcoming versions (too many

> projects use MathJax for this not to happen), we have to follow the changes.

> * My biggest concern is the texinfo markup language. As Oliver explained

> @math expands to some emphasize, that would eat brackets {}, and it would

> require something like @verb{$My math$} to get the LaTeX through makeinfo or

> texi2pdf.

>

>

> I uploaded a modified part of the Octave documentation, where the effort of

> including MathJax should become obvious

>

> Exponents_and_Logarithms_mathjax.html

> <

http://octave.1599824.n4.nabble.com/file/n4677253/Exponents_and_Logarithms_mathjax.html>

>

Kai,

thanks for providing an example. Please find attached the same example,

but with HTML5 (MathML is part of HTML5) instead of MathJax. I have

changed the doctype to <!DOCTYPE HTML> and converted the math from Tex

syntax into a <math> structure (which could be automated by some tool

and could be integrated into Texinfo).

The main drawback of MathML would be that it is only supported by Gecko

browsers (however, this is not going to change if everybody prefers

MathJax over MathML). The main drawback of MathJax is that it requires

Javascript.

Back to MathJax:

I'd like to keep additional “LaTeX” fonts out of the website. These make

sense in a printed document, but on a low definition device (most

computer monitors) they add to the problem of rendering the characters

and also don't fit into the sans-serif fonts that we currently use.

Also I dislike that MathJax increases the font-size by 13% in your

example. I found out that this comes from a feature that tries to match

font heights (and does a bad job IMHO).

I could achieve a better result in MathJax for all renderers (see

screenshot attached) except SVG with the following CSS:

/* Common HTML and Preview HTML renderers do not support styles */

.MJXc-TeX-main-R, .MJXp-math {font-family: inherit !important}

.MJXc-TeX-math-I {font-family: inherit !important; font-style: italic;}

… and extended load script:

MathJax.Hub.Config({

tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},

/* don't download LaTeX fonts */

webfont: null,

/*

don't increase font size of math in contrast to regular text

and use custom fonts from the surrounding text

*/

CommonHTML: {

matchFontHeight: false,

mtextFontInherit: true

},

"HTML-CSS": {

matchFontHeight: false,

mtextFontInherit: true,

styles: {

".mi, .mn, .mo": {

"font-family": "inherit !important"

}

}

},

NativeMML: {

matchFontHeight: false,

styles: {

"math": {

/* This affects upright characters and numbers only */

/* I don't know how to affect other glyphs */

"font-family": "inherit"

}

}

},

PreviewHTML: {

mtextFontInherit: true

}

});

Best

Oliver