\documentclass[12pt,std]{article} \usepackage{amsmath,amsthm,amsfonts,amssymb,latexsym, hyperref} \newtheorem{theorem} {Theorem} \newtheorem{definition} {Definition} \begin{document} \ \begin{center} \textbf{LaTex Template.} \end{center} Here's a template to start your use of the LaTex mathematics text editor. As you can see you can type the body of the text without mathematics symbols. The editor automatically places the sentences in paragraphs and ignores the indentations that you use; as this sentence (in the .tex file) indicates. To actually print up what the file looks like, make sure that the upper left window with the arrow is set to pdflatex and then click the green arrow; you'll see a stream of (I think green) lines at the bottom, this is the output log; if you make a syntax mistake, look there for information about what it might be. However to start a new paragraph just skip a line at the point where you want a new paragraph. There are a number of symbols (some of which are not used frequently in mathematics texts) that have special meanings: they are the dollar sign, the backwards slash above the enter key, the left and right braces and the percent key. I'll show you how to actually get the computer to print these symbols. The backslash is use to tell the computer that either some special editing is being used (like ``documentclass'' needed at the beginning) or when a mathematical symbol is used. Notice it is used to tell the computer where the beginning and end of the document is. The dollar signs are used to indicate mathematical formulas like this: $a+b = b+ a$. In mathematical formulas the backslash is used to indicate the names of the special symbol needed: so to construct the Greek alphabet use it in the following way: $\alpha$ $\beta$ $\gamma, \delta, \epsilon$ and so one $... \lambda ... \sigma ...$. To get (some of) the capital Greek letters, just capitalize the first letter of the name after the backslash (for some reason my editor doesn't like capital $\alpha$s and $\beta$s): $... \Gamma, \Delta, ..., \Lambda, ... \Sigma, ...$. So now we are ready to type equations: $x+3 = y +2x + 7$. To do subscripts you use the bar above the minus sign: $x_1, x_2, x_3, ..., x_n, x_n+1, x_n+2... $. Notice that the pattern messed up because I didn't tell the computer that I wanted the whole expression $n+1$ and $n+2$ in the subscript. That's what the braces are used for: you use the braces to group portions of the expressions together. Here's how it works: $x_1, x_2, x_3, ..., x_n, x_{n+1}, x_{n+2}... $. To do superscripts you use the hat symbol above the 6 on the key board: $y = 1 +x + x^2 + x^3$ and again use the braces to group where needed: $y= e^{x + 1}$. Here are the special symbols for sums and integrals: $\sum_{i=1}^{\infty} 2^{-i} = 1$ and $\int_a^b f'(x)dx = f(b) - f(a)$. If you place an equation between double dollar signs then it expands it slightly and sets it off in the middle of the page: $$\sum_{i=1}^{\infty} 2^{-i} = 1.$$ Here's how you do fractions: $\frac{x+1}{x+2}$ note that you need to use two sets of braces to indicate the numerator followed by the denominator. The percentage symbol is used to mark off comments in the LaTex file that won't appear in the output file (I think everything after the percent symbol on a line does not appear: %so this comment should be invisible .) Be careful how you use it because it can make other things invisible. The \% symbol is also used as a spacer for arrays - we'll get to that in a later lesson. If you type a backslash all by itself it just leaves a space: compare $abc$ with $a b c$ and with $a \ b \ \ c$. And it can also be used to skip lines in a document. \ Thus I've placed a blank line in the document. This comes in handy some times. Here's a list of some of the symbols we'll use a lot: $x \in X$ $x \notin X$ $A \cup B$ $A \cap B$ $A \subset B$ $0 \ne 1$. If you actually wanted to print up some of these special symbols, here's how to do that: $ \{ $ $ \} $ $ \$ $ $ \% $. $\backslash$. \ More symbols: $\emptyset$ $\nsubseteq$ $\supset$ $\nsupseteq$ $\not \subset$ Notice my ``newtheorem'' command at the beginning of this .tex file. It is used to tell the software that I want to number and emphasize the objects called theorems. I'll do this in just a minute. Note below how the $\backslash$begin \{theorem\} command and $\backslash$end \{theorem\} command sets off the statement of the theorem. \begin{theorem} Here is a statement of the theorem with a formula: $$n = p_1^{n_1} p_2^{n_2} ... p_k^{n_k}.$$ \end{theorem} \begin{proof} Here's where your proof goes; note that the software automatically adds a little square at the end of the proof. This is the accepted symbol for the end of the proof. In the old days the expression q.e.d. was used instead of the little square. It's an abbreviation for the Latin ``quod erat demonstrandum''. And since that's a foreign language, I really should italicize it: \textit{quod erat demonstrandum}. \end{proof} \begin{theorem} Here is the statement of the second theorem with another formula: $$x = \prod_{i=1}^n p_i^{n_i}.$$ \end{theorem} \begin{proof} And of course here's where the next proof goes. \end{proof} \begin{center} \textbf{eqnarray} \end{center} \ Sometimes you'd like to line up equations as in the following example: \begin{eqnarray*} 3^{4(n+1)} + 4 & = & 3^{4n} \cdot 3^4 + 4 \\ & = & (5q-4) 3^4 + 4 \ \ \ \mbox{ (from above)} \\ & = & 5q \cdot 3^4 - 4 \cdot 81 + 4 \\ & = & 5q \cdot 3^4 - 324 + 4 \\ & = & 5(q 3^4 - 64). \end{eqnarray*} To do this you use the begin\{eqnarray*\} ... end\{eqnarray*\} command. It is automatically in the mathematical environment - the begin and end commands act like the \$ signs. \ To number the equations, just remove the * symbol; LaTex automatically starts at 1 and counts up: \begin{eqnarray} 3^{4(n+1)} + 4 & = & 3^{4n} \cdot 3^4 + 4 \\ & = & (5q-4) 3^4 + 4 \ \ \ \mbox{ (from above)} \\ & = & 5q \cdot 3^4 - 4 \cdot 81 + 4 \\ & = & 5q \cdot 3^4 - 324 + 4 \\ & = & 5(q 3^4 - 64). \end{eqnarray} If you want some, but not all, of the lines numbered, use the nonumber command: \begin{eqnarray} 3^{4(n+1)} + 4 & = & 3^{4n} \cdot 3^4 + 4 \nonumber \\ & = & (5q-4) 3^4 + 4 \ \ \ \mbox{ (from above)} \\ & = & 5q \cdot 3^4 - 4 \cdot 81 + 4 \nonumber \\ & = & 5q \cdot 3^4 - 324 + 4 \\ & = & 5(q 3^4 - 64). \nonumber \end{eqnarray} \end{document}