Test #1: should all be verbatim

\setlength\unitlength{10pt}
\begin{picture}(12,10)(-2,0)
%\linethickness{0.4pt}
\qbezier(2,6)(7,6)(9,3)
\qbezier(2,0)(7,0)(9,3)
\qbezier(2,6)(4,3)(2,0)
\qbezier(1,6)(3,3)(1,0)
\put(9.75,3.00){\circle{1.50}}
\put(10.5,3.00){\line(1,0){1.50}}
\put(0,5){\line(1,0){1.5}}
\put(0,1){\line(1,0){1.50}}
\end{picture}


Test #2:

This form is *not* handled:

\newcommand\topfraction{.7}
\newcommand\bottomfraction{.3}
\topfraction\over\bottomfraction

But it is handled if it looks like this:

\newcommand{\topfraction}{.7}%
\newcommand{\bottomfraction}{.3}%
\topfraction divided by \bottomfraction
\topfraction/\bottomfraction
\topfraction\over\bottomfraction


Test #3: simple parameterless expansion\newcommand{\water}{H$_2$O} 

  The formula for water is \water. 
  \water\ is the formula for water.


Test #4: with arguments, and multi-line...
\newcommand{\vex}[1]{\(#1_1 ... #1_n\)}\newcommand{\ve}[1]{\ensuremath{#1_1 ... #1_n}}
How about \vex{x}, or \ve{y}?


Test #5:
\newcommand{\weekday}[1]%
{%
\ifthenelse{\equal{#1}{1}}{Monday}{}%
\ifthenelse{\equal{#1}{2}}{Tuesday}{}%
\ifthenelse{\equal{#1}{3}}{Wednesday}{}%
\ifthenelse{\equal{#1}{4}}{Thursday}{}%
\ifthenelse{\equal{#1}{5}}{Friday}{}%
\ifthenelse{\equal{#1}{6}}{Saturday}{}%
\ifthenelse{\equal{#1}{7}}{Sunday}{}%
}
Day 3 is \weekday{3}!

Test #6: nested expansion:
\newcommand{\innerone}{A}\newcommand{\innertwo}{B}\newcommand{\innerthree}{\innerone \innertwo}
These should be in order: \innerthree{}CDE
\newcommand{\xone}{\leta}\newcommand{\xtwo}{\#B}\newcommand{\xthree}{\xone+\xtwo}
These should be in order: \xthree{}CDE


\newcommand   {\iint}          { \int \!\!\!\! \int }
\newcommand   {\iiint}         { \iint \!\!\!\! \int }
\newcommand   {\B}             { {\bf B} }
\newcommand   {\E}             { {\bf E} }
\newcommand   {\J}             { {\bf j} }
\newcommand   {\V}             { {\bf v} }
\newcommand   {\U}             { {\bf u} }
\newcommand   {\fgh}      [1]  { \vec{ \bf f } \left( #1 \right) }
\newcommand   {\cross}    [2]  { #1 \times #2 }
\renewcommand {\dot}      [2]  { #1 \cdot #2 }
\newcommand   {\curl}     [1]  { \nabla \times #1 }
\renewcommand {\div}      [1]  { \nabla \cdot #1 }
\newcommand   {\grad}     [1]  { \nabla #1 }
\newcommand   {\iddt }    [1]  { \partial #1 / \partial t }
\newcommand   {\ddt }     [1]  { \frac{\partial #1}{ \partial t } }
\newcommand   {\dd  }     [2]  { \frac{\partial #1}{ \partial #2 } }

%%% MAIN PART OF DOCUMENT
%
\begin{document}
\begin{eqnarray}
\B \\
\E \\
\J \\
\V \\
\U \\
\fgh{i+1/2} \\
\cross{\B}{\V} \\
\dot{\B}{\B} \\
\div{\B} \\
\grad{p} \\
\ddt{\B} \\
\iddt{\B} \\
\dd{B_y}{x} \\
\iint \dot{\B}{dS}  \\
\iiint \div{\B} dV
\end{eqnarray}
\end{document}


Finally, the torture test:

\newcommand{\first}[1]{Hello #1}
\newcommand{\second}[2]{#1{#2}}
\newcommand{\third}{\second{\first}{World}}
\third


We're done.

