LaTeX
- Getting Started with LaTeX
- Overleaf
- LaTeX Basics
- BibTeX BasicsToggle Dropdown
- LaTeX-STEM ApplicationsToggle Dropdown
- Beamer (Presentations)
- Overleaf Workshops/TutorialsToggle Dropdown
Science and Engineering Librarian
740 North Pleasant Street
Amherst, MA 01003
General Document Structure
We can break up a LaTeX Source Document into four parts:
- Document Preamble
- Beginning of Document Environment
- Document Body
- Ending of Document Environment
1. Document Preamble
The document preamble provides some general rules for your document. Here, you will:
- Set a document class (Using the
\documentclass{x}
command) - Load necessary packages (Using the
\usepackage{x}
command)
The photo below shows an example document preamble with these commands.
2. Beginning of Document Environment
The whole document is an example of one large LaTeX environment (see Common Components for more information). As a result, you will need to use the command \begin{document}
to open up the document environment.
3. Document Body
Inside the document environment, is the Document Body. The document body is all of the content you want included in the document. This will include all of the text, images, commands, etc. that make up the document itself. See below for an example of a document body and the resulting output.
4. Ending of Document Environment
As mentioned, the document is one large LaTeX environment. Thus, at the end of the document body, we must use the command \end{document}
to close out the document environment.
Full Example
Below is a full example of a complete source document and the resulting output.
- Last Updated: Nov 14, 2024 4:59 PM
- URL: https://guides.library.umass.edu/LaTeX
- Print Page