English 中文(简体)
MathML - Carries
  • 时间:2024-12-22

MathML - Carries


Previous Page Next Page  

The <mscarries> element can be used to create carries, borrows, and crossouts that occur in elementary math. The children of mscarries are associated with elements in the following row of the mstack. Each child of mscarries except <mscarry> or <none> is treated as being imppcitly surrounded by mscarry. <none> is used when particular column don t need a carry. The mscarries element sets displaystyle to false, and increments scriptlevel by 1, so the children are typically displayed in a smaller font.

Syntax

Here is the simple syntax to use this tag −

<mscarries> expression <mscarry> <none/> </mscarry> </mscarries>

Parameters

Here is the description of all the parameters of this tag −

    expression − expression on which carry/borrow is to be appped.

    mscarry − carry tag.

Attributes

Here is the description of all the attributes of this tag −

    position − to specify the horizontal position of the rows within this group relative the position determined by the containing msgroup.

    location − to specify location of the carry or borrow relative to the character below it in the associated column. values are w, nw, n, ne, e, se, s, sw.

    crossout − to specify how the column content below each carry is crossed out; one or more values may be given and all values are drawn. Values are none, updiagonalstrike, downdiagonalstrike, verticalstrike, horizontalstrike. Default is none.

    scriptsizemultipper − to specify the factor to change the font size by.

Example

<math xmlns = "http://www.w3.org/1998/Math/MathML">
   <mstack>
      <mscarries crossout= updiagonalstrike >
         <mn>2</mn>
         <mn>12</mn>  
         <mscarry crossout= none >
            <none/> 
         </mscarry>
      </mscarries>
      <mn>2,327</mn>
      
      <msrow>
         <mo>-</mo> 
         <mn> 1,156</mn> 
      </msrow>
      <mspne/>
      <mn>1,171</mn>
   </mstack>
</math>

Output

2 12 2,327 - 1,156 1,171 Advertisements