Math Test
1 Limit
A limit:
limx → ∞f(x),
which should appear as
x → ∞ in italics, and «lim» in plain style. Inlined:
limx → ∞f(x).
And why not, a sum:
∞⎲⎳i = 1ai,
where the sum’s limits should appear below (
i = 1) and above (
∞) the
∑ but to the right. Inlined:
∑∞i = 1ai. Integral:
∫∞x = ax dx. Display mode:
∞⌠⌡x = ax dx.
We can also integrate without limits: ∫A dx.
A sum inside another element (red color):
When any element has both super- and subscript, they should appear like inlined limits, one above the other: a34. Also before an element: 32 He. In display mode:
⎲⎳i, jaij + ⎲⎳i, jaji = ⎲⎳iaii,
21 H + 21 H → 32 He + 10 n.
2 Numeration
Equations can be numbered, like
1↓.
Notice that eq.
2↑ comes after eq.
1↑.
Some equations can also be numbered, even if they don’t have a label.
Other equations that contain * should not numbered, but perhaps aligned:
Some environments allow for multiple labels:
Now a random environment:
x
y.
3 Parentheses
Some delimiters also taken from the Spanish Lyx User’s Guide. An array:
⎡
12
2
⎤
⎢
⎥
⎣
3
4 × yx
⎦
And an inline array
⎡
a
b
⎤
⎢
⎥
⎣
c
dio
⎦
.
There are also big brackets: (a) [b] {c} ⟨d⟩ |e| ⟨f⟩.
Aligned brackets can be present: (toText). One of them may be omitted: toText).
4 Fraction
A big recursive fraction:
(1)/((1 + ((1)/(1 + ((1)/(1 + 2x))))))
A nice fraction: 5⁄6.
A non-diminishing fraction containing alignments:
(1)/(1 + ((1)/(1 + x) × (1)/(1 + x))).
A similar concept is a binomial coefficient:
(A + 1B). It can be prettily presented:
⎛
A
⎞
⎜
⎟
⎝
B + 1
⎠
.
A symbol can be stacked over another using \stackrel: xR → y. Anything can be stacked: headheels.
5 Roots
A square root: √(3). A root in a fraction: √(((78x + 45y) × √(Height))/(sin(x + 1)) + 5).
A more complex square root in a fraction:
(1)/((1 + √(2)((1)/(1 + √(2))) + √((1)/(2)))).
Higher order roots:
3√(x + y),
x + 1√(Weight). In a fraction:
(7⁄8√((8)/(4)x))/(s + 5√(((78x + 45y) × √(Height))/(sin(x + 1)) + 5)).
6 Decorations
Used to switch several values.
y =
⎧
x
i = 0,
⎨
⎩
x + 1
i < 3
Cases may have more than two rows:
f(x) =
⎧
0
x < 0,
⎪
⎨
∞
x = 0
⎪
⎩
0
x > 0
6.2 Braces
Values can be underbraced or overbraced.
a − b = c + d + e + f.
Underbraces and overbraces can contain text.
a − bover = c + d + eover + funder + g.
They can also be inlined:
a + bover.
7 Spacing
The command \raisebox is useful to, surprisingly, raise a little box.
raisedoverloweredand back.
It can also be used just for spacing.
BV.
There are other spacing commands, like \hspace: " ", and \vspace: " ". Protected space can be used: a b.
8 Fonts
Fonts can be switched on and off.
By default, text in formulae is shown italicized. Variable: meters.
Some font styles. Roman: 1 mathrm. Sans serif: 2 mathsf. Typewriter: 3 mathtt. Bold: 4 mathbf.
Regular text. Normal text: 5 textfm. Literal text: 6 mbox text. Phonetic alphabet: 7 abcde. Regular text can be embedded into formulae: regular text \command \another command \\no spaces allowed.
Units can be shown with or without a magnitude. Without: km. With: 57 km. Fractional units: 20 km⁄h. With a fraction before the units: 3⁄2 km, (7)/(16) s.
Some special fonts are supported: ℱ, F, 𝔽, 𝔉.
There has been some trouble over some commands like Greek letters; some of them should be italicized, as in:
μ or
Å. Others should not, as in
Ω. Upright Greek letters are also available:
μ ≠ μ. An example from the LyX math guide:
π + → μ + + νμ.
9 Colors and Boxes
A colored box: aaa.
A framed box: box. It can be aligned left: box or right: box.
10 Macros
Definitions can be added as macros. Then they can be used in formulae: √(12) + 1√(2).
Macro definitions can accept default parameters. Again, useful in formulae: 4√(5). Default parameters can then be overriden: 5√(y) + x√(4).
Other definitions from the preamble can be used: 3√(4).
Definitions on the fly are also possible: 7√(8), and used with different values: a√(b).
Macros may contain a literal parameter. It should parse correctly: t.
A macro with four parameters from the LyX detailed math guide. Now in use: 1 + x1, 2 = − ((1 − x))/(2)±√(((1 − x)2)/(4) − 5) − B.
11 Pathological Cases
Empty equations have been known to fail: .
An equation with an mbox containing a comment: text more, and a comment inside textrm: text more. Finally, a comment at the end of a text function: only text.
12 Bye-bye
That’s all folks!