eLyXer Math Showcase
Alex Fernández (elyxer@gmail.com)
1 Introduction
This document is intended as a showcase of the mathematical abilities of eLyXer; for more information be sure to visit the
main page.
1.1 Versions
There are several versions of this page:
All of them are generated from the same .lyx source file; they should help you decide which rendering options suit you best.
Also available online is the eLyXer translation of the latest
LyX’s detailed Math manual, which contains a lot more examples of LyX maths.
2 Typography
Math formulae use a lot of different symbols and fonts.
2.1 Greek Symbols
Greek symbols are very important in equations:

,

,

. eLyXer offers a complete set in both upper case:

and lower case:

. Also the AMS italicized upper case:

.
2.2 Math Symbols
2.3 Other Symbols
There are other symbols like arrows:

, or geometrical shapes:

,

. eLyXer offers limited support for them. You might also want to use financial symbols in formulae:

.
2.4 Spacing
The command
\raisebox is useful to, surprisingly, raise a little box,
Like
\mbox, it puts its content in a text box. It can also be used just for spacing:

.
There are other spacing commands:
\hspace:

, protected space:

, and (at “block level”)
\vspace:

.
There should be 1 cm of vertical space above this paragraph.
By default, letters denote variables and are taken from the
\mathnormal font, which is italic,

, with the exception of upright capital Greek letters,

.
Function names should be upright:

.
Mathematical fonts used in equations include

(
\mathrm),

(
\mathsf),

(
\mathtt),

(
\mathbf),

(
\mathscr),

(
\mathcal),

(
\mathbb), and

(
\mathfrak). For the latter, some single characters are translated to their Unicode equivalents:

,

,

.
Regular text in a formula can be achieved via text font commands like
\textrm:

, via boxes like \mbox (prevents line breaks):

, or the AMSmath
\text macro (scales like math symbols)

. The content of an mbox is processed in LaTeX text mode. This allows text font commands, e.g. a switch to
sans-serif-bold-italic, or the phonetic alphabet:

.
Units should be written upright, either with
\mathrm or with macros from the
units package, e.g. as simple unit,

, with magnitude,
![\unit[57]{km}](http://chart.googleapis.com/chart?cht=tx&chl=%5Cunit%5B57%5D%7Bkm%7D)
, with fractional unit,
![\unitfrac[200]{km}{h}](http://chart.googleapis.com/chart?cht=tx&chl=%5Cunitfrac%5B200%5D%7Bkm%7D%7Bh%7D)
, or with a fraction before the units,
![\unit[\nicefrac{3}{2}]{km}](http://chart.googleapis.com/chart?cht=tx&chl=%5Cunit%5B%5Cnicefrac%7B3%7D%7B2%7D%5D%7Bkm%7D)
,
![\unit[\frac{7}{16}]{s}](http://chart.googleapis.com/chart?cht=tx&chl=%5Cunit%5B%5Cfrac%7B7%7D%7B16%7D%5D%7Bs%7D)
.
3 Numeration
Equations can be numbered, like (
↓)
And also like
(↓).
Some equations can be numbered even if they don’t have a label.
Notice that equation (
↓) comes after (
↓).
4 Simple Structures
Let’s now see a few of the simpler structures that eLyXer can output.
4.1 Fractions
A simple fraction:
Inlined:
A big recursive fraction:
A nice fraction:

. A non-diminishing fraction containing alignments:
A similar concept is a binomial coefficient:

It can be prettily presented:
A symbol can be stacked over another using
\stackrel:

. Anything can be stacked:
4.2 Limits

should appear as

in italics, and «lim» in plain style. In display mode, a limit must appear below the main symbol:
Limits are also used in sums and integrals:
where the sum’s limits should appear below (

) and above (

) the

. The placement of the integral limits depends on the document class: LaTeX standard classes place them right to the

. Limits are shown to the right in inline formulae:

and
The placing of limits can be configured with the
\limits and
\nolimits macros:
A square root:

A more complex root in a fraction:
eLyXer can also do higher-order roots:
![\sqrt[3]{x+y}](http://chart.googleapis.com/chart?cht=tx&chl=%5Csqrt%5B3%5D%7Bx%2By%7D)
. A devilish case mixing everything we have seen so far:
5 Complex Structures
In this section we will explore arrays and related constructs.
5.1 Arrays
An inline array
![\left[\begin{array}{cc}
a & b\\
c & d\end{array}\right]](http://chart.googleapis.com/chart?cht=tx&chl=%5Cleft%5B%5Cbegin%7Barray%7D%7Bcc%7D%0Aa+%26+b%5C%5C%0Ac+%26+d%5Cend%7Barray%7D%5Cright%5D)
is always shown in the same line. In display mode, the array is shown on its own line:
Apart from that the appearance should be the same.
5.2 Brackets
Used to switch between several values.
Cases may have more than two rows:
5.4 Braces
Values can be underbraced or overbraced.

.
6 Macros
Now it’s time for user-defined commands (sometimes called “macros”).
Definitions can be added as macros. Then they can be used in formulae:

. They can accept default parameters. Again, useful in formulae:

.
Other definitions from the preamble can be used:

.
Definitions on the fly are also possible:
![\newcommand{\ontheflyroot}[2]{\sqrt[#1]{#2}}\ontheflyroot{7}{8}](http://chart.googleapis.com/chart?cht=tx&chl=%5Cnewcommand%7B%5Contheflyroot%7D%5B2%5D%7B%5Csqrt%5B%231%5D%7B%232%7D%7D%5Contheflyroot%7B7%7D%7B8%7D)
, and used with different values:

.