Skip to main content
It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.
Image Map

LaTeX: 2) Creating a Document

LaTeX is a document preparation system that creates beautifully and consistently-formatted documents. It can be used for any document (articles, papers, letters, books) in any discipline, but is especially strong at typesetting mathematical formulae.

Using the Texmaker Wizard

In Texmaker, select Wizard from the top menu, then Quick Start.

In the window that opens, leave all of the default options, but change the Document Class to article. Add your name in the Author field if needed, then select OK.

undefined

This will add the following lines to your code:

\documentclass[12pt,letterpaper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\author{Christian Sheehy}
\begin{document}

\end{document}

The line items above \begin{document} make up the preamble and determine the layout and characteristics of your document. Document type, font size, packages that add specialized functions, metadata, and more. The actual content of your document must be placed between the begin and end document commands.

To give your article a title, add the following to the preamble (changing Test Article to the title of your article):

\title{Test Article}

To make the title and your name show up in your compiled document, add the following underneath the begin document command:

\maketitle

You are know free to type (or paste) the content of your document between the begin and end document commands. Indentations are added to your paragraphs automatically, just make sure you put an empty line between each paragraph.

Looking back at the same example from the screenshot on Tab 1, your code should look like this:

\documentclass[12pt,letterpaper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\author{Christian Sheehy}
\title{Test Article}
\begin{document}
\maketitle
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin dapibus dui a mauris dictum iaculis. Vivamus sapien nisi, efficitur laoreet diam in, porta efficitur neque. Maecenas metus dui, blandit ac augue ut, ultricies elementum erat. Donec dapibus rutrum eros nec tempor. Duis dolor ligula, pretium sed justo non, eleifend pharetra mi. Vivamus porttitor fringilla sagittis. Mauris condimentum rutrum felis id aliquet. Cras vel dapibus mauris. Donec gravida turpis vel mattis tristique. Praesent aliquet arcu eros, sit amet tempor dui semper ac. Vivamus vestibulum ligula tellus, at dapibus risus sollicitudin eget. Nulla porta odio eleifend porta rutrum. Etiam eu nibh non.  
\end{document}

Finally, press F1 to compile your document, and the resulting PDF will look like this:

You now have a simple LaTeX document! For more layout and formatting options, see Tab 3.