File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -486,14 +486,16 @@ function ConfigureMathJax() {
486486 //
487487 // Set up None output jax (for when only MathML output is needed)
488488 //
489- MathJax . OutputJax . None = MathJax . OutputJax ( {
490- id : "None" ,
491- preTranslate : function ( ) { } ,
492- Translate : function ( ) { } ,
493- postTranslate : function ( ) { }
489+ MathJax . Hub . Register . StartupHook ( "End Jax" , function ( ) {
490+ MathJax . OutputJax . None = MathJax . OutputJax ( {
491+ id : "None" ,
492+ preTranslate : function ( ) { } ,
493+ Translate : function ( ) { } ,
494+ postTranslate : function ( ) { }
495+ } ) ;
496+ MathJax . OutputJax . None . loadComplete ( "jax.js" ) ;
497+ MathJax . OutputJax . None . Register ( "jax/mml" ) ;
494498 } ) ;
495- MathJax . OutputJax . None . loadComplete ( "jax.js" ) ;
496- MathJax . OutputJax . None . Register ( "jax/mml" ) ;
497499
498500 //
499501 // Reset the color extension after `autoload-all`
Original file line number Diff line number Diff line change 1+ var tape = require ( 'tape' ) ;
2+ var mjAPI = require ( "../lib/main.js" ) ;
3+
4+ tape ( 'basic configuration: useFontCache' , function ( t ) {
5+ t . plan ( 2 ) ;
6+
7+ var tex = 'a' ;
8+ mjAPI . typeset ( {
9+ math : tex ,
10+ format : "TeX" ,
11+ svg : true ,
12+ useFontCache : false
13+ } , function ( result , data ) {
14+ t . ok ( result . svg . indexOf ( '<use' ) === - 1 , 'useFontCache set to false' ) ;
15+ } ) ;
16+ mjAPI . typeset ( {
17+ math : tex ,
18+ format : "TeX" ,
19+ svg : true ,
20+ useFontCache : true
21+ } , function ( result , data ) {
22+ t . ok ( result . svg . indexOf ( '<use' ) > - 1 , 'useFontCache set to true' ) ;
23+ } ) ;
24+ } ) ;
You can’t perform that action at this time.
0 commit comments