11 Defining Your Own Commands

\newcommand
Defines a new command.
\renewcommand
Redefines an existing command.

11.1 Example


  \newcommand{\dal}{Dalhousie University}

Input:


  I am a student at \dal\ in
  Halifax, Nova Scotia.

Output:

I am  a student at Dalhousie University in Halifax, Nova Scotia.

Could also use \dal{}.


  \renewcommand{\emph}[1]{\textbf{#1}}

Input:


  This \emph{word} is
  emphasized.

Output:

This word   is emphasized.

_______________________________________________________
Last updated: October 27, 2002
Site maintained by: Clyde Clements clyde@mathstat.dal.ca
Return to my home page.