A LaTeX Course for UoA Students
A HTML version Instructor: Theo J. Mertzimekis
Home > Basic Commands
Main menu
» First Steps
» Basic Commands
» Math equations
» Thesis template
» Bibliography
» Examples
» Useful Links


University of Athens

Questions? Comments?
Basic Commands

We will now cover some of the basic LaTeX commands. But before that, we will say a few things about the structure of the LaTeX source file.

The structure of the source file

As we have seen in the previous section, a source file (extension .tex) is required. This file is processed by LaTeX and the sequence of commands is scanned and translated. The file is divided in two parts:

  • The preamble is the upper top part of the source file, including all commands and options defined before the \begin{document} command. In the preamble we load all necessary packages and set needed options for the document.
  • The actual document with some formatting commands. The document ends with the command \end{document}. Everything placed after that is ignored by LaTeX and not processed.


LaTeX uses environments for certain operations or objects. You may center a part of the document by placing it in a center environment:

text to be centered

or you may include a math equation (see next section) with the equation environment:


A user may define his/her own environments in the preamble and use them throughout the text.


All LaTeX commands may appear in one of the following forms:

  • A backslash and some characters (letters only). Such commands are case sensitive and are terminated by a space or some non-letter character e.g. \large or \em\Alpha (the former increases the font size while the latter produces a capital A in italics).
  • A backslash followed by some special character, such as \% or \$
Some commands require an argument, which is included in curly braces {} immediately after the command name e.g.


Sometimes, commands provide options which are defined in square braces []. The general syntax is then:





Comments are parts of code that are useful for describing the source file or act as reminders. They are ignored by LaTeX. Comments are implemented in LaTeX by placing % at the beginning of the comment. All characters following % are ignored. e.g.

This is the famous Einstein relation % E=mc2 ** in-line comment
% It describes the relation between mass and energy ** separate line comment

Special characters

There are ten special characters that are reserved for LaTeX. They are used for several operations, typically producing no direct output. These are the following characters:
# $ % ^ & _ { } ~ \
They can be included as normal characters in the text by placing a backslash in front of them:
\# \$ \% \^ \& \_ \{ \} \~ \textbackslash

Lists (bullets, enumerations)

An enumerated list is generated in the enumerate environment. Every numbered bullet is specified with the command \item.

Richard Feynman
Roger Penrose
Peter Higgs

A bulleted list is generated by the itemize environment.

Richard Feynman
Roger Penrose
Peter Higgs

Of course, lists can be nested to any level. See similarities and differences in this example file [TeX][PDF]

Quotation Marks

The proper use of quotation marks in LaTeX is `` for the left and '' for the right ones, instead of " " for both. babel will translate that to language-specific quotes in case needed.