LaTeX/Advanced Mathematics

From testwiki
Jump to navigation Jump to search

Template:LaTeX/Top

This page outlines some more advanced uses of mathematics markup using LaTeX. In particular it makes heavy use of the AMS-LaTeX packages supplied by the American Mathematical Society.

Equation numbering

The equation environment automatically numbers your equation:

\begin{equation} 
 f(x)=(x+a)(x+b)
\end{equation}

f(x)=(x+a)(x+b)ww(1)

Template:BookCat

You can also use the Template:LaTeX/LaTeX and Template:LaTeX/LaTeX (or Template:LaTeX/LaTeX from the Template:LaTeX/Package package) commands to label and reference equations, respectively. For equation number 1, Template:LaTeX/LaTeX results in 1 and Template:LaTeX/LaTeX results in (1):

\begin{equation} \label{eq:someequation}
6^2 - 5 = 36-5 = 31
\end{equation}

this references equation \ref{eq:someequation}.

625=365=31(1)
this references equation 1.

Template:BookCat

\begin{equation} \label{eq:erl}
a = bq + r
\end{equation}

where \eqref{eq:erl} is true if $a$ and $b$ are integers with $b \neq c$.

a=bq+r(1)
where (1) is true if a and b
are integers with bc.

Template:BookCat

Further information is provided in the labels and cross-referencing chapter.

To have the enumeration follow from your section or subsection heading, you must use the Template:LaTeX/Package package or use AMS class documents. Then enter Template:LaTeX/Usage to the preamble to get enumeration at the section level or Template:LaTeX/Usage to have the enumeration go to the subsection level.

\documentclass[12pt]{article}
\usepackage{amsmath}
 \numberwithin{equation}{subsection}
 \begin{document}
 \section{First Section}

 \subsection{A subsection}
 \begin{equation}
  L' = {L}{\sqrt{1-\frac{v^2}{c^2}}}
 \end{equation}
\end{document}

L=L1v2c2ww(1.1.1)

Template:BookCat

If the style you follow requires putting dots after ordinals (as it is required at least in Polish typography), the Template:LaTeX/LaTeX command in the preamble will result in the equation number in the above example being rendered as follows: (1.1.1).

To remove the duplicate dot, add the following command immediately after Template:LaTeX/LaTeX: Template:LaTeX/Usage

For a numbering scheme using Template:LaTeX/LaTeX, use: Template:LaTeX/Usage in the preamble of the document.

Note: Although it may look like the Template:LaTeX/LaTeX works by itself, it won't reset the equation number with each new section. It must be used together with manual equation number resetting after each new section beginning, or with the much cleaner Template:LaTeX/LaTeX.

Subordinate equation numbering

To number subordinate equations in a numbered equation environment, place the part of document containing them in a Template:LaTeX/Environment environment:

\begin{subequations}
\label{eq:Maxwell}
Maxwell's equations:
\begin{align}
        B'&=-\nabla \times E,         \label{eq:MaxB} \\
        E'&=\nabla \times B - 4\pi j, \label{eq:MaxE}
\end{align}
\end{subequations}

Maxwell's equations:

B=×E,(1.1a)E=×B4πj,(1.1b)

Template:BookCat

Referencing subordinate equations can be done using either of two methods: adding a label after the Template:LaTeX/LaTeX command, viz. Template:LaTeX/LaTeX, which will reference the main equation (1.1 above), or adding a label at the end of each line, before the Template:LaTeX/LaTeX command, which will reference the sub-equation (1.1a or 1.1b above). As shown, it is possible to add both labels in case both types of references are needed.

Vertically aligning displayed mathematics

A problem often encountered with displayed environments (Template:LaTeX/Environment and Template:LaTeX/Environment) is the lack of any ability to span multiple lines. While it is possible to define lines individually, these will not be aligned.

Above and below

The Template:LaTeX/LaTeX and Template:LaTeX/LaTeX commands[1] typeset symbols above and below expressions. Without AMS-TeX the same result of Template:LaTeX/LaTeX can be obtained with Template:LaTeX/LaTeX. This can be particularly useful for creating new binary relations:

\[
 A \overset{!}{=} B; A \stackrel{!}{=} B
\]

A=!B;A=!B

Template:BookCat

or to show usage of L'Hôpital's rule:

