# LibreOffice math reference

This page contains a copy of the commands for the LibreOffice/OpenOffice formula editor, aka math editor. It's helpful to have all this stuff on one page, but LibreOffice's wiki is not editable, and the maintainers are not responsive. Hence a copy here...

## Unary / binary operators

Operation Command Display
Positive (plus) +1 +1
Negative (minus) -1 −1
Plus/minus +-1 $\pm 1$
Minus/plus -+1 $\mp 1$
Boolean 'not' neg a ¬a
Dot product a cdot b a·b
Cross product a times b a×b
Multiplication (asterisk) a * b a * b
Boolean 'and' a and b ab
Subtraction a - b a−b
Division (as a fraction) a over b $\frac{a}{b}$
Division (as an operator)   a div b a÷b
Division (with a slash) a / b a/b
Boolean 'or' a or b $a \or b$
Concatenation a circ b $a \circ b$

## Relational operators

Operation Command Display
Is equal a = b a=b
Is not equal a <> b a≠b
Approximately a approx 2 a≈b
Divides a divides b $a \mid b$
Does not divide a ndivides b $a \! \nmid \! b$
Less than a < 2 a<2
Greater than a > 2 a>2
Similar to or equal a simeq b $a\! \simeq\! b$
Parallel a parallel b $a \!\parallel\! b$
Orthogonal to a ortho b $a \!\perp\! b$
Less than or equal to a leslant b $a \!\leqslant\! b$
Greater than or equal to a geslant b $a \!\geqslant\! b$
Similar to a sim b $a\!\sim\! b\,\!$
Congruent a equiv b a≡b
Less than or equal to a <= b a≤b
Greater than or equal to a >= b a≥b
Proportional a prop b $a\! \propto\! b$
Toward a toward b a→b
Arrow left a dlarrow b a⇐b
Double arrow left and right   a dlrarrow b a⇔b
Arrow right a drarrow b a⇒b

## Set operations

Operation Command Display
Is in a in B a∈B
Is not in a notin B a∉B
Owns A owns b $A\!\ni\! b$
Empty set emptyset $\emptyset$
Intersection A intersection B A∩B
Union A union B A∪B
Difference A setminus B $A\!\setminus\! B$
Quotient A slash B $A\!/\! B$
Aleph aleph
Subset A subset B A⊂B
Subset or equal to A subseteq B A⊆B
Superset A supset B A⊃B
Superset or equal to A supseteq B A⊇B
Not subset A nsubset B A / B
Not subset or equal A nsubseteq B A / B
Not superset A nsupset B A / B
Not superset or equal A nsupseteq B A / B
Set of natural numbers setN $\mathbb{N}$
Set of integers setZ $\mathbb{Z}$
Set of rational numbers setQ $\mathbb{Q}$
Set of real numbers setR $\mathbb{R}$
Set of complex numbers setC $\mathbb{C}$

## Functions

Operation Command Display
Exponential func e^{a} $\operatorname{e}^a$
Natural logarithm ln(a) $\ln(a)$
Exponential function exp(a) $\exp(a)$
Logarithm log(a) $\log(a)$
Power a^{b} $a^b\,\!$
Sine sin(a) $\sin(a)$
Cosine cos(a) $\cos(a)$
Tangent tan(a) $\tan(a)$
Cotangent cot(a) $\cot(a)$
Square root sqrt{a} $\sqrt{a}$
Arcsine arcsin(a) $\arcsin(a)$
Arccosine arccos(a) $\arccos(a)$
Arctangent arctan(a) $\arctan(a)$
Arc cotangent arccot(a) $\arccot(a)$
nth root nroot{a}{b} $\sqrt[a]{b}$
Hyperbolic sine sinh(a) $\sinh(a)$
Hyperbolic cosine cosh(a) $\cosh(a)$
Hyperbolic tangent tanh(a) $\tanh(a)$
Hyperbolic cotangent coth(a) $\coth(a)$
Absolute value abs{a} $|\,a\,|$
Arc hyperbolic sine arsinh(a) $\operatorname{arsinh}(a)$
Arc hyperbolic cosine arcosh(a) $\operatorname{arcosh}(a)$
Arc hyperbolic tangent artanh(a) $\operatorname{artanh}(a)$
Arc hyperbolic cotangent arcoth(a) $\operatorname{arcoth}(a)$
Factorial fact{a} $a!\!\,$

## Operators

All operators can be used with the limit functions (“from" and “to").

