MathJax v4: customized list of components (original) (raw)

This examples shows how to load a specify list of components rather than one of the combined components. In this case, we load the base TeX component, the newcommand extension, the action extension, and the CHTML output component. The CHTML output is configured to use themathjax-newcm font, since the individual output components don't automatically load a font.

When ane0a \ne 0ane0, there are two solutions to \(ax^2 + bx + c = 0\) and they are x = {-b \pm \sqrt{\texttip{b^2-4ac}{descriminant}} \over 2a}.$$

This example shows how to mix-and-match the components that are loaded (if there isn’t a combined component that includes what you need). This is done by setting the load array in theloader section of you MathJax configuration, as shown below.

Here, we specify the tex-base input jax (which is TeX with no extra packages included), and explicitly load thenewcommand and action extensions. We also load the chtml output jax, and configure it to use the mathjax-newcm font, since the stand-alone output components don't include a font themselves.

The TeX configuration registers the loaded packages with the TeX input jax (it is possible to load extensions without initially enabling them), and adds dollar signs as in-line math delimiters.

The expression in the \texttip macro from theaction module to add a tool-tip to part of the quadratic equation; hover the mouse over the discriminant to see.