\[
 \lim_{x\to 0}{\frac{e^x-1}{2x}}
 \overset{\left[\frac{0}{0}\right]}{\underset{\mathrm{H}}{=}}
 \lim_{x\to 0}{\frac{e^x}{2}}={\frac{1}{2}}
\]

limx0ex12x=H[00]limx0ex2=12

Template:BookCat

It is convenient to define a new operator that will set the equals sign with H and the provided fraction: Template:LaTeX/Usage which reduces the above example to: Template:LaTeX/Usage

If the purpose is to make comments on particular parts of an equation, the Template:LaTeX/LaTeX and Template:LaTeX/LaTeX commands may be more useful. However, they have a different syntax (and can be aligned with the Template:LaTeX/LaTeX command):

\[
 z = \overbrace{
   \underbrace{x}_\text{real} + i
   \underbrace{y}_\text{imaginary}
  }^\text{complex number}
\]

z=xreal+iyimaginarycomplex number

Template:BookCat

Sometimes the comments are longer than the formula being commented on, which can cause spacing problems. These can be removed using the Template:LaTeX/LaTeX command[2]:

\[
 y = a + f(\underbrace{b x}_{
                    \ge 0 \text{ by assumption}}) 
   = a + f(\underbrace{b x}_{
          \mathclap{\ge 0 \text{ by assumption}}})
\]

Template:BookCat

Alternatively, to use brackets instead of braces use Template:LaTeX/LaTeX and Template:LaTeX/LaTeX commands[2]:

\[
 z = \overbracket[3pt]{
     \underbracket{x}_{\text{real}} +
     \underbracket[0.5pt][7pt]{iy}_{\text{imaginary}}
     }^{\text{complex number}} 
\]

Template:BookCat

The optional arguments set the rule thickness and bracket height respectively: Template:LaTeX/Usage

The Template:LaTeX/LaTeX and Template:LaTeX/LaTeX commands[1] produce arrows which extend to the length of the text. Yet again, the syntax is different: the optional argument (using [ and ]) specifies the subscript, and the mandatory argument (using { and }) specifies the superscript (which can be left empty by inserting a blank space).

\[
 A \xleftarrow{\text{this way}} B 
  \xrightarrow[\text{or that way}]{ } C
\]

Athis wayBor that wayC

Template:BookCat

For more extensible arrows, you must use the Template:LaTeX/Package package:

\begin{gather}
 a \xleftrightarrow[under]{over} b\\
%
 A \xLeftarrow[under]{over} B\\
%
 B \xRightarrow[under]{over} C\\
%
 C \xLeftrightarrow[under]{over} D\\
%
 D \xhookleftarrow[under]{over} E\\
%
 E \xhookrightarrow[under]{over} F\\
%
 F \xmapsto[under]{over} G\\
\end{gather}

Template:BookCat

and for harpoons:

\begin{gather}
 H \xrightharpoondown[under]{over} I\\
%
 I \xrightharpoonup[under]{over} J\\
%
 J \xleftharpoondown[under]{over} K\\
%
 K \xleftharpoonup[under]{over} L\\
%
 L \xrightleftharpoons[under]{over} M\\
%
 M \xleftrightharpoons[under]{over} N
\end{gather}

Template:BookCat

The Template:LaTeX/Environment and Template:LaTeX/Environment environments, available through the Template:LaTeX/Package package, are used for arranging equations of multiple lines. As with matrices and tables, Template:LaTeX/LaTeX specifies a line break, and Template:LaTeX/LaTeX is used to indicate the point at which the lines should be aligned.

The Template:LaTeX/Environment environment is used like the Template:LaTeX/Environment or Template:LaTeX/Environment environment:

\begin{align*}
 f(x) &= (x+a)(x+b) \\
      &= x^2 + (a+b)x + ab
\end{align*}

f(x)=(x+a)(x+b)=x2+(a+b)x+ab

Template:BookCat

Note that the Template:LaTeX/Environment environment must not be nested inside an Template:LaTeX/Environment (or similar) environment. Instead, Template:LaTeX/Environment is a replacement for such environments; the contents inside an Template:LaTeX/Environment are automatically placed in math mode.

Template:LaTeX/Environment suppresses numbering. To force numbering on a specific line, use the Template:LaTeX/LaTeX command before the line break.

