import { MathItem } from "mathjax-full/js/core/MathItem" ; import { RenderMath } from "mathjax-full/js/core/MathDocument" ; import { STATE } from 'mathjax-full/js/core/MathItem' ; function removeSemanticData ( math ) { math . root . walkTree ( node => { const attributes = node . attributes . getAllAttributes ( ) ; delete attributes . xmlns ; for ( const name of Object . keys ( attributes ) ) { if ( name . substr ( 0 , 14 ) === 'data-semantic-' && name !== 'data-semantic-speech' ) { delete attributes [ name ] ; } } } ) ; } const renderMath = ( math , doc ) => { const { start , end , bbox , math : latex } = math ; return ; } ; export const speechAction = { simplfy : [ STATE . TYPESET + 1 , ( doc ) => { console . log ( 'm1' ) ; for ( const math of doc . math ) { } } , renderMath ] } ;