b

LaTeX Scrapheap

For the basics, check out the LaTeX2E cheat sheet
For specific weird symbols, check out the Comprehensive LaTeX Symbol List


For the uninitiated out there, LaTeX is a typesetting mark-up language orignally developed for laying out mathematical equations in a consistent and pleasing manner. Since it is a mark-up lanaguage, similar to HTML, it sits around in plaintext files until it is parsed through and rendered to an output file, typically a PDF or DVI file. This is wonderful, as PDF is essentially the most common and viewable document format out there that preserves formatting perfectly between almost any viewing program. Even if it didn't have compatability on it's side, LaTeX would still win out in my book due to the sheet elegance of the documents it can produce, but that's all subjective.

On to the purpose of this page, the LaTeX scrapheap. It's not always easy to figure out how to typeset that one crazy character, or annotate exactly like you want to, and it always takes some googling. This is the place where I've tossed many of the bits and pieces I've found useful (and don't want to lose). This would be useless if there was a single standard reference, but since various add-on packages introduce capabilities not found in the standard LaTeX distribution, it can be a pain to re-find exactly what you need.

Maybe equal or assumed sign
\stackrel{?}{=}
\stackrel{!}{=}
Rotation by abitrary angle
\usepackage{rotating}
\begin{rotate}{angle in degrees}
  Content to be rotated
\end{rotate}
\begin{sideways}
  This content is always rotated by 90 degrees CCW.
\end{sideways}
Tweak item spacing in an enumerate or itemize
\addtolength{\itemsep}{-5pt}
Cancel terms in an equation visually
\usepackage{cancel}
\[ a + b + \cancel{c} = \cancel{c} + d + e \]
\[ a + b + \cancelto{0}{c} = d + e \]
Arrows with words over them
\usepackage{amsmath}
\frac{x^3}{3}\xleftarrow{\text{integration with respect to x}} x^2 \xrightarrow{\text{derivative with respect to x}}2x
Therefore and other logical symbols
\usepackage{amssymb}
x \therefore y
Colored text, use the second set of braces to prevent the color from bleeding to other text. Not sure why that happens, but the fix is easy enough. Use predefined colors or make your own, (rgb takes normallized values, RGB takes 0-255, CYMK takes cyan-yellow-magenta-black, and gray takes a single 0-1 grayscale value).
\usepackage{color}
\definecolor{gray1}{rgb}{0.3,0.3,0.3}
\definecolor{gray2}{rgb}{0.4,0.4,0.4}
\definecolor{gray3}{rgb}{0.6,0.6,0.6}
\definecolor{gray4}{rgb}{0.8,0.8,0.8}
{\color{red}{A fading list}}\\
{\color{gray2}{Fabricate and test design.}}\\
{\color{gray2}{Utilize results to design more sophisticated optics and profiles.}}\\
{\color{gray3}{Extend to arbitrary profiles for wavefront correction.}}\\
{\color{gray4}{Optimize for existing applications in industry.}}\\