Time for action – titling your document
We will take the first example and insert some commands that will produce a nice-looking title.
Type the following code in the editor; modify the previous example if you like:
\documentclass[a4paper,11pt]{article} \begin{document} \title{Example 2} \author{My name} \date{January 5, 2011} \maketitle \section{What's this?} This is our second document. It contains a title and a section with text. \end{document}
Click the Typeset button.
View the output:
What just happened?
In the first chapter, we talked about logical formatting. First, let's look at this example from that point of view. We told LaTeX that:
Our document is of the type
article
. It will be printed on A4 paper using a size of 11 points for the base font.The title is "Example 2".
You are the author.
The document was written on January 5, 2011.
Concerning the content of the document:
It begins with a title.
The first section shall have the heading "What's this?"
The following text is "This is our second...