English 中文(简体)
MathML - Subscript-Superscript
  • 时间:2024-11-05

MathML - Subscript-Superscript


Previous Page Next Page  

<msubsup> tag is used to attach both subscript and superscript to an expression.

Syntax

Here is the simple syntax to use this tag −

<msubsup> base subscript superscript</msubsup>

Parameters

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

    base − base expression on which the subscript and superscript is to be drawn.

    subscript − subscript.

    superscript − superscript.

Attributes

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

    subscriptshift − To specify the minimum space to shift the subscript below the basepne of the expression.

    superscriptshift − To specify the minimum space to shift the superscript above the basepne of the expression.

Example

Let s draw a subscript and superscript.

<math xmlns = "http://www.w3.org/1998/Math/MathML">
   <mrow>
      <msubsup>
         <mo> ∫</mo>
         <mn> 0 </mn>
         <mn> 1 </mn>
      </msubsup>
      
      <mrow>
         <msup>
            <mi> e</mi>
            <mi> x </mi>
         </msup>
         <mo> ⁢</mo>
         
         <mrow>
            <mi> d</mi>
            <mi> x </mi>
         </mrow>
      </mrow>
   </mrow>
</math> 

Output

0 1 e x d x Advertisements