Wiris

Documentation

  • Demos
  • Visit our website
  • Contact us
  • MathType

    • WirisQuizzes

      • LearningLemur

        • CalcMe

          • MathPlayer

            • Store FAQ

              • VPAT for the electronic documentation

                • MathFlow

                  • BF FAQ

                    • Miscellaneous

                      • Wiris Integrations

                        • Home
                        • MathPlayer
                        • MathML 3 elementary math examples
                        • MathML 3 elementary math examples

                        Addition, subtraction, and multiplication problems

                        Reading time: 1min

                        Here's a simple addition problem that spaces the "+" away from the operand by using the element none:

                        <mstack> <mn>496</mn> <msrow> <mo>+</mo> <none/> <mn>28</mn> </msrow> <msline/> </mstack>

                        Here's a more complicated subtraction problem that shows carries and borrows and crossouts:

                        <mstack> <mscarries location="nw"> <none/> <mscarry crossout="updiagonalstrike" location="n"> <mn>2</mn> </mscarry> <mn>1</mn> <none/> </mscarries> <mn>2,327</mn> <msrow> <mo>-</mo> <mn> 1,156</mn> </msrow> <msline/> <mn>1,171</mn> </mstack>

                        Notice that the carry/borrow default of "n" (north/above) is changed to the "nw" (northwest) position by mscarries, but that is overridden for the borrow and changed back to "n". The carry/borrow can be in any compass position. Several different styles for crossouts are possible.

                        Here's a multiplication problem that shows multiple rows of carries:

                        <mstack charspacing="loose"> <mscarries position="1"> <mn>1</mn> </mscarries> <mscarries position="1"> <mn>1</mn> <mn>3</mn> </mscarries> <mn>435</mn> <msrow> <mo>&#xD7;</mo> <none/> <mn>25</mn> </msrow> <msline/> <mscarries position="2"> <mn>1</mn> </mscarries> <mn>2185</mn> <msrow position="1"><mn>874</mn></msrow> <msline/> <mn>10925</mn> </mstack>

                        There are a few things to note about this example:

                        • We specified loose spacing between the characters on the mstack tag; absolute values such as "10px" can also be given.
                        • The carries are shifted over; we could also have used an msrow and none, but specifying a position is simpler.
                        • The '874' uses msrow to shift the number over one column, but a "0" could have been added and this would not have been needed; alternatively, msgroup with shift="1" could have been used, similar to what is done in the long division problem in our next example.

                        Was this article helpful?

                        Give feedback about this article

                        Related Articles

                        • Arithmetic
                        • The four basic operations
                        • Examples
                        • MathML makes elementary math accessible

                        Empowering STEM education

                        MathType

                        • Office Tools
                        • LMS
                        • XML
                        • HTML

                        WirisQuizzes

                        Learning Lemur

                        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