Skip to content

@shbernal/ts-pptx


@shbernal/ts-pptx / index / TextProps

Interface: TextProps

Defined in: src/types/text.ts:516

Properties

inline?

optional inline?: boolean

Defined in: src/types/text.ts:539

Emit this item's math equation inline — an <a14:m><m:oMath> run flowing mid-paragraph between the surrounding plain text runs — instead of as its own centered display-math paragraph. Has no effect unless math is set. Pair with the bare-<m:oMath> inline form of the equation: latexToOmml(tex, { display: false }) or mathmlToOmml(mathml).

Example

ts
addText([{ text: 'where ' }, { math: latexToOmml('x^2+1=y', { display: false }), inline: true }, { text: ' holds' }])

math?

optional math?: string

Defined in: src/types/text.ts:531

Raw OMML (Office MathML) for a native, editable PowerPoint equation. By default it is emitted as its own centered display-math paragraph (<a14:m><m:oMathPara><m:oMath>…) and text is ignored; set inline to instead flow it as an equation run mid-paragraph. Accepts either the inner OMML (children of <m:oMath>), a full <m:oMath>…</m:oMath>, or a full <m:oMathPara>…</m:oMathPara>; the m: prefix is resolved by the wrapper, so the markup does not need its own namespace declarations. This is the raw-OMML entry point. To author from LaTeX or MathML, convert with latexToOmml() / mathmlToOmml() from the @shbernal/ts-pptx/math subpath.

Examples

ts
{ math: '<m:r><m:t>x^2+1=y</m:t></m:r>' } // raw OMML
ts
import { latexToOmml } from '@shbernal/ts-pptx/math'; ({ math: latexToOmml('x^2+1=y') })

options?

optional options?: TextPropsOptions

Defined in: src/types/text.ts:518


text?

optional text?: string | number

Defined in: src/types/text.ts:517