## Usage To attach a superscript to an expression, use the `PhpOffice\Math\Element\Superscript` class. ### Methods #### getBase The method has no parameter. #### getSuperscript The method has no parameter. #### setBase The method has one parameter : * `PhpOffice\Math\Element\AbstractElement` **$element** #### setSuperscript The method has one parameter : * `PhpOffice\Math\Element\AbstractElement` **$element** ## Example ### Math X 2 ### XML ``` xml X 2 ``` ### PHP ``` php setBase(new Element\Identifier('X')); $superscript->setSuperscript(new Element\Numeric(2)); $math->add($superscript); ```