LaTeX Style

From University
Jump to: navigation, search


  • Larger equations with proper proportions
  • Colored box on top.

LaTeX New Line


LaTeX Arrows

Good site[1]

  • Arrow over text to the right

\( \overrightarrow{text} \:\:\:\: \) is \overrightarrow{text}

  • Arrow over text to the left

\( \overleftarrow{text} \:\:\:\: \) is \overleftarrow{text}

LaTeX Color

MathJax colors work with enclosing braces, not just and end brace as in LaTeX.
Use, \color{red}{x+y} for \(\color{red}{x+y}\).

LaTeX Comment

  • Use the text command, as in \text{ this will not be interpreted ).
  • Comments on a line with an equation like the one below:
$$1.\: P(c)=f(c) \:\:\:\: \color{red}{\text{ Graphs for \(f\) and \(P\) pass through \((c,f(c))\)}}$$

Are indented twice and have four spaces between the equation and the comment
::1.\: P(c)=f(c) \:\:\:\: \color{red}{\text{ Graphs for \(f\) and \(P\) pass through \((c,f(c))\)}}

LaTeX Display

Use \ ( and \ ) for inline
Use $$ for large, centered, display
Use \underbrace for labels under the statement

\( \color{red}{\underbrace{\color{black}{\rho}}_{\color{red}{\text{Density}}}} \)

is produced by this


For an equation block use this:

{| style="margin-left: 40px;"
| || \(= \)
| || \(= \)
| || \(= \)

Try to keep the equal signs lined up.

LaTeX Integrals with Circles

Use \oint for an integral with a circle.

$$ \textbf{1. } \oint M \:dx $$

Use \rlap{\mkern5.5mu\circlearrowright}\int for a clockwise integral.

$$ \textbf{2. } \rlap{\mkern5.5mu\circlearrowright}\int M \:dx $$

Use \rlap{\mkern5.5mu\circlearrowleft}\int for a counterclockwise integral.

$$ \textbf{3. } \rlap{\mkern5.5mu\circlearrowleft}\int M \:dx $$

LaTeX Prime Characters

$$\text{1st Prime =} P{}^{\prime} \text{or P{}^{\prime} }$$
$$\text{2nd Prime =} P{}^{\prime \prime} \text{or P{}^{\prime \prime} }$$

after the 3rd prime use

$$n\text{th Prime =} P{}^{(n)} \text{or P{}^{(n)} }$$

LaTeX Reference Card


LaTeX Special Characters

CTAN LaTeX Symbols[2]
LaTeX Symbols
\ Escape
\: space
\infty infinity
\sin trig function
\pm plus - minus
\text{<any text>}, always put \: after

Trig Functions with no tag

x^{\prime} = \(x^{\prime}\)
x^{\prime \prime} = \(x^{\prime \prime}\)

LaTeX Multi-line Statements

There is not way to break a single statement into multiple lines. The mediawiki interpreter breaks them up into separate statements.

LaTeX Display Alignment Size

Display alignment, LaTeX statements between double '$', are centered by default, they are aligned left here. There a carriage return after the last '$'.
$$ \huge \pi $$ This is on the next line because the last double '$' uses a hard carriage return.

Shifting the display right requires a space or indent, ':', symbol. Each \(\pi\\) below uses 0,1,2, and 3 indents.
$$ \huge \pi \text{ 0 indent } $$

$$ \huge \pi \text{ 1 indent } $$
$$ \huge \pi \text{ 2 indent } $$
$$ \huge \pi \text{ 3 indent } $$

Center the statement by placing it in a table between center commands.

$$ \huge \pi $$

Right the statement by placing it in a table and using, style="float:right;", in the table. When using double $ add <br clear=all /> after the table so the following text does not ride up.

$$ \huge \pi $$

Each indent is about 20px. In a table use, style="margin-left: 40px", to simulate two intentions.

LaTeX Proportions

Proportion tags like \left and \right work as intended outside a table. No nowiki tag is needed. See below.
The statement, \large \left|\frac{x^{6}}{x+1}\right|, looks like this below in display and inline styles.
$$ \large \left|\frac{x^{6}}{x+1}\right| $$ \( \large \left|\frac{x^{6}}{x+1}\right| \)

Inside a table set the vertical height to 100 px or so using the style="height:100px" command.

$$= \large \ln \left|\frac{x^{6}}{x+1}\right| - \frac{9}{x+1} + C $$

Proper proportion for one side use a period for the missing side. Here, \left. matches the \right|.

$$ \left. \frac{\partial z}{\partial y}\right|_{(a,b)} = f_{y}(a,b) $$

\left. \frac{\partial z}{\partial y}\right|_{(a,b)} = f_{y}(a,b)

LaTeX Proportions [Brackets]

Sometimes the brackets must be even over an equation. For example,

$$\left[ \left( \frac{3}{4} \right) t^{4/3} \right]_{0}^{1} \textbf{i} + \left[ \ln | t - 1 | \right]_{0}^{1} \textbf{j} + \left[ -e^{-t} \right]_{0}^{1} \textbf{k} $$

looks very miss proportioned. Use the \vphantom{} command in the \( \textbf{j} \) and \( \textbf{k} \) equations with the 3/4 inserted, \vphantom{ \frac{3}{4} }, to even the size, as below.

$$\left[ \left( \frac{3}{4} \right) t^{4/3} \right]_{0}^{1} \textbf{i} + \left[\vphantom{\frac{3}{4} } \ln | t - 1 | \right]_{0}^{1} \textbf{j} + \left[ \vphantom{\frac{3}{4} } -e^{-t} \right]_{0}^{1} \textbf{k} $$

LaTeX Size

Display size only works between double $. Setting sizes is described well here[3][4].

$$ \tiny \text{ The \tiny font size is 6pt} $$ $$ \scriptsize \text{ The \scriptsize font size is 8pt} $$ $$ \footnotesize \text{ The \footnotesize font size is 9pt} $$ $$ \small \text{ The \small font size is 10pt} $$ $$ \normalsize \text{ The \normalsize font size is 10.95pt} $$ $$ \large \text{ The \large font size is 12pt} $$ $$ \Large \text{ The \Large font size is 14.4pt} $$ $$ \LARGE \text{ The \LARGE font size is 17.28pt} $$ $$ \huge \text{ The \huge font size is 20.74pt} $$ $$ \Huge \text{ The \Huge font size is 24.88pt} $$

LaTeX Style

  1. Always use a space in \(x\:dx\) and not \(xdx\) to display a clear separation between \(x\) and \(dx\), else it looks like three variables strung together and misinterpreted as \(x^{2}d\).
  2. Use the center-dot \( \cdot \) to represent multiplication. Using the astrisk \( * \) or x \( \times \) to represent multiplication can lead to confusion.
  3. Logo is rendered with: \LaTeX as \(\LaTeX\)

Internal Links

Parent Article: Main Page