Operation Command Display
Limit lim{a} $\lim{a}$
Sum sum{a} $\sum{a}$
Product prod{a} $\prod{a}$
Coproduct coprod{a} $\coprod{a}$
Upper and lower bounds shown with integral int from {r_0} to {r_t} a $\int\limits_{r_0}^{r_t}{a}$
Integral int{a} $\int{a}$
Double integral iint{a} $\iint{a}$
Triple integral iiint{a} $\iiint{a}$
Lower bound shown with summation symbol sum from{3}b $\sum_3{b}\,\!$
Contour integral lint a $\oint{a}$
Double curved integral llint a File:Math l2inta.png
Triple curved integral lllint a File:Math l3inta.png
Product with range prod from {i=1} to {n} {(i+1)} $\prod_{i=1}^{n}{(i+1)}$

## Attributes

Operation Command Display
Acute accent acute a á
Grave accent grave a à
Reverse circumflex check a $\check{a}$
Breve breve a $\breve{a}$
Circle circle a å
Vector arrow vec a $\vec{a}$
Tilde tilde a ã
Circumflex hat a â
Line above bar a $\bar{a}$
Dot dot a $\dot{a}$
Wide vector arrow widevec abc $\overrightarrow{a b c}$
Wide tilde widetilde abc x28px
Wide circumflex widehat abc $\widehat{abc}$
Double dot ddot a $\ddot{a}$
Line over overline abc $\overline{abc}$
Line under underline abc $\underline{abc}$
Line through overstrike abc abc
Triple dot dddot a File:Math 3dota.png
Transparent (useful to get a placeholder of a given size) phantom a
Bold font bold a $\bold{a}$
Italic font (see Note 1) ital a $\mathit{a}$
Roman (non-italic) font nitalic a OR "a" $\mathrm{a}$
Resize font size 16 qv qv
Following item in sans serif font (see Note 2) font sans qv qv
Following item in serif font font serif qv $\mathrm{q}\mathrm{v}$
Following item in fixed font font fixed qv qv
Make color of following text cyan (see Note 3) color cyan qv $\color{Cyan}qv$
Make color of following text yellow color yellow qv $\color{Yellow}qv$
Make color of following text white color white qv $\color{White}qv$
Make color of following text green color green qv $\color{Green}qv$
Make color of following text blue color blue qv $\color{Blue}qv$
Make color of following text red color red qv $\color{Red}qv$
Make color green returns to default color black color green X qv ${\color{Green}{X}} \ qv$
Brace items to change color of more than one item color green {X qv} $\color{Green}{X\ qv}$

Note 1: Unquoted text that is not a command is considered to be a variable. Variables are, by default, italicized.

Note 2: There are three custom fonts: serif (with serifs), sans (sans serif, meaning without serifs), and fixed (monospaced). To change the actual fonts used for custom fonts and the fonts used for variables (unquoted text), numbers and functions, use Format > Fonts.

Note 3: For all coloring, the color will apply only to the text immediately following the command until the next space is encountered. In order to have the color apply to more characters, place the text you want in color in curly brackets.

## Miscellaneous

Operation Command Display
Infinity infinity $\infin$
Partial partial $\partial$
Nabla nabla $\nabla$
There exists exists $\exists$
For all forall $\forall$
H bar hbar $\hbar$
Lambda bar lambdabar File:Math lambdabar.png
Real part re $\Re$
Imaginary part im $\Im$
Weierstrass p wp $\wp$
Left arrow leftarrow $\leftarrow$
Right arrow rightarrow $\rightarrow$
Up arrow uparrow $\uparrow$
Down arrow downarrow $\downarrow$
Dots at bottom dotslow $\ldots$
Dots at middle dotsaxis $\cdots$
Dots vertical dotsvert $\vdots$
Dots diagonal upward dotsup File:Math dotsup.png
Dots diagonal downward dotsdown $\ddots$

## Brackets

