LaTex2Web logo

Documents Live, a web authoring and publishing system

If you see this, something is wrong

Table of contents

First published on Thursday, Aug 14, 2025 and last modified on Wednesday, Dec 10, 2025 by François Chaplais.

The structure of LaTeX commands

François Chaplais

1 Text and commands

Plain text in LaTeX is just plain text as you can use every where. However, if you want to go beyong that, you will have to use LaTeX commands. LateX Commands are distinguished from ordinary text by the fact that they begin with a backslash \ character.

2 The structure of LaTeX commands

Beyond this, you will have to use LaTeX commands. A LaTex command is built with the following contiguous components:

  • the command name: the command name is characterized by the fact that it begins with a backslash character. So you will use this character often in a LaTeX document.
  • mandatory parameter(s): each parameter is enclosed in curly braces: {mandatory parameter}
  • optional parameter(s): each optional parameter is enclosed in brackets: [optional parameter]. Since these parameters are optional, they can be omitted in the command.

As a summary, here is pseudo-code that represents a valid LaTeX command structure:

\name[optional]{mandatory}

3 The structure of LaTeX environments

Environments are delimited by an opening statement and a closing statement. The structure is the following.

\begin{environment name}
content ....
\end{environment name}

For instance, to create a quote, the following construction is used.

\begin{quote}
The quote itself.
\end{quote}

The result is

The quote itself.

4 Summary

Summary 1

LaTeX commands are single words that begin with a backslash \ character. Simple commands are applied directely to the command parameters. The \begin and \end commands delimit a LaTeX environment, which may include a mix of ordinary text and LaTeX commands.