SIAM L A TEX Workshop: Next Steps Paul Gartside March 2, 2013 1 Introduction Now you take your second steps learning how to create beautiful mathematical documents using L A TEX. All going well, you will discover how to do lists, create references to theorems and to other papers, how to include graphics, how to force L A TEX to do as you wish (not be done lightly), and how to use additional packages to create letters and presentations. I will demonstrate how to accomplish certain tasks with L A TEX on my computer (which is shown on the screen). You will then do the corresponding exercises below. 2 A Review Task 1 Create a basic L A TEX file called newton.tex with standard preamble and body. Using the raw text in newton.txt recreate, as best you can, the paper Calculus by Isaac Newton (see handout). Do NOT worry about getting the references right or the diagram. 3 Including Graphics To include graphics you need to import a package. Add \usepackage{graphicx} to the preamble of newton.tex. Where you want to include a diagram diagram.pdf enter: \includegraphics{diagram.pdf} 1
Task 2 Add the diagram FTC.pdf to your Newton paper. Use options width=x in and height=y in to size. Use \begin{center}... \end{center} to center in the page. When creating a pdf file pdf and jpg good, everything else bad. When creating ps file eps good, everything else bad. You may need to convert your image to a suitable type. This is best done when the image is made. 4 Labels, References and Citations Label things you wish to label (theorems etc) via \label{name_of_thing}. Refer to labels like this: Theorem \ref{name_of_thing}. L A TEX will track these references automatically. You can move your theorems (with their labels) around as much as you like and the numbering will still be correct! Task 3 Label and reference the two parts of the Fundamental Theorem (see second paragraph of the Introduction). Citations are also handled automatically. At the end of your document, just before \end{document} insert \begin{thebibliography}{30} and then a few blank lines later \end{thebibliography}. For each paper or book you wish to cite enter a line in the blank lines like so: \bibitem{barr} Isaac Barrow, \emph{some Paper}, Some Journal {\bf 2} (1662), pp 12--15.. To cite this paper type something like this: See Barrow s paper \cite{barr} Task 4. Add the citations to Barrow and Gregory to newton.tex. 5 Being Forceful \\ forces a newline (without indentation). \ makes a one character space. \, makes a small space. \emph{text} emphasizes the text text. \textbf{text} makes the text bold text. \footnote{text} puts the text in a footnote. 2
Task 5 Improve newton.tex with the above commands. http://www.andy-roberts.net/misc/latex/latextutorial7.html discusses L A TEX formatting in more detail. You can get anything you want. But the general rule is not to force L A TEX! 6 Letters Task 6 Load up and run L A TEX on newtonletter.tex. This should be enough to help you write simple letters in L A TEX. 7 Presentations via Beamer Once you have proved a wonderful theorem, written it down in L A TEX and had it checked by your advisor (it s not really true until all three steps have happened!), you will want to discuss your result at seminars and conferences. You may wish to do this via a computer projector. Task 7 Load up and run L A TEX on newtonpresent.tex. This should be enough to help you write simple presentations in L A TEX. Note that each page (or frame) of the presentation is started and ended with: \begin{frame} \frametitle{page Name} \end{frame} 8 Columns Task 8 Deduce from the frame Columns Are Useful how to create columns in a presentation. Switch over the text and diagram. Do you think the text looks better on the left or the right? In general, the eye does not like to track long distances from left to right and back across a page. This is why (printed) newspapers have narrow columns. Its easier to read. 3
This is why columns are good. They also allow us to nicely pair text and diagrams. 9 Lists of Various Kinds We often like to list things. Bullet points are very common in presentations (although they are, in my opinion, over used). Task 8 Experiment with the lists on the Lists are Useful page of the presentation. Try nesting lists to see what happens (not recommended in real life). 10 Uncovering Items Step-by-Step It can be helpful to uncover parts of a page of a presentation in steps. Beamer has a powerful method of achieving this. For simple cases it is quite straight forward. Task 9 Notice that on the frame FTC Test the three items of the list are uncovered one after the other. Look at the L A TEX code for the list. Most of it should look familar from your investigation of lists. But each \item has an added feature: <1-> for example for item 1. This tells beamer to display this item on the first and all subsequent views of this page. Replace the <1-> with <1-2> What happens? How would you make the third item appear on the second and third views? How would you make the second item appear on the second view only? 11 The L A TEX Solution to Graphics: TikZ We can include graphics in a L A TEX document by creating a pdf and \include{}ing it. But I would like to mention that a beautiful solution is to use the package tikz. One advantage is that L A TEX (including math symbols) can be directly incorporated into the diagram. Another is that the text and diagram are together (and not separate files). See http://texample.net/tikz/ for examples of diagrams created using tikz. 4
A comprehensive (readable!) manual is available: http://ctan.mackichan.com/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf 12 Conclusion You now know enough to typeset (beautifully...) a math paper (or class report, or your recitation questions/answers). Your references and citations will be made automatically by L A TEX. You can also create professional looking letters. And you can make presentations which are elegant, colorful, easy to read and understand. Have fun! 5