Latex (typesetting)

From sciforums_encyclopedia
Jump to: navigation, search

Introduction

LaTeX is a computer typesetting system initially written by Leslie Lamport. Its purpose is to produce professional-quality books, articles and other written material.

For the purposes of Sciforums, LaTeX is used to typeset equations for inclusion in both forum posts and the Sciforums encyclopedia.

A brief introduction to the mathematical typesetting capabilities of LaTeX follows.

Mathematical typesetting with LaTeX

Grouping

Grouping, where necessary, is done by enclosing expressions in curly brackets: {}

Superscripts and subscripts

a^2 gives a superscript: <math>a^2</math>

a_2 gives a subscript: <math>a_2</math>

a^b_c does both: <math>a^b_c</math>

Sometimes, grouping is necessary, as in a^{b+c}: <math>a^{b+c}</math>

which is different from a^b+c: <math>a^b+c</math>

Functions

LaTeX functions are indicated by a backslash followed by the function name.

For example \sin x, \int 2x dx, \pi gives: <math>\sin x, \qquad \int 2x~dx,\qquad \pi</math>

Greek letters

Greek letters are produced with a backslash and the letter name. Capitals are produced by capitalising the first letter of the function name.

\alpha, \beta, \gamma, \phi, \Gamma, \Phi gives <math>\alpha, \beta, \gamma, \phi, \Gamma, \Phi</math>

Fractions

Fractions use the \frac function, with the numerator and denominator enclosed in curly brackets: \frac{mc^2}{a + b + c^3} gives:

<math>\frac{mc^2}{a + b + c^3}</math>

Sums and Integrals

Sums and integrals can be produced as follows:

\int \limits_a^b 4x^2~dx gives <math>\int \limits_a^b 4x^2~dx</math>

\sum \limits_{n=1}^4 n = 10 gives <math>\sum \limits_{n=1}^4 n = 10</math>

Note that a space is inserted in the integral above using a tilde (~).

Using LaTeX in the encyclopaedia

LaTeX code can be included in encyclopaedia articles by enclosing the code in "math" and "/math" tags (like other HTML tags).

Using LaTeX in Sciforums

LaTex code can be included in sciforums posts by enclosing the code in [tex][/tex] tags.

References

  1. Displaying equations using TeX.