What are the new MathJax extensions available for use?

  • MHB
  • Thread starter MarkFL
  • Start date
  • Tags
    Mathjax
In summary, the new MathJax extensions include commands for box plots, chemical equations, cancels, encloses, text tips, and Unicode.
  • #1
MarkFL
Gold Member
MHB
13,288
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:
[MATH]\bbox[5px,border:2px solid red]{\frac{x}{y}}[/MATH]

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

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

\(\displaystyle \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:
[MATH]\frac{\cancel{a}x}{\cancel{a}}=x[/MATH]

\(\displaystyle \frac{\cancel{a}x}{\cancel{a}}=x\)

Code:
[MATH]\frac{\bcancel{a}x}{\bcancel{a}}=x[/MATH]

\(\displaystyle \frac{\bcancel{a}x}{\bcancel{a}}=x\)

Code:
[MATH]\frac{\xcancel{a}x}{\xcancel{a}}=x[/MATH]

\(\displaystyle \frac{\xcancel{a}x}{\xcancel{a}}=x\)

Chemical equations:

Code:
[MATH]\ce{SO4^2- + Ba^2+ -> BaSO4 v}[/MATH]

\(\displaystyle \ce{SO4^2- + Ba^2+ -> BaSO4 v}\)

Enclose:

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

\(\displaystyle \enclose{circle}[mathcolor="red"]{\color{black}{x}}\)

Code:
[MATH]\enclose{circle,box}{x}[/MATH]

\(\displaystyle \enclose{circle,box}{x}\)

Code:
[MATH]13\enclose{longdiv}{169}[/MATH]

\(\displaystyle 13\enclose{longdiv}{169}\)

Code:
[MATH]\enclose{left}{\frac{x}{y}}[/MATH]

\(\displaystyle \enclose{left}{\frac{x}{y}}\)

Extpfeil:

Code:
[MATH]x\xtwoheadrightarrow y[/MATH]

\(\displaystyle x\xtwoheadrightarrow y\)

Code:
[MATH]x\xtwoheadleftarrow y[/MATH]

\(\displaystyle x\xtwoheadleftarrow y\)

Code:
[MATH]x\xmapsto y[/MATH]

\(\displaystyle x\xmapsto y\)

Code:
[MATH]x\xlongequal y[/MATH]

\(\displaystyle x\xlongequal y\)

Code:
[MATH]x\xtofrom y[/MATH]

\(\displaystyle x\xtofrom y\)

You can even define your own arrow as follows:

Code:
[MATH]\Newextarrow{\xrightharpoonup}{5,10}{0x21C0}[/MATH]

\(\displaystyle \Newextarrow{\xrightharpoonup}{5,10}{0x21C0}\)

and then use it thereafter (in that post):

Code:
[MATH]x\xrightharpoonup y[/MATH]

\(\displaystyle x\xrightharpoonup y\)

Text tip:

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

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

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

Unicodes:

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

\(\displaystyle \unicode[.55,0.05]{x22D6}\)
 
Physics news on Phys.org
  • #2

Very nice!

[tex]\frac{(1+x)^2}{1-x^2} \;=\; \frac{(1+x)^{\cancel2}}{1-x^{\cancel2}} \;=\;\frac{1+x}{1-x} [/tex]
 
  • #3
Additionally, I have just discovered that we have:

[LATEXS]\d y x[/LATEXS]\(\displaystyle \d y x\)

[LATEXS]\pd f x[/LATEXS]\(\displaystyle \pd f x\)Nice!
 
  • #4
I like Serena said:
Additionally, I have just discovered that we have:

[LATEXS]\d y x[/LATEXS]\(\displaystyle \d y x\)

[LATEXS]\pd f x[/LATEXS]\(\displaystyle \pd f x\)Nice!

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

\E{n}

\(\displaystyle \E{n}\)

And a bunch of missing trig functions:

\csch
\arccsc
\arcsec
\arccot
\sech
\arsinh
\arcosh
\artanh
\arcsch
\arsech
\arcoth
 
  • #5
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.
 
  • #6
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!
 

Related to What are the new MathJax extensions available for use?

1. What are the new MathJax extensions that have been added?

The new MathJax extensions that have been added are the MathML extension, the TeX input extension, the AsciiMath input extension, the SVG output extension, and the HTML-CSS output extension.

2. How do these new extensions improve the functionality of MathJax?

These new extensions improve the functionality of MathJax by allowing for greater flexibility in input and output formats, making it easier for users to write and display complex mathematical equations and expressions.

3. Can I still use the old MathJax extensions?

Yes, the old MathJax extensions are still available and can be used alongside the new extensions. However, it is recommended to use the new extensions for improved performance and functionality.

4. Are there any compatibility issues with the new MathJax extensions?

No, the new MathJax extensions are designed to be compatible with all major web browsers and operating systems. However, some older browsers may not support certain features of the new extensions.

5. Are there any resources available for learning how to use the new MathJax extensions?

Yes, there are resources available on the MathJax website, such as documentation and tutorials, to help users learn how to use the new extensions effectively. Additionally, there are online communities and forums where users can ask for help and share tips and tricks for using the new extensions.

Similar threads

  • Introductory Physics Homework Help
Replies
6
Views
284
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
324
  • Calculus and Beyond Homework Help
Replies
20
Views
520
  • Advanced Physics Homework Help
2
Replies
59
Views
7K
  • Precalculus Mathematics Homework Help
Replies
3
Views
2K
  • Math Proof Training and Practice
4
Replies
114
Views
6K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
5K
  • Math Proof Training and Practice
2
Replies
48
Views
9K
  • Advanced Physics Homework Help
Replies
9
Views
2K
Back
Top