What are the new MathJax extensions available for use?

  • Context: MHB 
  • Thread starter Thread starter MarkFL
  • Start date Start date
  • Tags Tags
    Mathjax
Click For Summary
SUMMARY

The latest update to MathJax includes a comprehensive set of new extensions that enhance its functionality for rendering mathematical expressions. Key additions include the Bbox, Cancel, Chemical equations, Enclose, Extpfeil, Text tip, and Unicode commands. Users can now define custom arrows and utilize macros for various mathematical functions, including newly added trigonometric functions. For detailed documentation, refer to the official MathJax documentation at this link.

PREREQUISITES
  • Familiarity with MathJax 3.x syntax
  • Basic understanding of LaTeX for mathematical typesetting
  • Knowledge of mathematical concepts such as functions and equations
  • Experience with web development to implement MathJax in web applications
NEXT STEPS
  • Explore the MathJax documentation for detailed usage of the new extensions
  • Learn how to define custom commands in MathJax
  • Investigate the implementation of MathJax in various web frameworks
  • Study advanced LaTeX commands and their integration with MathJax
USEFUL FOR

Web developers, educators, mathematicians, and anyone involved in creating or displaying mathematical content online will benefit from this discussion.

MarkFL
Gold Member
MHB
Messages
13,284
Reaction score
12
Hello Everyone,

We have added all of MathJax's extensions to our script, so we have many new commands available. You can read about them here:

http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-extensions

Here are some examples of our new extensions:

Bbox:

Code:
$$\bbox[5px,border:2px solid red]{\frac{x}{y}}$$

$$\bbox[5px,border:2px solid red]{\frac{x}{y}}$$

Code:
$$\color{white}\bbox[5px,blue]{\sum_{k=0}^n\left(k^3 \right)=\left(\sum_{k=0}^n\left(k \right) \right)^2}$$

$$\color{white}\bbox[5px,blue]{\sum_{k=0}^n\left(k^3 \right)=\left(\sum_{k=0}^n\left(k \right) \right)^2}$$

Cancel:

The cancel commands (we previously had this extension, but we thought it would be good to show the variants):

Code:
$$\frac{\cancel{a}x}{\cancel{a}}=x$$

$$\frac{\cancel{a}x}{\cancel{a}}=x$$

Code:
$$\frac{\bcancel{a}x}{\bcancel{a}}=x$$

$$\frac{\bcancel{a}x}{\bcancel{a}}=x$$

Code:
$$\frac{\xcancel{a}x}{\xcancel{a}}=x$$

$$\frac{\xcancel{a}x}{\xcancel{a}}=x$$

Chemical equations:

Code:
$$\ce{SO4^2- + Ba^2+ -> BaSO4 v}$$

$$\ce{SO4^2- + Ba^2+ -> BaSO4 v}$$

Enclose:

Code:
$$\enclose{circle}[mathcolor="red"]{\color{black}{x}}$$

$$\enclose{circle}[mathcolor="red"]{\color{black}{x}}$$

Code:
$$\enclose{circle,box}{x}$$

$$\enclose{circle,box}{x}$$

Code:
$$13\enclose{longdiv}{169}$$

$$13\enclose{longdiv}{169}$$

Code:
$$\enclose{left}{\frac{x}{y}}$$

$$\enclose{left}{\frac{x}{y}}$$

Extpfeil:

Code:
$$x\xtwoheadrightarrow y$$

$$x\xtwoheadrightarrow y$$

Code:
$$x\xtwoheadleftarrow y$$

$$x\xtwoheadleftarrow y$$

Code:
$$x\xmapsto y$$

$$x\xmapsto y$$

Code:
$$x\xlongequal y$$

$$x\xlongequal y$$

Code:
$$x\xtofrom y$$

$$x\xtofrom y$$

You can even define your own arrow as follows:

Code:
$$\Newextarrow{\xrightharpoonup}{5,10}{0x21C0}$$

$$\Newextarrow{\xrightharpoonup}{5,10}{0x21C0}$$

and then use it thereafter (in that post):

Code:
$$x\xrightharpoonup y$$

$$x\xrightharpoonup y$$

Text tip:

This allows you to define information the will pop up when the mouse cursor hovers over your expression.

Code:
$$\texttip{\int_a^b f(x)\,dx=F(b)-F(a)}{The Anti-Derivative form of The Fundamental Theorem of Calculus}$$

$$\texttip{\int_a^b f(x)\,dx=F(b)-F(a)}{The Anti-Derivative form of The Fundamental Theorem of Calculus}$$

Unicodes:

Code:
$$\unicode[.55,0.05]{x22D6}$$

$$\unicode[.55,0.05]{x22D6}$$
 
Physics news on Phys.org

Very nice!

\frac{(1+x)^2}{1-x^2} \;=\; \frac{(1+x)^{\cancel2}}{1-x^{\cancel2}} \;=\;\frac{1+x}{1-x}
 
Additionally, I have just discovered that we have:

[LATEXS]\d y x[/LATEXS]$$\d y x$$

[LATEXS]\pd f x[/LATEXS]$$\pd f x$$Nice!
 
I like Serena said:
Additionally, I have just discovered that we have:

[LATEXS]\d y x[/LATEXS]$$\d y x$$

[LATEXS]\pd f x[/LATEXS]$$\pd f x$$Nice!

Yes, those are macros we have defined, which I should have mentioned. We have also added:

\E{n}

$$\E{n}$$

And a bunch of missing trig functions:

\csch
\arccsc
\arcsec
\arccot
\sech
\arsinh
\arcosh
\artanh
\arcsch
\arsech
\arcoth
 
If this thread is not pinned/mentioned in the "LaTeX Tips and Tutorials" subforum, then this information (especially the "MathJax TeX and LaTeX Support" link) is lost to many users.
 
Evgeny.Makarov said:
If this thread is not pinned/mentioned in the "LaTeX Tips and Tutorials" subforum, then this information (especially the "MathJax TeX and LaTeX Support" link) is lost to many users.

Moved and stuck. Good suggestion!
 

Similar threads

Replies
6
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 59 ·
2
Replies
59
Views
12K
  • · Replies 21 ·
Replies
21
Views
1K
  • · Replies 0 ·
Replies
0
Views
6K
  • · Replies 15 ·
Replies
15
Views
25K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K