Template:LaTeX/Environment is similar, but automatically numbers each line like the Template:LaTeX/Environment environment. Individual lines may be referred to by placing a Template:LaTeX/LaTeX before the line break. The Template:LaTeX/LaTeX or Template:LaTeX/LaTeX command can be used to suppress the number for a given line:

\begin{align}
 f(x) &= x^4 + 7x^3 + 2x^2 \nonumber \\
      &\qquad {} + 10x + 12
\end{align}

f(x)=x4+7x3+2x2+10x+12(3)

Template:BookCat

Notice that we've added some indenting on the second line. Also, we need to insert the double braces ({}) before the + sign, otherwise latex won't create the correct spacing after the + sign. The reason for this is that without the braces, latex interprets the + sign as a unary operator, instead of the binary operator that it really is.

More complicated alignments are possible, with additional Template:LaTeX/LaTeXs on a single line specifying multiple "equation columns", each of which is aligned. The following example illustrates the alignment rule of Template:LaTeX/Environment:

\begin{align*}
 f(x)  &= a x^2+b x +c   &   g(x)  &= d x^3 \\
 f'(x) &= 2 a x +b       &   g'(x) &= 3 d x^2
\end{align*}

f(x)=ax2+bx+cg(x)=dx3f(x)=2ax+bg(x)=3dx2

Template:BookCat

Braces spanning multiple lines

If you want a brace to continue across a new line, do the following:

\begin{align}
 f(x) &= \pi \left\{ x^4 + 7x^3 + 2x^2 \right.\nonumber\\
 &\qquad \left. {} + 10x + 12 \right\}
\end{align}

f(x)=π{x4+7x3+2x2+10x+12}(4)

Template:BookCat