Operation Command Display
Round Brackets (a) $(a)$
Square Brackets [b] $[b]$
Double Square Brackets ldbracket c rdbracket $[\![ c ]\!]$
Single line lline a rline OR abs a $\vert a \vert$
Double line ldline a rdline $\Vert a \Vert$
Braces lbrace w rbrace $\{w\}$
Braces left lbrace stack{0, n <> 0 # 1, n = 1} right none File:Lbrace.png
Angle Brackets langle d rangle $\langle d \rangle$
Operator Brackets langle a mline b rangle $\langle a|b \rangle$
Group brackets (used for program control) {a} $a$
Scalable round brackets (add the word "left" before a left bracket and "right" before a right bracket) left ( stack{a # b # z} right ) $\begin{pmatrix} a \\ b \\ z \end{pmatrix}$
Square brackets scalable
(as above)
left [ stack{ x # y} right ] $\begin{bmatrix} x \\ y \end{bmatrix}$
Double square brackets scalable left ldbracket c right rdbracket $[ \! [ c ] \! ]$
Line scalable left lline a right rline $\vert a \vert$
Double line scalable left ldline d right rdline $\Vert a \Vert$
Brace scalable left lbrace e right rbrace $\{ a \}$
Angle bracket scalable left langle f right rangle $\langle f \rangle$
Operator brackets scalable left langle g mline h right rangle $\langle g|h \rangle$
Over brace scalable {The brace is above} overbrace a $\overbrace{}^{a}$
Under brace scalable {the brace is below}underbrace {f} $\underbrace{}_{f}$
Floor Brackets lfloor a rfloor $\lfloor a \rfloor$
Ceil Brackets lceil a rceil $\lceil a \rceil$

## Formats

Operation Command Display
Left superscript a lsup{b} ${}^b\!a$
Center superscript a csup{b} $\overset{b}{a}$
Right superscript a^{b} $a^b\,\!$
Left subscript a lsub{b} ${}_b a \,\!$
Center subscript a csub{b} $\underset{b}{a}$
Right subscript a_{b} $a_b\,\!$
Align character to left (text is aligned center by default) stack { Hello world # alignl (a) }
 Hello world(a)
Align character to center stack{Hello world # alignc(a)}
 Hello world(a)
Align character to right stack { Hello world # alignr(a)}
 Hello world(a)
Vertical stack of 2 binom{a}{b} $\begin{matrix} a \\ b \end{matrix}$
Vertical stack, more than 2 stack{a # b # z} $\begin{matrix}a \\ b \\ z \end{matrix}$
Matrix matrix{
a # b ##
c # d
}
$\begin{matrix}a & b \\ c & d \end{matrix}$
Equations aligned at '=' (using 'matrix') matrix{
a # "=" # alignl{b} ##
{} # "=" # alignl{c+1}
}
\begin{align}a & = b \\ {} & = c+1 \end{align}
Equations aligned at '=' (using 'phantom') stack{
alignl{a} = b #
alignl{phantom{a} = c+1}
}
\begin{align}a & = b \\ {} & = c+1 \end{align}
New line asldkfjo newline sadkfj asldkfjo
Small gap (grave) stuff `stuff ${stu\!f\!\!f} ~ {stu\!f\!\!f}$
Large gap (tilde) stuff~stuff ${stu\!f\!\!f} \quad {stu\!f\!\!f}$

## Characters – Greek

Warning: according to the OpenOffice documentation, these names for the greek letters are localised depending on your user interface language. So you can consult the symbol 'catalog' in the formula editor, in order to see what the names are on your system. Also note that around 2010, LibreOffice changed the greek letters to their non-italic, and we now need to use '%irho', '%itheta' etc to access the italicised Greek letters on most systems. This can be modified by changing the symbol catalog, but that's tedious.

Warning: the default symbol font on Ubuntu 12.04 and 14.04 is bad. You should modified the symbol font to Liberation Serif, if you want greek letters to appear properly.

Code Display Code Display Code Display Code Display Code Display
%ALPHA Α %BETA Β %GAMMA Γ %DELTA Δ %EPSILON Ε
%ZETA Ζ %ETA Η %THETA Θ %IOTA Ι %KAPPA Κ
%LAMBDA Λ %MU Μ %NU Ν %XI Ξ %OMICRON Ο
%PI Π %RHO Ρ %SIGMA Σ %TAU Τ %UPSILON Υ
%PHI Φ %CHI Χ %PSI Ψ %OMEGA Ω
%alpha α %beta β %gamma γ %delta δ %epsilon ε
%varepsilon $\varepsilon$ %zeta ζ %eta η %theta θ %vartheta $\vartheta$
%iota ι %kappa κ %lambda λ %mu μ %nu ν
%xi ξ %omicron ο %pi π %varpi $\varpi$ %rho ρ
%varrho $\varrho$ %sigma σ %varsigma $\varsigma$ %tau τ %upsilon υ
%phi φ %varphi $\varphi$ %chi χ %psi ψ %omega ω

## Characters – Special

 %and $\and$ %angle $\angle$ %element $\in$ %identical $\equiv\,\!$ %infinite $\infin\,\!$ %noelement $\notin$ %notequal $\ne\,\!$ %or $\or$ %perthousand ‰ %strictlygreaterthan $\gg$ %strictlylessthan $\ll$ %tendto $\to\,\!$