• Resolved Yogesh

    (@yogeshbeniwal)


    Mathematical equations with Katex plugin is working fine on Non-AMP pages. However for AMP page its not getting rendered properly.

    As per https://amp.dev/documentation/components/amp-mathml/ for AMP pages, MathML has to be in container as displayed below. Is there a way that this plugin can display equations on both Non-AMP and AMP page simultaneously with same code in a block.

    <amp-mathml
    layout=”container”
    data-formula=”\[x = {-b \pm \sqrt{b^2-4ac} \over 2a}.\]”
    >
    </amp-mathml>

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Thomas Churchman

    (@beskhue)

    Thank you for the suggestion!

    I think something like this would best be achieved by creating a companion plugin to add AMP support, rather than building it into this plugin itself. AMP support would add unnecessary code for the most common use of this plugin. Further, an issue is that AMP appears to use MathJax (not KaTeX) to render MathML, and not all formulae that work in KaTeX play nicely with MathJax, and vice versa. Ideally the plugin would also interface with one of the AMP plugins to know when to render amp-mathml tags.

Viewing 1 replies (of 1 total)
  • The topic ‘Add support for AMP pages’ is closed to new replies.