In this construction, the sizes of the left and right braces are not automatically equal, in spite of the use of Template:LaTeX/LaTeX and Template:LaTeX/LaTeX. This is because each line is typeset as a completely separate equation —notice the use of Template:LaTeX/LaTeX and Template:LaTeX/LaTeX so there are no unpaired Template:LaTeX/LaTeX and Template:LaTeX/LaTeX commands within a line (these aren't needed if the formula is on one line). You can control the size of the braces manually with the Template:LaTeX/LaTeX, Template:LaTeX/LaTeX, Template:LaTeX/LaTeX, and Template:LaTeX/LaTeX commands.

Alternatively, the height of the taller equation can be replicated in the other using the Template:LaTeX/LaTeX command:

\begin{align}
 A &=     \left(\int_t XXX       \right.\nonumber\\
   &\qquad \left.\vphantom{\int_t} YYY \dots \right)
\end{align}

A=(tXXXYYY)(5)

Template:BookCat

Using aligned braces for piecewise functions

You can also use Template:LaTeX/LaTeX and Template:LaTeX/LaTeX to typeset piecewise functions:

\[f(x) = \left\{
  \begin{array}{lr}
    x^2 & : x < 0\\
    x^3 & : x \ge 0
  \end{array}
\right.
\]

f(x)={x2:x<0x3:x0

Template:BookCat

The Template:LaTeX/Environment environment[1] allows the writing of piecewise functions:

\[
 u(x) = 
  \begin{cases} 
   \exp{x} & \text{if } x \geq 0 \\
   1       & \text{if } x < 0
  \end{cases}
\]

u(x)={expxif x01if x<0

Template:BookCat

LaTeX will then take care of defining and or aligning the columns.

Within Template:LaTeX/Environment, text style math is used with results such as:

a={xdxb2

Display style may be used instead, by using the Template:LaTeX/Environment environment[2] from Template:LaTeX/Package:

\[
 a =
   \begin{dcases}
     \int x\, \mathrm{d} x\\
     b^2
   \end{dcases}
\]

a={xdxb2

Template:BookCat

Often the second column consists mostly of normal text. To set it in the normal Roman font of the document, the Template:LaTeX/Environment environment may be used:[2]

\[
 f(x) = \begin{dcases*}
        x  & when $x$ is even\\
        -x & when $x$ is odd
        \end{dcases*}
\]

f(x)={xwhen x is evenxwhen x is odd

Template:BookCat

Other environments

Although Template:LaTeX/Environment and Template:LaTeX/Environment are the most useful, there are several other environments that may also be of interest:

Environment name Description Notes
Template:LaTeX/Environment and Template:LaTeX/Environment Similar to Template:LaTeX/Environment and Template:LaTeX/Environment Not recommended because spacing is inconsistent
Template:LaTeX/Environment and Template:LaTeX/Environment[1] First line left aligned, last line right aligned Equation number aligned vertically with first line and not centered as with other environments
Template:LaTeX/Environment and Template:LaTeX/Environment[1] Consecutive equations without alignment
Template:LaTeX/Environment and Template:LaTeX/Environment[1] Similar to Template:LaTeX/Environment, but left aligns first equation column, and right aligns last column
Template:LaTeX/Environment and Template:LaTeX/Environment[1] Takes an argument specifying number of columns. Allows control of the horizontal space between equations This environment takes one argument, the number of “equation columns”: count the maximum number of Template:LaTeX/LaTeXs in any row, add 1 and divide by 2. [1]

There are also a few environments that don't form a math environment by themselves and can be used as building blocks for more elaborate structures:

Math environment name Description
Template:LaTeX/Environment[1] Allows gathering equations to be set under each other.
Template:LaTeX/Environment[1] Similar to Template:LaTeX/Environment, but used inside another displayed mathematics environment and only supports a single equation column (i.e. a single & symbol).
Template:LaTeX/Environment[1] Similar to Template:LaTeX/Environment, to be used inside another mathematics environment.
Template:LaTeX/Environment[1] Similar to Template:LaTeX/Environment, and likewise takes an additional argument specifying the number of columns of equations to set. It can stack inside Template:LaTeX/Environment.

For example:

\begin{equation}
 \left.\begin{aligned}
        B'&=-\partial \times E,\\
        E'&=\partial \times B - 4\pi j,
       \end{aligned}
 \right\}
 \qquad \text{Maxwell's equations}
\end{equation}

B=×E,E=×B4πj,}Maxwells equations(1.1)

Template:BookCat

\begin{alignat}{2}
 \sigma_1 &= x + y  &\quad \sigma_2 &= \frac{x}{y} \\	
 \sigma_1' &= \frac{\partial x + y}{\partial x} & \sigma_2' 
    &= \frac{\partial \frac{x}{y}}{\partial x}
\end{alignat}

σ1=x+yσ2=xy(1)σ1=x+yxσ2=xyx(2)

Template:BookCat

\begin{gather*}
a_0=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}f(x)\,\mathrm{d}x\\[6pt]
\begin{split}
a_n=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}f(x)\cos nx\,\mathrm{d}x=\\
=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}x^2\cos nx\,\mathrm{d}x
\end{split}\\[6pt]
\begin{split}
b_n=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}f(x)\sin nx\,\mathrm{d}x=\\
=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}x^2\sin nx\,\mathrm{d}x
\end{split}\\[6pt]
\end{gather*}

Template:BookCat

Indented Equations

To indent an equation, you can set Template:LaTeX/Parameter in the document class and then specify a certain value for the Template:LaTeX/LaTeX variable:

\documentclass[a4paper,fleqn]{report}
\usepackage{amsmath}
\setlength{\mathindent}{1cm}
\begin{document}
\noindent Euler's formula is given below:
\begin{equation*}
 e^{ix} = \cos{x} + i \sin{x}.
\end{equation*}
\noindent This is a very important formula.
\end{document}

Template:BookCat

Page breaks in math environments

To suggest that LaTeX insert a page break inside an Template:LaTeX/Package environment, you may use the Template:LaTeX/LaTeX command before the line break. Just as with Template:LaTeX/LaTeX, Template:LaTeX/LaTeX can take an optional argument between 0 and 4 denoting the level of desirability of a page break. Whereas 0 means "it is permissible to break here", 4 forces a break. No argument means the same as 4.

Alternatively, you may enable automatic page breaks in math environments with Template:LaTeX/LaTeX. It too can have an optional argument denoting the priority of page breaks in equations. Similarly, 1 means "allow page breaks but avoid them" and 4 means "break whenever you want". You can prohibit a page break after a given line using Template:LaTeX/LaTeX.

LaTeX will insert a page break into a long equation if it has additional text added using Template:LaTeX/LaTeX without any additional commands.

Specific usage may look like this:

\begin{align*}
 &\vdots\\ 
 &=12+7 \int_0^2
  \left(
    -\frac{1}{4}\left(e^{-4t_1}+e^{4t_1-8}\right)
  \right)\,dt_1\displaybreak[3]\\
 &= 12-\frac{7}{4}\int_0^2 \left( e^{-4t_1}+e^{4t_1-8} \right)\,dt_1\\
 &\vdots % 
\end{align*}

Template:BookCat

Page breaks before display maths (of all various forms) are controlled by Template:LaTeX/LaTeX. Its default 10000 means never break immediately before a display. Knuth (TeXbook chapter 19) explains this as a printers' tradition not to have a displayed equation at the start of a page. It can be relaxed with Template:LaTeX/Usage Sometimes an equation might look best kept together preceding text by a higher penalty, for example, a single-line paragraph about a single-line equation, especially at the end of a section.

Boxed Equations

For a single equation or alignment building block, with the tag outside the box, use Template:LaTeX/LaTeX:

\begin{equation}
 \boxed{x^2+y^2 = z^2}
\end{equation}

Template:BookCat

If you want the entire line or several equations to be boxed, use a Template:LaTeX/Environment inside an Template:LaTeX/LaTeX:

\fbox{
 \addtolength{\linewidth}{-2\fboxsep}%
 \addtolength{\linewidth}{-2\fboxrule}%
 \begin{minipage}{\linewidth}
  \begin{equation}
   x^2+y^2=z^2
  \end{equation}
 \end{minipage}
}

Template:BookCat

There is also the mathtools Template:LaTeX/LaTeX which is able to box across alignment marks:

\begin{align*}
\Aboxed{ f(x) & = \int h(x)\, dx} \\
              & = g(x)
\end{align*}

Template:BookCat

Custom operators

Although many common [[../Mathematics#Operators|operators]] are available in LaTeX, sometimes you will need to write your own, e.g. to typeset the argmax operator. The Template:LaTeX/LaTeX and Template:LaTeX/LaTeX commands[1] display custom operators; the * version sets the underscored option underneath like the Template:LaTeX/LaTeX operator:

\[
 \operatorname{arg\,max}_a f(a) 
 = \operatorname*{arg\,max}_b f(b)
\]

argmaxaf(a)=argmaxbf(b)

Template:BookCat

However, if the operator is frequently used, it is preferable to define a new operator that can be used throughout the entire document. The Template:LaTeX/LaTeX and Template:LaTeX/LaTeX commands[1] are specified in the header of the document: Template:LaTeX/Usage This defines a new command which may be referred to in the body:

\[
 \argmax_c f(c)
\]

argmaxcf(c)

Template:BookCat

Advanced formatting

Limits

There are defaults for placement of subscripts and superscripts. For example, limits for the lim operator are usually placed below the symbol:

\begin{equation}
  \lim_{a\to \infty} \tfrac{1}{a}
\end{equation}

lima1a

Template:BookCat

To override this behavior, use the Template:LaTeX/LaTeX operator:

\begin{equation}
  \lim\nolimits_{a\to \infty} \tfrac{1}{a}
\end{equation}

lim\nolimits a1a

Template:BookCat

A lim in running text (inside Template:LaTeX/LaTeX) will have its limits placed on the side, so that additional leading won't be required. To override this behavior, use the Template:LaTeX/LaTeX command.

Similarly one can put subscripts under a symbol that usually has them on the side:

\begin{equation}
  \int_a^b x^2  \mathrm{d} x
\end{equation}

abx2dx

Template:BookCat

Limits below and under:

\begin{equation}
  \int\limits_a^b x^2  \mathrm{d} x
\end{equation}

abx2dx

Template:BookCat

To change the default placement of summation-type symbols to the side for every case, add the Template:LaTeX/Parameter option to the Template:LaTeX/Package package. To change the placement for integral symbols, add Template:LaTeX/Parameter to the options. Template:LaTeX/Parameter can be used to change the default for named operators like det, min, lim, etc.

To produce one-sided limits, use Template:LaTeX/LaTeX as follows:

\begin{equation}
  \lim_{a \underset{>}{\to} 0} \frac{1}{a}
\end{equation}

lima>01a

Template:BookCat

Subscripts and superscripts

You can place symbols in subscript or superscript (in summation style symbols) with Template:LaTeX/LaTeX:

\begin{equation}
  \sum\nolimits' C_n
\end{equation}

\nolimits Cn

Template:BookCat

It's impossible to mix them with typical usage of such symbols:

\begin{equation}
  \sum_{n=1}\nolimits' C_n
\end{equation}

n=1\nolimits Cn

Template:BookCat

To add both a prime and a limit to a symbol, one might use the Template:LaTeX/LaTeX command:

\begin{equation}
  \sideset{}{'}\sum_{n=1}C_n
\end{equation}

'n=1Cn

Template:BookCat

It is very flexible: for example, to put letters in each corner of the symbol use this command:

\begin{equation}
  \sideset{_a^b}{_c^d}\sum
\end{equation}

cdab

Template:BookCat

If you wish to place them on the corners of an arbitrary symbol, you should use Template:LaTeX/LaTeX from the Template:LaTeX/Package package.

But a simple grouping can also solve the problem:

\begin{equation}
  {\sum\limits_{n=1} }'C_n
\end{equation}

n=1'Cn

Template:BookCat

since a math operator can be used with limits or no limits. If you want to change its state, simply group it. You can make it another math operator if you want, and then you can have limits and then limits again.

Multiline subscripts

To produce multiline subscript, use the Template:LaTeX/LaTeX command:

\begin{equation}
  \prod_{\substack{
            1\le i \le n\\
            1\le j \le m}}
     M_{i,j}
\end{equation}

1in1jm Mi,j

Template:BookCat

Text in aligned math display

To add small interjections in math environments, use the Template:LaTeX/LaTeX command:

\begin{minipage}{3in}
\begin{align*}
\intertext{If}
   A &= \sigma_1+\sigma_2\\
   B &= \rho_1+\rho_2\\
\intertext{then}
C(x) &= e^{Ax^2+\pi}+B
\end{align*} 
\end{minipage}

Template:BookCat

Note that any usage of this command does not change the alignment.

Also, in the above example, the command Template:LaTeX/LaTeX from the Template:LaTeX/Package package could have been used instead of Template:LaTeX/LaTeX to reduce the amount of vertical white space added between the lines.

Changing font size

There may be a time when you would prefer to have some control over the font size. For example, using text-mode maths, by default a simple fraction will look like this: ab, whereas you may prefer to have it displayed larger, like when in display mode, but still keeping it in-line, like this: ab.

A simple approach is to utilize the predefined sizes for maths elements:

Size command Description
Template:LaTeX/LaTeX Size for equations in display mode
Template:LaTeX/LaTeX Size for equations in text mode
Template:LaTeX/LaTeX Size for first sub/superscripts
Template:LaTeX/LaTeX Size for subsequent sub/superscripts

A classic example to see this in use is typesetting continued fractions (though it's better to use the Template:LaTeX/LaTeX command[1] described in the Mathematics chapter instead of the method provided below). The following code provides an example.

\begin{equation}
  x = a_0 + \frac{1}{a_1 + \frac{1}{a_2 + \frac{1}{a_3 + a_4}}}
\end{equation}

x=a0+1a1+1a2+1a3+a4

Template:BookCat

As you can see, as the fractions continue, they get smaller (although they will not get any smaller than in this example, where they have reached the Template:LaTeX/LaTeX limit). If you want to keep the size consistent, you could declare each fraction to use the display style instead; e.g.

\begin{equation}
  x = a_0 + \frac{1}{\displaystyle a_1 
          + \frac{1}{\displaystyle a_2 
          + \frac{1}{\displaystyle a_3 + a_4}}}
\end{equation}

x=a0+1a1+1a2+1a3+a4

Template:BookCat

Another approach is to use the Template:LaTeX/LaTeX command to select your preferred sizes. You can only define sizes for Template:LaTeX/LaTeX, Template:LaTeX/LaTeX, etc. One potential downside is that this command sets the global maths sizes, as it can only be used in the document preamble.

But it's fairly easy to use: Template:LaTeX/LaTeX, where ds is the display size, ts is the text size, etc. The values you input are assumed to be point (pt) size.

Note that the changes only take place if the value in the first argument matches the current document text size. It is therefore common to see a set of declarations in the preamble, in the event of the main font being changed. E.g., Template:LaTeX/Usage

Forcing \displaystyle for all math in a document

Put Template:LaTeX/Usage before Template:LaTeX/Usage to force all math to Template:LaTeX/Usage.

Adjusting vertical white space around displayed math

There are four parameters that control the vertical white space around displayed math: Template:LaTeX/Usage Short skips are used if the preceding line ends, horizontally, before the formula. These parameters must be set after Template:LaTeX/Usage.


Template:TODO

Notes


Template:LaTeX/Bottom