|
Jeffrey (Jeff) Lee Hellrung, Jr. jeffrey dot last name at gmail dot com Office: MS 3970 |
|
|
Home Research Courses/TA'ing LaTeX Tutoring Links |
Introduction to LaTeXLaTeX - WikipediaLaTeX is a typesetting language. You can think of it as a markup language similar to HTML. With HTML, you write a *.html plaintext file (using, e.g., Windows Notepad) with tags embedded within the document content to specify how the content should be formatted. These tags are then interpretted by a web browser. With LaTeX, you write a *.tex plaintext file, again containing certain formatting constructs, and then you convert the *.tex file to a *.dvi, a *.ps, and/or a *.pdf file. In this way, writing documents in LaTeX is very different from writing documents in a word processor, such as Microsoft Word or OpenOffice.org Writer. Word processors make the document formatting interactive and hide the specific formatting constructs. This is usually fine for non-technical documents where formatting is simple, like letters and essays. In fact, if all I care about is content, I usually just use OpenOffice.org Writer. However, LaTeX gives you much more flexibility in your control over formatting, and, probably more importantly, makes the expression of mathematical concepts and symbols much clearer and easier. This is why I prefer using LaTeX for my resume, homework assignments, and technical documents. A (very) simple example of a LaTeX document is \documentclass{article}This illustrates, for example, the use of the backslash character "\" as the escape character for commands and environments. In particular, "\(" puts you in "inline math mode", and "\)" puts you back in "text mode". Getting StartedBefore you begin typing LaTeX code, you'll need to install a LaTeX compiler, an IDE (Integrated Development Environment; this is technically optional but recommended), and appropriate document viewers. The IDE provides the frontend where you type your document and provides niceties such as syntax highlighting and shortcuts. The IDE is linked to the compiler backend (a separate program), which does the actual conversion of your plaintext *.tex file to a *.dvi, *.ps, and/or *.pdf file. The IDE may also be linked to your document viewers, which allow you to open, read, and print your *.dvi/*.ps/*.pdf files. Wikipedia provides a list of IDEs and distributions (which provide the compilers). There is also a list and descriptions of the most popular IDEs/editors for multiple platforms at A beginner's introduction to typesetting with LaTeX. I type all my LaTeX documents in Windows (if you use another operating system, I would check Wikipedia for links). My configuration is
I tend to compile my LaTeX documents into both PostScript and PDF files. The nice thing about GSView (which requires Ghostscript) is that when you open a PostScript document, GSView won't lock it. This allows you to recompile your LaTeX file without Windows complaining the PostScript file is in use. Further, once focus is returned to GSView, it will rerender the PostScript document, and keep you on the same page, so your see your changes right away. Acrobat Reader forces you to close the PDF before recompiling. However, PostScript file sizes tend to be 2 to 3 times larger than PDF file sizes for the same document, so I prefer distributing in PDF (and I've had problems in the past printing PostScript files from GSView). I've never bothered dealing with DVI files. If you use a different IDE/distribution combination, I'd like to hear you opinions on it. Learning LaTeXThe next step is to learn LaTeX. If your primary goal is to type math homework in LaTeX, you should be able to learn enough to get a working document compiled in about 2 or 3 hours. There is a learning curve, but once you get the basics down, it's easy to look up what you need only when you need it. I learned the basics from A beginner's introduction to typesetting with LaTeX. All you should need to get you started is Chapters 1 - 4, and possibly Chapter 6 if you plan on including tables, figures, images, etc. It probably wouldn't hurt to peruse other tutorials on the web, although the lazy shouldn't find this necessary. Try using Google or Wikipedia. After getting familiar with the basic document structure, you can take a look at this short document I put together that contains a lot of the constructs I use most often: latex_example.tex, latex_example.pdf. If there's something I don't know how to do in LaTeX, Google usually provides an answer, or one of the resources below. ResourcesThese are a collection of potentially useful links and documents. Please report broken links (email address at top).
|