What are the new MathJax extensions available for use?

  • MHB
  • Thread starter MarkFL
  • Start date
  • Tags
    Mathjax
  • #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!
 

Similar threads

Replies
3
Views
1K
Replies
14
Views
1K
Replies
59
Views
9K
Replies
15
Views
25K
Replies
0
Views
5K
2
Replies
48
Views
10K
Replies
4
Views
4K
Back
Top