Boston University
Mathematics and Statistics
Mathematics and Statistics
Overview People Courses Programs of Study Seminars Special Programs Events Research Jobs
Mathematics and Statistics
 
next up previous contents
Next: Using Runtex to Up: Introduction to LaTeX Previous: Introduction to LaTeX
 

Typing Text and Formatting the Information

A text editor, like Emacs, must be used to type the text of your document into a file, called an input file. The text in the file is surrounded by LaTeXs formatting information which tells the computer how the text should look when it is printed. See the section titled Text Editing -- The Basics of Emacs, for a review of how to create a file using a text editor. To create a new LaTeX file, start Emacs with a new file name( Note: that all LaTeX file names should end in .tex).

math [joe]% emacs homework.tex

Every LaTeX document must contain at least three lines of formatting information:

\documentstyle{article}
\begin{document}
This is where your text should be placed.
\end{document}

Notice that all the formatting lines begin with a character. All LaTeX commands in a file begin with a backslash.

The first line describes to LaTeX the style of document this file will contain. An article is a relatively short document (like a journal article) which would usually cover just one topic. Other document styles in LaTeX are report, book, and letter. In order to type a letter instead of an article, replace the word article with letter in the example above.

The second line denotes the beginning of your document. Every LaTeX file must contain this line and there must be a matching \end{document} at the end of your file. Any text that you type between the \begin{document} and \end{document} commands will be formatted by LaTeX as part of your document.

When you have finished typing your document, save your changes and quit Emacs.



Tim Kohl
 
September 2004
Mathematics and Statistics
Boston University