File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
mathjax2/legacy/jax/element Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 11import { MathJax } from "mathjax3/mathjax.js" ;
22export { MathJax } from "mathjax3/mathjax.js" ;
33
4- import "mathjax3/handlers/html.js" ;
54import { TeX } from "mathjax3/input/tex.js" ;
5+ import { RegisterHTMLHandler } from "mathjax3/handlers/html.js" ;
6+ import { chooseAdaptor } from "mathjax3/adaptors/chooseAdaptor.js" ;
67import { CHTML } from "mathjax3/output/chtml.js" ;
78
8- let html = MathJax . Document ( "<html></html>" , {
9+ RegisterHTMLHandler ( chooseAdaptor ( ) ) ;
10+
11+ let html = MathJax . document ( "<html></html>" , {
912 InputJax : new TeX ( ) ,
1013 OutputJax : new CHTML ( )
1114} ) ;
1215
13- MathJax . HandleRetriesFor ( function ( ) {
16+ MathJax . handleRetriesFor ( function ( ) {
1417
15- html . TestMath ( process . argv [ 3 ] || '' ) . Compile ( ) . Typeset ( ) ;
18+ html . TestMath ( process . argv [ 3 ] || '' ) . compile ( ) . typeset ( ) ;
1619 let math = html . math . pop ( ) ;
1720 console . log ( math . typeset . outerHTML ) ;
1821
Original file line number Diff line number Diff line change 2929 return node ;
3030 } ,
3131 nodeMake : function ( factory , kind ) {
32- var node = factory . MML [ kind ] ( ) ;
32+ var node = factory . MML [ kind === 'TeXmathchoice' ? 'mathchoice' : kind ] ( ) ;
3333 var data = ( this . data [ 0 ] && this . data [ 0 ] . inferred && this . inferRow ? this . data [ 0 ] . data : this . data ) ;
3434 for ( var i = 0 , m = data . length ; i < m ; i ++ ) {
3535 var child = data [ i ] ;
You can’t perform that action at this time.
0 commit comments