LaTeX Style
Problems
- Larger equations with proper proportions
- Colored box on top.
Contents
- 1 LaTeX New Line
- 2 LaTeX Arrows
- 3 LaTeX Color
- 4 LaTeX Comment
- 5 LaTeX Display
- 6 LaTeX Integrals with Circles
- 7 LaTeX Prime Characters
- 8 LaTeX Reference Card
- 9 LaTeX Special Characters
- 10 LaTeX Multi-line Statements
- 11 LaTeX Multi-line Text
- 12 LaTeX Operator Name
- 13 LaTeX Display Alignment Size
- 14 LaTeX Proportions
- 15 LaTeX Proportions [Brackets]
- 16 LaTeX Size
- 17 LaTeX Strikethrough[5]
- 18 LaTeX Style
- 19 Internal Links
LaTeX New Line
\\
\newline
\par
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
This
\( \color{red}{\underbrace{\color{black}{\rho}}_{\color{red}{\text{Density}}}} \)
is produced by this
{\color{red}{\underbrace{\color{black}{\rho}}_{\color{red}{\text{Density}}}}}
Use \overbrace for labels over the statement
This
\(\color{red}{\overbrace{\color{black}{\rho}}^{\color{red}{\text{Density}}}}\)
is produced by this
{\color{red}{\overbrace{\color{black}{\rho}}^{\color{red}{\text{Density}}}}}
For an equation block use this:
{| style="margin-left: 40px;" | || \(= \) |- | || \(= \) |- | || \(= \) |}
Try to keep the equal signs lined up.
To make the type look bold use \mathbf{} as in \(\mathbf{x=\theta}\).
For a question mark over a sign.
\stackrel{\text{?}}{=}
produces
\(\stackrel{\text{?}}{=}\)
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]
\ Escape
\: space
\infty infinity
\sin trig function
\pm plus - minus
\text{<any text>}, always put \: after
Trig Functions with no tag
\text{arcsec}
\text{arccot}
\text{arccsc}
\text{sech}
Prime
x^{\prime} = \(x^{\prime}\)
x^{\prime \prime} = \(x^{\prime \prime}\)
LaTeX Multi-line Statements
Statement with multiple lines end with \\.
LaTeX Multi-line Text
Use the text keyword with the multiple line token \\
\text{Constant}\\ \text{Multiple}\\ \text{Rule}
produces
LaTeX Operator Name
Not every operator is built into LaTeX. For example, arcsec looks like \(\arcsec\). The fix is to use the operatorname function. Such as,
- \operatorname{arcsec} (x) looks like \(\operatorname{arcsec} (x)\).
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 } $$
- $$ \huge \pi \text{ 2 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 Strikethrough[5]
Use \require{cancel} first, then the as below:
\cancel{math} \(\require{cancel}\cancel{math}\)
\bcancel{math} \(\require{cancel}\bcancel{math}\)
\xcancel{math} \(\require{cancel}\xcancel{math}\)
\cancelto{value}{math} \(\require{cancel}\cancelto{value}{math}\)
LaTeX Style
- 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\).
- Use the center-dot \( \cdot \) to represent multiplication. Using the astrisk \( * \) or x \( \times \) to represent multiplication can lead to confusion.
- Logo is rendered with: \LaTeX as \(\LaTeX\)
Internal Links
Parent Article: Main Page