9.4.5 Fractions
Fractions are created using the command
The amsmath package also provides the command
which is designed for continued fractions. The optional argument pos can be used for left (l) or right (r) placement of any of the numerators. (The default is centred.)
Example:
A simple fraction:
Produces:
which produces:
Example (Nested):
Example (Continued Fraction);
A continued fraction (example taken from amsmath
documentation and uses \sqrt
, described in §9.4.6. Roots,
and \dotsb
, described in
§9.4.7. Mathematical Symbols):
Example (A Derivative):
The above example is rather cumbersome, particularly if you have a lot of derivatives, so it might be easier to define a new command. In the preamble define:
Then in the document:
Example (Partial Derivative):
Partial derivatives can be obtained similarly
using the command \partial
to display the partial
derivative symbol. As in the previous example, first define a new
command to format a partial derivative in the
preamble:
Then in the document:
Example (Double Partial Derivative):
Example (First principles):
This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-00-5).