File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,9 @@ function ConfigureMathJax() {
209209 MathJax . Hub . Register . MessageHook ( "TeX Jax - parse error" , function ( message ) {
210210 AddError ( "TeX parse error" , message [ 1 ] ) ;
211211 } ) ;
212+ MathJax . Hub . Register . MessageHook ( "file load error" , function ( message ) {
213+ AddError ( "File load error" , message [ 1 ] ) ;
214+ } ) ;
212215
213216 //
214217 // Set the delays to 0 (we don't need to update the screen)
@@ -545,7 +548,7 @@ function ConfigureTypeset() {
545548 // Reset the MathJax counters for things
546549 //
547550 SVG . resetGlyphs ( true ) ;
548- TEX . resetEquationNumbers ( ) ;
551+ if ( TEX . resetEquationNUmbers ) TEX . resetEquationNumbers ( ) ;
549552 MML . SUPER . ID = 0 ;
550553
551554 //
@@ -668,7 +671,8 @@ function AdjustMML() {
668671 for ( var i = nodes . length - 1 ; i >= 0 ; i -- ) {
669672 var math = nodes [ i ] . getElementsByTagName ( "math" ) [ 0 ]
670673 nodes [ i ] . parentNode . replaceChild ( math , nodes [ i ] ) ;
671- if ( data . speakText ) math . setAttribute ( "alttext" , speech . processExpression ( math . outerHTML ) ) ;
674+ var alttext = speech . processExpression ( math . outerHTML . replace ( / & n b s p ; / g, "\u00A0" ) ) ;
675+ if ( data . speakText ) math . setAttribute ( "alttext" , alttext ) ;
672676 }
673677 }
674678}
Original file line number Diff line number Diff line change @@ -210,6 +210,9 @@ function ConfigureMathJax() {
210210 MathJax . Hub . Register . MessageHook ( "TeX Jax - parse error" , function ( message ) {
211211 AddError ( "TeX parse error: " + message [ 1 ] ) ;
212212 } ) ;
213+ MathJax . Hub . Register . MessageHook ( "file load error" , function ( message ) {
214+ AddError ( "File load error: " + message [ 1 ] ) ;
215+ } ) ;
213216
214217 //
215218 // Set the delays to 0 (we don't need to update the screen)
@@ -433,6 +436,8 @@ function GetSpeech(result) {
433436 jax . root . alttext = result . speakText ;
434437 if ( jax . root . attrNames ) { jax . root . attrNames . push ( "alttext" ) }
435438 result . mml = jax . root . toMathML ( '' , jax ) ;
439+ } else {
440+ delete result . mml ;
436441 }
437442}
438443
@@ -613,7 +618,7 @@ function GetState(state) {
613618 state . defs = HTML . Element ( "defs" ) ;
614619 state . n = 0 ;
615620 }
616- TEX . resetEquationNumbers ( ) ;
621+ if ( TEX . resetEquationNumbers ) TEX . resetEquationNumbers ( ) ;
617622 MML . SUPER . ID = ID = 0 ;
618623 }
619624}
You can’t perform that action at this time.
0 commit comments