Skip to content

when the option of new CHTML adaptiveCSS set false,the project throws an error.Base on mathjax-full@4.0.0-beta.7 #3356

@madeline799

Description

@madeline799

const { mathjax } = require('mathjax-full/cjs/mathjax.js');
const { MathML } = require('mathjax-full/cjs/input/mathml.js');
const { CHTML } = require('mathjax-full/cjs/output/chtml.js');
const { liteAdaptor } = require('mathjax-full/cjs/adaptors/liteAdaptor.js');
const { RegisterHTMLHandler } = require('mathjax-full/cjs/handlers/html.js');
const { AssistiveMmlHandler } = require('mathjax-full/js/a11y/assistive-mml.js');

const chtml = new CHTML({
adaptiveCSS:false,
})
const html = mathjax.document('', {
InputJax: mml,
OutputJax: chtml,
});

  const node = html.convert(mathml, {
        display: true,
        em: 16, 
        ex: 8,  
        containerWidth: 80 * 16, 
        scale: 1, 
    });
    const chtmlString = adaptor.outerHTML(node);

//The line will throws an error
const styleSheet = adaptor.textContent(chtml.styleSheet(html))

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions