\documentclass[11pt]{article}
\usepackage[margin=2cm]{geometry}
\geometry{letterpaper}
\usepackage{graphicx, amssymb, latexsym, amsmath}
\usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\title{My Article}
\author{Aditya Bhargava}
\begin{document}
\maketitle
\section{My Section}
\subsection{My Subsection}
% Your text here
\end{document}
If you don't have latex and you're on a mac, get gwTeX:
http://ii2.sourceforge.net/tex-index.html
latex [source file]
Start with a %.
\emph{ this is italicized }
\textbf{ this is in bold }
\today
Double Hyphens -- en dash
Triple Hyphens --- em dash
Two backslashes:
\\
Or specify the amount of vertical space (line height):
\\[24pt]
\newpage
Is placed between two $. For example:
$a$
$\infty$
$(u,v)$
$\lim_{x \to \infty} f(x)$
Math that's on it's own line is placed between \[ and \]. Example:
\[
\frac{f(x) - 1}{4}
\]
Must go in either inline math or displayed math.
\infty
Must go in either inline math or displayed math.
\frac{numerator}{denominator}
Used in either inline or displayed math.
\sqrt{5}
If you want an explicit dot or 'x' between two numbers to show that they're being multiplied use '\cdot' or '\times', respectively:
$a \times b$
Use
^{...} for superscripts.
_{...} for subscripts.
Examples:
$a^{2}$ % prints a squared (a ^ 2).
$a_{10}$ % prints a10, with 10 as a subscript
Use '\choose' or '\binom'. For example, here's n choose 2:
$n \choose {2}$
$\binom{n}{2}$
Aka the symbol with three lines in the equals sign.
\equiv
Print out a lowercase theta with:
\theta
Print out an uppercase theta with:
\Theta
Use '\sum' and '\prod'. Example:
\sum_{i=1}^{n} x_{i}^{2}
Remember that _{...} is for subscripts and ^{...} is for superscripts. So this is a summation of xi^2 for all i from 1 to n.
Use the \mbox command:
\[
a = b, \mbox{ by assumption }
\]
You have to escape them:
\{ ... \}
Less than / Greater than / Equals
< / > / =
Less Than or Equal To / Greater Than or Equal To
\le
\ge
In (∈)
\in
Approximately (≈)
\approx
Similar (∼)
\sim
Congruent (≅)
\cong
Subset (⊂)
\subset
Subset Of or Equal To (⊆)
\subseteq
Therefore
\therefore
Most of the above commands can be negated by putting an 'n' in front. For example, not equal to is:
\neq
Plus or Minus
\pm
Right arrow
\rightarrow or \to
Path, or Leads To
\leadsto
\emptyset
\neg
\forall
\exists
\backslash
\lfloor --stuff to floor-- \rfloor
\lceil --stuff to ceil-- \rceil
\cup
\cap
\texttt{ some text }
\textsc{ some text }
\textbullet
Put two single left quotes (aka backticks...they share a key with the ~):
``
Put two single right quotes (normal single quotes):
''
Small Type:
\scriptsize
Normal Type:
\normalsize
Large Font:
\Large
Huge Font:
\huge
Biggest Possible:
\Huge
You can also use these inside another command, like so:
\title{\Large Algorithms -- HW 8}
You can choose between flushright, flushleft, and center:
\begin{flushright}
some text
\end{flushright}
Use '\hspace'. This is equal to about one letter:
\hspace{2pt}
To use tabs, you have to use the tabbing environment:
\begin{tabbing}
\end{tabbing}
Tab stops are set with the \= command, and \> moves to the next tab stop. Example:
\begin{tabbing}
If \= it's raining \\
\> then \= put on boots,\\
\> \> take hat;\\
\> or \> smile. \\
Leave house.
\end{tabbing}
This produces:
If it's raining
then put on boots
take hat;
or smile.
Leave house.
\sim
\[ \left( \begin{array}{ccc}
a & b & c \\
d & e & f \\
g & h & i \end{array} \right)\]
In this code the 'ccc' represents the number of columns of the matrix:
\[
M =
\left[ {\begin{array}{cc}
x & y \\
z & w \\
\end{array} } \right]
\]
\sum\limits_{i=0}^n something
\int_0^{2 \pi} \! [something] \,
\usepackage{amssymb}
\mathbb{R}
\usepackage{epsfig}
\epsfig{file=figs/fig01.eps,width=0.9\linewidth,clip=}
\pm
\perp
\begin{equation}
\begin{bmatrix} 1 & 2 \\ 3 & 4\end{bmatrix}
\begin{bmatrix} 1 & 2 \\ 3 & 4\end{bmatrix}
\end{equation}
\begin{equation}
\begin{vmatrix} ta & tb \\ c & d\end{vmatrix} =
t * egin{vmatrix} a & b \\ c & d\end{vmatrix}
\end{equation}
$M = \left[ \begin{smallmatrix} a&b\\ c&d \end{smallmatrix} \right]$
\lim_{x \to +\infty}