Vamsi Sai T
Vamsi Sai T

Reputation: 157

Using \x* arrows in mathjax

Does mathjax support \x* arrows? If it does, how do I use it (I'm looking for syntax and config)? If it doesn't, is there any method to get strechable arrow with text above it? The number of characters changes with every implementation and the arrow should adjust the width.

I have tried \longrightarrow and others, need longer arrows for my text.

Upvotes: 0

Views: 2212

Answers (1)

Davide Cervone
Davide Cervone

Reputation: 12205

MathJax's AMSmath extension includes \xrightarrow and \xleftarrow which should do what you want. Include

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  TeX: {extensions: ["AMSmath.js","AMSsymbols.js"]}
});
</script>

to load this extension (and the AMSsymbols extension as well).

There is also an extpfeil extension that includes some other extensible symbols. See its documentation for more details.

The extpfeil extension adds more macros for producing extensible arrows, including \xtwoheadrightarrow, \xtwoheadleftarrow, \xmapsto, \xlongequal, \xtofrom, and a non-standard \Newextarrow for creating your own extensible arrows.

Upvotes: 2

Related Questions