1 – \newcommand
\newcommand{cmd}[args]{def}
\renewcommand{cmd}[args]{def}
These commands define (or redefine) a command.
- cmd: A command name beginning with a \. For \newcommand it must
not be already defined and must not begin with \end; for
\renewcommand it must already be defined.
- args: An integer from 1 to 9 denoting the number of arguments of
the command being defined. The default is for the command to
have no arguments.
- def: The text to be substituted for every occurrence of cmd; a
parameter of the form n in cmd is replaced by the text of the
nth argument when this substitution takes place.
2 – \newenvironment
\newenvironment{nam}[args]{begdef}{enddef}
\renewenvironment{nam}[args]{begdef}{enddef}
These commands define or redefine an environment.
- nam: The name of the environment. For \newenvironment there
must be no currently defined environment by that name, and the
command \nam must be undefined. For \renewenvironment the
environment must already be defined.
- args: An integer from 1 to 9 denoting the number of arguments of
the newly-defined environment. The default is no arguments.
- begdef: The text substituted for every occurrence of
\begin{name}; a parameter of the form n in cmd is replaced by
the text of the nth argument when this substitution takes place.
- enddef: The text substituted for every occurrence of \end{nam}.
It may notcontain any argument parameters.
3 – \newtheorem
\newtheorem{env_name}{caption}[within]
\newtheorem{env_name}[numbered_like]{caption}
This command defines a theorem-like environment.
- env_name: The name of the environment -- a string of letters.
Must not be the name of an existing environment or counter.
- caption: The text printed at the beginning of the environment,
right before the number.
- within: The name of an already defined counter, usually of a
sectional unit. Provides a means of resetting the new theorem
counter within the sectional unit.
- numbered_like: The name of an already defined theorem-like
environment.
The \newtheorem command may have at most one optional argument.
4 – \newfont
\newfont{cmd}{font_name}
Defines the command name cmd, which must not be currently defined, to
be a declaration that selects the font named font_name to be the
current font.