\documentclass[letterpaper]{article}
\newcommand{\tcol}[1]{\textcolor{blue}{#1}}
\begin{document}
A \tcol{command} usually begins with a backslash.
\end{document}
==================
General Usage
==================
\newcommand{cmd}[args]{definition}
\newcommand{cmd}[args][default]{definition}
\renewcommand{cmd}[args]{definition}
\renewcommand{cmd}[args][default]{definition}
These commands define (or redefine) a command.
cmd- A command name beginning with a
\. For\newcommandit must not be already defined and must not begin with\end; for\renewcommandit 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- If this optional parameter is present, it means that the command's first argument is optional. The default value of the optional argument is
def. definition- The text to be substituted for every occurrence of
cmd; a parameter of the form#nincmdis replaced by the text of the nth argument when this substitution takes place.
No comments:
Post a Comment