\newcommand
\newcommand{cmd}[args]{def}
\renewcommand{cmd}[args]{def}
These commands define (or redefine) a command.
\newcommand{prikaz}[argumenty]{definice}
\renewcommand{prikaz}[argumenty]{definice}
Tyto prikazy definuji (prip. predefinovavaji) prikazy.
- 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.
- prikaz - jmeno prikazu zacinajici \ .
Pro prikaz \newcommand toto jmeno prikazu
nesmi byt nadefinovano nikde driv. Pro prikaz \renewcommand
prave naopak musi byt uz nejak nadefinovano.
- argumenty - cele cislo od 1 do 9 urcujici pocet argumentu
prave definovaneho prikazu. Standardne rovno nule.
- definice - text, ktery bude substituovan za kazdy vyskyt
definovaneho prikazu. Parametr prikazu #n je nahrazen textem n-teho
argumentu pri uskutecneni substituce.