Manually stretch arrow in MathJax -
i using extpfeil extension in mathjax produce arrows in html page. in particular using:
\newextarrow{\cs}{lspace,rspace}{unicode-char}
this works great arrows (for example, see answer davide), documentation states:
note mathjax knows how stretch limited number of characters, may not stretchy character way.
unfortunately, need use 1 of these non-supported characters (specifically, 0x21cc), , nice if stretch. there way can manually specify amount stretch arrows in nice way? context, i'm trying make chemical reaction diagrams this:
the overset , underset variables may few characters long, stretching necessary.
the ability of mathjax stretch character depends on availability of appropriate glyphs within font using. mathjax tex font (the usual web-based font) doesn't have necessary glyphs stretch u+21cc; however, stix fonts do, , of version 2.3, mathjax includes web versions of stix fonts. if authoring own pages , can specify font, u+21cc stretch. if using site stackexchange, can't control font, limited font in use.
to this, add
<script type="text/x-mathjax-config"> mathjax.hub.config({ "html-css": { preferredfont: "stix", availablefonts: ["stix"], webfont: "stix-web" }, svg: { font: "stix-web" }, tex: { extensions: ["extpfeil.js"] } }); </script>
just before script loads mathjax.js
. in body of page use
<div style="display:none"> $$\newextarrow{\rightleftharpoons}{5,5}{0x21cc}$$ </div>
to define arrow (somewhere on before used. use
\rightleftharpoons[xyz]{abcdefg}
to put "abcdefg" on arrow , "xyz" below it, , have stretch. looks vertical positioning of under-text not great (it bit low), arrow stretches!
here example:
Comments
Post a Comment