XML API - pdx:addMathEquation
- addBackgroundImage
- addFooter
- addHeader
- addLineNumbering
- addMacroFromDoc
- addPageBorders
- addProperties
- addSection
- createCharacterStyle
- createListStyle
- createParagraphStyle
- docxSettings
- importHeadersAndFooters
- importListStyle
- importStyles
- modifyPageLayout
- parseStyles
- removeFooters
- removeHeaders
- setBackgroundColor
- setDefaultFont
- setDocumentDefaultStyles
- setEncodeUTF8
- setLanguage
- setMarkAsFinal
- addBookmark
- addBreak
- addChart
- addComment
- addCrossReference
- addDateAndHour
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addOnlineVideo
- addPageNumber
- addShape
- addSimpleField
- addStructuredDocumentTag
- addTable
- addTableContents
- addTableFigures
- addText
- addTextBox
- addWordML
- embedHTML
- clearBlocks
- deleteBlock
- modifyInputFields
- processTemplate
- rawSearchAndReplace
- removeTemplateVariable
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHtml
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- setTemplateBlockSymbol
pdx:addMathEquation
Inserts a math equation in OMML or MathML format.
Note
You are reading the XML API documentation. For the PHP API method please go to addMathEquation.
Description
Element definition
6
1
<pdx:content>
2
<pdx:addMathEquation pdx:type="docx|omml|mathml" pdx:wordFragmentName="" pdx:align="left|center|right" pdx:color="" pdx:bold="" pdx:fontSize="" pdx:italic="" pdx:underline="">
3
<pdx:data pdx:dataId="" pdx:dataType="text">path to docx|<![CDATA[OMML code]]>|<![CDATA[MML code]]></pdx:data>
4
</pdx:addMathEquation>
5
</pdx:content>
6
Adds a math equation to the DOCX.
Attributes and sub-elements
equation
The OMML equation code.
type
The equation type: docx, omml or mathml.
align
left, center, right
bold
color
ffffff, ff0000...
fontSize
8, 9, 10...
italic
underline
single...
Code samples
config.xml
content.xml
14
1
2
<pdx:document xmlns:pdx="http://www.phpdocx.com/main">
3
<pdx:content>
4
<pdx:addText>
5
<pdx:textRun>
6
<pdx:data pdx:dataId="" pdx:dataType="text">Extract a math equation from an external Word file:</pdx:data>
7
</pdx:textRun>
8
</pdx:addText>
9
<pdx:addMathEquation pdx:type="docx">
10
<pdx:data pdx:dataId="" pdx:dataType="text">/var/www/phpdocx/samples/files/math.docx</pdx:data>
11
</pdx:addMathEquation>
12
</pdx:content>
13
</pdx:document>
14
settings.xml
PHP code