Skribilo comes with an equation formatting package. This package
may be loaded by adding the following form at the top of your document:
It allows the inclusion of (complex) equations in your documents,
such as, for example, the following:
This chapter will describe the syntactic facilities available to
describe equations, as well as the rendering options.
To start with, let's have a look at a concrete example. Ex. 36: Example of a simple equation using the verbose syntax
In this example, the eq:
sub-markups are used pretty
much like any other kind of markup. However, the resulting syntax
is very verbose and hard to read.
Fortunately, the eq package allows for the use of a
much simpler syntax. Ex. 37: Example of a simple equation
Readers familiar with the Lisp family of programming languages
may have already recognized its prefix notation
. Note that,
unlike in the previous example, the equation itself if quoted
that is, preceded by the '
sign. Additionally, when referring
to a symbol (such as the Greek letter φ), you no longer
need to use the symbol
markup (see Section 3.15.3
It is possible to create equation display blocks,
where several equations are displayed and aligned according to a
particular operator. Ex. 38: Inlined, displayed, and aligned equations
This paragraph contains this equation: α / β. This is actually an inline equation, meaning that it
occurs within a paragraph. Typesetting has to be adjusted
This is an equation display block, within which equations can be
aligned with one another.
This equation can be simplified as follows:
The options available for the top-level
are summarized here:
'over] [:renderer] [:align-with] [:inline?
|:ident||html lout latex context info xml ||The node identifier.|
|:class||html lout latex context info xml ||The node class.|
|:inline?||lout ||If |
auto, Skribilo will
automatically determine whether the equation is to be "in-line".
Otherwise, it should be a boolean indicating whether the equation is to
appear "in-line", i.e., within a paragraph. If the engine supports it,
it may adjust various parameters such as in-equation spacing
|:number||lout ||If true, then a number is automatically
assigned to the equation and displayed. If it is a string, then that
string is used as the equation's number. If |
#f, then the
equation is left unnumbered. Note that this option is only taken into
account for displayed equations.
|:renderer||The engine that should be used to render
the equation. This allows, for instance, to use the Lout engine to
render equations in HTML.|
|:mul-style||lout ||A symbol denoting the default style for
multiplications. This should be one of |
|:div-style||lout ||A symbol denoting the default style for
divisions. This should be one of |
:div-style options override this setting.
|:align-with||lout ||Within a |
this should be a symbol specifying according to which operator equations
are to be aligned with one another.
Equation display blocks can be defined using
eq-display. Display blocks define the scope of the alignment among
equations as specified by the
:align-with options of