More Latex Constructions

To make a set of equations one above the other, use \begin{eqnarray} instead of \begin{equation}. End each equation in the set with \\ (meaning end-of-line). If you want the equations to line up nicely, indicate the character that should be aligned in each equation with &. Here is an example:

\begin{eqnarray}

x_0&=&\sin(a+b) \\

x_1&=&\cos(a+b)

\end{eqnarray}

Notice that the '=' signs will be lined up, and also notice that you have to finish with \end{eqnarray}

To indicate the limit as n goes to infinity use (in math mode) \lim_{n \rightarrow \infty}.

To put big parentheses around a fraction, use, in math mode, \left( \frac{numerator}{denominator} \right). There is also \left[ and \right].

To include graphics, put the command \usepackage[dvips]{graphicx} somewhere near the beginning of your document (before \begin{document}). You can now insert figures with the command \includegraphics{YOURFILE.eps}. A sample LaTeX file shows how to do this.

The .eps file must be created separately, either by a drawing program, or as a text file, and it must be in the same directory as the .tex file that tries to include it. A sample .eps file shows how to do this.

Here is Alena McNamara's prescription for how to do this, including a way to use figures in other formats than .eps:

How to insert graphics in LaTeX documents

1. Save the figure into the folder your copy of LaTeX is using. If you're on the PC version of LaTeX, the file needs to be in .eps format; if you're using TeXShop on a Mac, it can be .pdf, .jpg, .png or .gif. (Note that if you have an .eps file on a Mac, you can open it using TeXShop to create a .pdf of the image--it's just handier to start in one of the default file formats.)

2. In the first part of your LaTeX document (before \begin{document}-- if you're using the template Natalie gave us, there are a couple of other lines like this, and you can put it with those) insert the line: \usepackage{graphicx}

3. In the text of your LaTeX document where you want the graphic to go, insert the code:

\begin{figure} \centering \includegraphics[scale=0.7]{filename} \caption{Text goes here} \end{figure}

The centering tag sticks it in the center of the page; you don't need that, but I think it makes it look prettier. The "scale" part makes it display, here, 70% of the original size--you can play around with that depending on how large you want the graphic to be on the page. Matlab saves the graphics pretty large, so you probably want to shrink it some. "filename" should be the name of the file, WITHOUT the file extension--it automatically looks for a file with that name in one of its default file types. The 'caption' tag puts the text you enter in as a caption under the graphic; it also automatically adds a number to the figure, which is handy if you want to refer back to it. If you're having problems, make sure to check first that the file is saved in the right place and is in the right file format.