Department of Engineering

Next: Classes and packages Up: LATEX Concepts Previous: LATEX Concepts

## Environments and commands

LATEX is a macro-package for TEX which has many preset environments where much of the setting up that TEX users have to do explicitly is done for you. An environment has the form

\begin{environment name}

.

\end{environment name}

LATEX also has commands which affect the formatting of the document. Their arguments are given in braces. For example,

\textit{This is much more important} than this.
produces as output This is much more important than this.

The related \itshape command doesn't take an argument. It affects all the subsequent text in the environment where it's used.

LATEX tries to enforce the idea that the visual appearance of the document (use of fonts, indentation, etc) should derive from the logical structure of the document (i.e. rather than manually putting the section titles into bold, you should let the \section command do it). Resisting this philosophy can lead to extra (usually unnecessary) work.

LATEX is expandable. Many macros can be loaded in to provide added features. You can also create your own commands and environments. Commands can take arguments that modify their action

• Some commands have a *-form, a variant on the standard command that you get by adding a * to the command name.

• Mandatory arguments are enclosed in {} braces
• Optional arguments are enclosed in [ ] brackets.

Next: Classes and packages Up: LATEX Concepts Previous: LATEX Concepts
 | computing help |