Skip to content

word equation add

goworm edited this page Jul 2, 2026 · 52 revisions

Word: Equation - add

Add a mathematical equation using LaTeX-like syntax, displayed as block or inline.

Parent: /body (display) or /body/p[N] (inline)

Properties

Property Default Description
formula / latex / math (required) LaTeX-like formula. All three names are accepted interchangeably (mirrors what most agents type).
mode display display or inline

Supported LaTeX Commands

Basic: \frac, \sqrt, \sum, \prod, \int, \lim, superscript ^, subscript _, \text{}, \mathbf, \mathit

Environments: \begin{matrix}, \begin{pmatrix}, \begin{bmatrix}, \begin{Bmatrix}, \begin{vmatrix}, \begin{Vmatrix} (double-bar matrix), \begin{smallmatrix}, \begin{cases}, \begin{align}, \begin{aligned} (multi-alignment points supported), \begin{gathered}, \begin{split}, \begin{eqnarray}, \begin{array} (with colspec), \substack{}

Decorations: \boxed{}, \underbrace{}_{}, \overbrace{}^{}, \cancel{}, \bcancel{}, \xcancel{}, \color{name}{}, \textcolor{}{}, wide accents (\widehat, \widetilde, \overrightarrow, \overleftarrow, …)

Operators: \arcsin, \arccos, \arctan, \arccot, \arcsec, \arccsc, \operatorname{}, \pmod{}, \bmod, \cfrac

Delimiters: \left(, \right), \left[, \right], \left\{, \right\}, \langle/\rangle, \lceil/\rceil, \lfloor/\rfloor, \lvert/\rvert, \lVert/\rVert

Logic / relations: \iff, \mid, \land, \lor, \|, and related long-tail commands

Symbols: \alpha-\omega, \infty, \partial, \nabla, \emptyset, \setminus, \complement, \cap, \cup, \,, \;, \! (spacing), Fraktur (\mathfrak{}) and script (\mathscr{}, \mathcal{}) font families

Warnings: unrecognized LaTeX commands now surface as build warnings instead of silently falling through as literal text.

Examples

# Display equation
officecli add report.docx /body --type equation --prop "formula=E = mc^2"

# Inline equation in a paragraph
officecli add report.docx /body/p[1] --type equation --prop "formula=\\frac{a}{b}" --prop mode=inline

# Boxed equation
officecli add report.docx /body --type equation --prop "formula=\\boxed{x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}}"

# Aligned multi-line equations
officecli add report.docx /body --type equation --prop "formula=\\begin{align} x &= 2 \\\\ y &= 3 \\end{align}"

# Colored equation
officecli add report.docx /body --type equation --prop "formula=\\color{red}{E} = \\color{blue}{mc^2}"

Based on OfficeCLI v1.0.127

Clone this wiki locally