123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- MathJax.Extension["TeX/extpfeil"] = {
- version: "2.7.2"
- };
- MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
-
- var TEX = MathJax.InputJax.TeX,
- TEXDEF = TEX.Definitions;
-
-
-
-
-
- TEXDEF.Add({
- macros: {
- xtwoheadrightarrow: ['Extension','AMSmath'],
- xtwoheadleftarrow: ['Extension','AMSmath'],
- xmapsto: ['Extension','AMSmath'],
- xlongequal: ['Extension','AMSmath'],
- xtofrom: ['Extension','AMSmath'],
- Newextarrow: ['Extension','AMSmath']
- }
- },null,true);
-
-
-
-
- MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () {
- MathJax.Hub.Insert(TEXDEF,{
- macros: {
- xtwoheadrightarrow: ['xArrow',0x21A0,12,16],
- xtwoheadleftarrow: ['xArrow',0x219E,17,13],
- xmapsto: ['xArrow',0x21A6,6,7],
- xlongequal: ['xArrow',0x003D,7,7],
- xtofrom: ['xArrow',0x21C4,12,12],
- Newextarrow: 'NewExtArrow'
- }
- });
- });
-
-
-
-
- TEX.Parse.Augment({
- NewExtArrow: function (name) {
- var cs = this.GetArgument(name),
- space = this.GetArgument(name),
- chr = this.GetArgument(name);
- if (!cs.match(/^\\([a-z]+|.)$/i)) {
- TEX.Error(["NewextarrowArg1",
- "First argument to %1 must be a control sequence name",name]);
- }
- if (!space.match(/^(\d+),(\d+)$/)) {
- TEX.Error(
- ["NewextarrowArg2",
- "Second argument to %1 must be two integers separated by a comma",
- name]
- );
- }
- if (!chr.match(/^(\d+|0x[0-9A-F]+)$/i)) {
- TEX.Error(
- ["NewextarrowArg3",
- "Third argument to %1 must be a unicode character number",
- name]
- );
- }
- cs = cs.substr(1); space = space.split(","); chr = parseInt(chr);
- TEXDEF.macros[cs] = ['xArrow',chr,parseInt(space[0]),parseInt(space[1])];
- }
- });
-
- MathJax.Hub.Startup.signal.Post("TeX extpfeil Ready");
- });
- MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/extpfeil.js");
|