Wiris

Documentation / MathType

  • Demos
  • Visit our website
  • Downloads
  • Contact us
  • MathType

    • WirisQuizzes

      • Nubric

        • CalcMe

          • MathPlayer

            • Store FAQ

              • MathFlow

                • BF FAQ

                  • Miscellaneous

                    • Wiris Integrations

                      • Home
                      • MathType
                      • Technical documentation
                      • MathType for HTML editors
                      • Reference

                      Migrate MathType image formulas to MathML

                      Reading time: 1min

                      Following the steps in this article, you will learn to replace MathType image formulas with their equivalent MathML representation.

                      Prerequistes:

                      • Access to the HTML content containing MathType image formulas.
                      • Image formulas must contain the data-mathml attribute.

                      Step 1. Locate MathType image formulas

                      Find all image elements with the class:

                      Wirisformula
                      

                      Example:

                      <img class="Wirisformula" ... data-mathml="...">
                      

                      Step 2. Extract the MathML

                      Read the value stored in the data-mathml attribute.

                      The MathML is encoded using replacement characters.

                      Step 3. Decode the MathML

                      Apply the following replacements:

                      Replace With
                      « <
                      » >
                      § &
                      ¨ "
                      ` '

                      Step 4. Replace image formulas with MathML

                      Replace the original image element with the decoded MathML.

                      Example:

                      <mi>x</mi>
                      

                      instead of:

                      «mi»x«/mi»
                      

                      Verify the migration

                      • The formula is stored as MathML.
                      • The image element has been removed.
                      • The formula renders correctly using MathML mode.

                      Troubleshooting

                      Issue Possible cause
                      Invalid MathML after migration One or more replacement characters were not decoded.
                      Formula does not render WIRISplugins.js is not loaded.
                      No MathML available The image formula does not contain a data-mathml attribute.

                      Related resources:

                      • Full MathML mode
                      • Modified XML encoding for MathML
                      • WIRISplugins.js configuration

                      Was this article helpful?

                      Give feedback about this article

                      Related Articles

                      • Content MathML
                      • Modified XML encoding for MathML
                      • MathType Generic Integration: Overview

                      Migrate MathType image formulas to MathML

                      Step 1. Locate MathType image formulas Step 2. Extract the MathML Step 3. Decode the MathML Step 4. Replace image formulas with MathML Verify the migration Troubleshooting

                      Empowering STEM education

                      MathType

                      • Office Tools
                      • LMS
                      • XML
                      • HTML

                      WirisQuizzes

                      Nubric

                      Integrations

                      Solutions

                      • Education
                      • Publishing houses – platforms and interactive
                      • Publishing houses – Print and digital
                      • Technical writers

                      Pricing

                      Downloads

                      Blog

                      • Success stories

                      About us

                      • Careers
                      • Partnership

                      Contact Us

                      Contact Sales

                      European union (European Regional Development Fund) and 1EdTech (TrustEd Apps Certified)
                      • Cookie Policy
                      • Terms of Use
                      • Privacy Policy / GDPR
                      • Student Data Privacy
                      • Compliance
                      • Cookie Settings

                      © Wiris 2026

                      Expand