This is an example of LATEX to HTML conversion using tex4ht. The document was compiled to HTML + MathML first, then it has been post-processed using Mathjax-node-page to pure HTML + CSS. This method should work in all modern web browsers, as MathML has poor browser support. It should be also much faster than client side MathML rendering by MathJax.
I’ve used a sample document provided by Prof Toby Roberts.
The development version of make4ht, build system for tex4ht has been used. It has a support for Lua extensions, which can be used for modification of the generated files. It contains mathjaxnode extension for Mathjax-node-page (which needs to be installed on the system) support. The following command line invocation has been used for the compilation:
The configuration file stack.cfg contains some commands to add some additional styling for the resulting HTML file:
The original content follows:
See how the delimiters are of reasonable size in these examples
even when there is no matching delimiter
Differentials often need a bit of help with their spacing as in
whereas vector problems often lead to statements such as
Occasionally one gets horrible line breaks when using a list in mathematics such as listing the first twelve primes . In such cases, perhaps include \mathcode‘\,="213B inside the inline maths environment so that the list breaks: . Be discerning about when to do this as the spacing is different.
Arrays of mathematics are typeset using one of the matrix environments as in
Case statements use cases:
Many arrays have lots of dots all over the place as in
In the flow of a fluid film we may report
Alternatively, the curl of a vector field may be written with only one equation number:
Whereas a derivation may look like
Observe that trigonometric and other elementary functions are typeset properly, even to the extent of providing a thin space if followed by a single letter argument:
With sub- and super-scripts placed properly on more complicated functions,
and large operators, such as integrals and
In inline mathematics the scripts are correctly placed to the side in order to conserve vertical space, as in
Mathematical accents are performed by a short command with one argument, such as
or
The Airy function, , may be incorrectly defined as this integral
This vector identity serves nicely to illustrate two of the new commands:
Definition 1 (right-angled triangles) A right-angled triangle is a triangle whose sides of length , and ,in some permutation of order, satisfies .
Lemma 2 The triangle with sides of length , and is right-angled.
This lemma follows from the Definition 1 as .
Prove this Theorem 3 by the algebra .