
\typeout{WDS LaTeX2e macro package  <Aug 2001>   wdsmacros.sty.}

%Warren D. Smith's LaTeX2e macro package  <Aug 2001>  wdsmacros.sty
%For inclusion before
%\begin{document}
%but after all
%\usepackage{...}'s???
%

%\ifthenelse{\boolean{@final}}{\typeout{Final mode}}{\typeout{Draft mode}}
%\ifthenelse{\boolean{@draft}}{\typeout{Draft mode}}{\typeout{Final mode}}
%both say ``undefined control sequence''

%\marginparwidth 11pt        % Only 1-char-wide (marginal notes) allowed.
%\marginparsep 10pt          % Horizontal space between outer margin and
                            % marginal note

\setlength{\itemsep}{0pt}   %itemsep = additional space 
                            %between list items, beyond parsep.
%p185 and 113 Lamport discuss list spacing params.
%Hopefully just this will work. NO! It has no effect placed here.
%Amsart has good param choices, Latex Article does not -
%all the lists have huge interitem spacing in Article for no reason.

\renewcommand{\notesname}{}  %endnotes now do not have a name

%\newcommand{\bibname}{}  %references now do not have a name
                          %renewcommand says: was undefined!

%\renewcommand{\indexname}{}  %index now does not have a name

%
%To cause stuff to vanish:
%
\newcommand{\killit}[1] {}

%
%\SetHeads{LEFTHEAD}{MIDHEAD}{RIGHTHEAD}
%  for example use 
%    LEFTHEAD={\footnotesize \@LeftHead}
%    MIDHEAD={\footnotesize typeset \tod}
%    RIGHTHEAD={\footnotesize \@RightHead\ }
%\SetFoots{LEFTFOOT}{MIDFOOT}{RIGHTFOOT}
%  for example use 
%    LEFTFOOT={\footnotesize \@Docnum}
%    MIDHEAD={\thepage}
%    RIGHTHEAD={\footnotesize
%         {\Roman {part}}.
%         {\arabic {section}}.
%         {\arabic {subsection}}.
%         {\arabic {subsubsection}}}
%
\newcommand{\WDSsetHeads}[3]{\header={\tenrm 
{\hbox to 2.8in {#1 \hfil} 
\hss {#2} \hss 
\hbox to 2.8in {\hfil #3}}}}

\newcommand{\WDSsetFoots}[3]{\footline={\tenrm 
{\hbox to 2.8in {#1 \hfil}
\hss {#2} \hss 
\hbox to 2.8in {\hfil #3}}}}

%
%\SetHeads{LEFTHEAD}{MIDHEAD}{RIGHTHEAD}
%  for example use 
%    LEFTHEAD={\footnotesize \@LeftHead}
%    MIDHEAD={\footnotesize typeset \tod}%Warren D Smith's LATEX-2e style file (=class file)   Aug 2001

\typeout{WDS LaTeX2e style  <Aug 2001>.}

%page formatting:
\pagenumbering{arabic}

%paragraphs
\parskip 3pt plus 1pt minus 0.5pt %Vertical space between paragraphs.
\parindent 0pt 

%\partopsep 2pt plus 1pt minus 1pt% Extra vertical space, in addition to
                                 % \parskip and \topsep, added when user
                                 % leaves blank line before environment.

%\marginparwidth 11pt        % Only 1-char-wide (marginal notes) allowed.
%\marginparsep 10pt          % Horizontal space between outer margin and
                            % marginal note

%
%\SetHeads{LEFTHEAD}{MIDHEAD}{RIGHTHEAD}
%  for example use 
%    LEFTHEAD={\footnotesize \@LeftHead}
%    MIDHEAD={\footnotesize typeset \tod}
%    RIGHTHEAD={\footnotesize \@RightHead\ }
%\SetFoots{LEFTFOOT}{MIDFOOT}{RIGHTFOOT}
%  for example use 
%    LEFTFOOT={\footnotesize \@Docnum}
%    MIDHEAD={\thepage}
%    RIGHTHEAD={\footnotesize
%         {\Roman {part}}.
%         {\arabic {section}}.
%         {\arabic {subsection}}.
%         {\arabic {subsubsection}}}
%
\newcommand{\SetHeads}[3]{\header={\tenrm 
{\hbox to 2.8in {#1 \hfil} 
\hss {#2} \hss 
\hbox to 2.8in {\hfil #3}}}}

\newcommand{\SetFoots}[3]{\footline={\tenrm 
{\hbox to 2.8in {#1 \hfil} 
\hss {#2} \hss 
\hbox to 2.8in {\hfil #3}}}}

%The following 6 commands provided by \usepackage{fancyhdr}
%but that pack refuses to put fancy headings on page 1, a 
%non-fixable bug.
%\pagestyle{fancy}
%also do the job:
%\lhead[even]{odd}
%\chead{}
%\rhead{}
%\lfoot{}
%\cfoot{}
%\rfoot{}

\pagenumbering{arabic}  
%\nopagenumber   %would get rid of page numbers, but this 
                 %more controllable with the above

\newcommand{\setpagenumber}[1]{\global\setcounter{page}{#1}}

%\renewcommand{\baselinestretch}{2}  %turns on double spacing
%\renewcommand{\baselinestretch}{1.5}   %for 1.5 spacing

%\setpagenumber{1009}   resets page numbering

%
%Table environment
%
\newcommand {\Table}[5]{
        % #1 = Positioning Letters: h, t|b|p
        %     h=here, t=top of page, b=bottom,  (recommend ``ht'')
        %     p=floats all figures onto a separate figures & tables page
        % #2 = {*} causes double column table, {} for single
        % #3 = body of table
        % examples: \vspace{1.5in}  or
        %  \begin{tabular}..\end{tabular} (see p. 64 of LATEX book)  or
        %  \begin{verbatim}..\end{verbatim}
        % #4 = Caption Text
        % #5 = label for later \ref{}.
        {\begin{table#2}[#1]
             \begin{center}
                 {#3}
                \caption{#4 \label{#5} }
             \end{center}
         \end{table#2}}
}

%
%Figure environment
%
\newcommand {\Figure}[6]{
        % #1 = Positioning Letters: h, t|b|p
        %     h=here, t=top of page, b=bottom,  (recommend ``ht'')
        %     p=floats all figures onto a separate figures & tables page
        % #2 = {*} causes double column table, {} for single
        % #3 = scale factor such as .68 for 68%
        % #4 = filename such as thefigure.eps
        % #5= Caption Text
        % #6= label for later \ref{}.
        {\begin{figure#2}[#1]
                \scalebox{#3}{\includegraphics{#4}}
                \caption{#5 \label{#6}}
         \end{figure#2}}
}

%
%date macros:
%
\newcounter{WDStimehours}  %newcounter cannot be used in included file???!
\newcounter{WDStimeminutes}    %it works anyhow
\newcommand{\WDSprinttime}{%needs calc package
  \setcounter{WDStimehours}{\time/60}
  \setcounter{WDStimeminutes}{\time-\value{WDStimehours}*60}
  \theWDStimehours:\ifthenelse{\value{WDStimeminutes}>9}{}{0}\theWDStimeminutes
}

\newcommand{\oldprinttime}{\number\time}

\newcommand{\shortdate}{
\number\day\space \ifcase\month\or
 Jan\or Feb\or Mar\or Apr\or May\or Jun\or
 Jul\or Aug\or Sep\or Oct\or Nov\or Dec\fi
 \space \number\year}

% \tod gives time and date   \time is minutes since midnight.
\newcommand{\tod}{\WDSprinttime\space\shortdate}

% These command definitions are provided for convenience.
%If you want multiline eqn, whole thing has a number, do \BE..\EE
%and use a \begin{array}{c} .. \end{array}  inside it,
%or use \nonumber on lines you don't want numbered in a \BA..\EA.

\newcommand {\BD}{\[}  %non-numbered displayed eqn
\newcommand {\ED}{\]}

\newcommand{\BE}{\begin{equation}}  %numbered displayed eqn
\newcommand{\EE}{\ensuremath{\end{equation}}}

\newcommand{\BA}{\begin{eqnarray}}  %multiline eqn, each line numbered
\newcommand{\EA}{\ensuremath{\end{eqnarray}}} %except lines with \nonumber

\newcommand{\BAN}{\begin{eqnarray*}}  %multiline eqn, no lines numbered
\newcommand{\EAN}{\ensuremath{\end{eqnarray*}}} %use & for aligned stuff
%note: you can do \left( bah \right[ to get  (bah[
% or \left\{ foo \right to get  {foo
% or \left. foo \right| to get  foo|
% The left and right *symbols* need not match but words ``left'' and
% ``right'' must correspond in pairs.

\newenvironment{Abstract}{\small\bf {\em Abstract --- }}{}

\newenvironment{Keywords}{\vspace{8pt}\small\sf {\em Keywords --- }}{}

% Create a single command to take care of title, author and thanks.
%  #1 = title.
%  #2 = author(s). Separated by \and and with \thanks{footnoted thanks}'s.
%  #3 = small print email address stuff.
%  #4 = running LeftHead  (compressed version of authors)
%  #5 = running RightHead (compressed version of title)
%  #6 = Document Number   convention: DRAFT or number if finalized
%  #7 = Document Number   convention: date
%       Examples of #6 #7:   {RM/JJD/8723}{DRAFT \today}
%                            {RM/JJD/8724}{January 12, 1987}
\newcommand {\Title}[7]{
{%start of fancyhdr-based version
   \lhead{\footnotesize #4}   %LeftHead on left head
   \chead{\footnotesize typeset \tod} %time+date in center head
   \rhead{\footnotesize #5\ }
             %RightHead (arg of Title macro) on right head
   \lfoot{\footnotesize #6\date{#7}}   %docnum on left foot
   \cfoot{\rm \thepage}    % page number in center foot
   \rfoot{\footnotesize
     {   {\Roman{part}}
         \ifthenelse{\value{part}>0}{.}{}
         {\arabic {section}}.
         {\arabic {subsection}}.
         {\arabic {subsubsection}}
     }
   } %right foot gives section #
}%end fancyhdr-based version ... but more is to come

\killit{  %version not using fancyhdr, FAILS???
   \WDSsetHeads{\footnotesize #4}   %LeftHead on left head
   {\footnotesize typeset \tod} %time+date in center head
   {\footnotesize #5\ }
             %RightHead (arg of Title macro) on right head
   WDSsetFoots{\footnotesize #6\date{#7}}   %docnum on left foot
   {\rm \thepage}    % page number in center foot
   {\footnotesize
     {   {\Roman{part}}
         \ifthenelse{\value{part}>0}{.}{}
         {\Roman {part}}.   
         {\arabic {section}}.
         {\arabic {subsection}}.
         {\arabic {subsubsection}}
     }
   } %right foot gives section #
}%end killit ... here is the rest

   \title{ #1 }  %use \\ for line breaks
   \author{#2 \\
       {\tt #3}}
   \maketitle

   \thispagestyle{fancy}  %tries to make 1st page have fancyhdr despite bug!
}
%For multi-author do 
%\author{a1 \\ email1 \and a2 \\ email2 \and a3 \\ email3}

% Define command \BigL with a single parameter.  It creates a paragraph
% start with a giant letter.  It was designed for use just after
% a \section command.  We recommend that the first phrase of the sentence
% also be capitalized.  Example:
%
%       \section{Introduction}
%       \BigL{N}OW IS THE TIME for all good men to come to the aid ...

\newlength{\Wa}
\newlength{\Wb}
\newlength{\Wc}
\newlength{\Wd}

\newfont{\HUGE}{cmr10 scaled 2986}

\newcommand{\Biglet}[3]{
\settowidth{\Wa}{\HUGE #1}
\setlength{\Wb}{\Wa}
\addtolength{\Wa}{#3}
\setlength{\Wc}{\linewidth}
\setlength{\Wd}{\linewidth}
\addtolength{\Wb}{#2}
\addtolength{\Wc}{-\Wb}
\addtolength{\Wd}{-\Wa}
\parshape=4 0pt \linewidth \Wa \Wd \Wb \Wc 0pt \linewidth
\vspace{3pt}
{\HUGE #1}\vspace{-24.0pt}\newline
}

\newcommand{\BigL}[1]{\Biglet{#1}{0pt}{0pt}}

%
%from Knuth texbook ex 18.26. Text underlining macro:
%
\def\undertext#1{$\underline{\smash{\hbox{#1}}}$}

%
%Below hackery deals with cross-referencing (turning it on/off)
%
\newcommand{\sref}[1]{{\S}\ref{#1}} %for citing sections
\newcommand{\eqr}[1]{(EQ \ref{#1})} %for citing equations
%\eqref does same thing with no EQ
\newcommand{\leb}[1]{} %for uncited labels
\newcommand{\lab}[1]{\label{#1}}    %turn on crossref, but no stringprnt
\newcommand{\rf}[1]{\ref{#1}}             %(no typeout)

%
%proofs:
%
\newcommand{\pf}[1]{{\smallskip\noindent\bf #1}}  % for proof headings
\newcommand{\prff}{{\smallskip\noindent\bf Proof:\ }}  % same as \pf{Proof.\ }
%\qed causes \hfill  $\Box$
%\qedsymbol   for no hfill.
\newcommand{\QED}{\hfill  $\Box$\smallskip}
\newcommand{\club}{\ensuremath{\clubsuit}}  %useful alternate qed symbol


%
%miscel math symbols:
%
%\newcommand{\binom}[2]{{{#1} \choose {#2}}}

%\renewcommand{\d}{\mathop{\mathrm{d}}\nolimits}   %\int x \d x
\renewcommand{\d}{\mathrm{d}}   %\int x \d x
\renewcommand{\ncong}{\not\equiv}
\newcommand{\notcong}{\not\equiv}
\renewcommand{\cong}{\equiv}
%\newcommand{\ne}{{\neq}}
%\newcommand{\implies}{{\Longrightarrow}}
%\newcommand{\iff}{{\Longleftrightarrow}}

\newcommand{\len}{\ell}           %length

\newcommand{\degree}{^{\circ}}
\newcommand{\degrees}{^{\circ}}
\newcommand{\asympt}{{\sim}}
\newcommand{\nasympt}{{\nsim}}
\newcommand{\nto}{{\nrightarrow}}
\newcommand{\ngets}{{\nleftarrow}}
\newcommand{\twoto}{{\twoheadrightarrow}}
\newcommand{\twogets}{{\twoheadleftarrow}}

\newcommand{\union}{{\bigcup}}  %use like \sum, \bigoplus, \bigotimes etc
\newcommand{\intersection}{{\bigcap}}
\newcommand{\divides}{{ \, \mid \, }}
\newcommand{\ndivides}{{ \, \nmid \, }}
\newcommand{\angstrom}{\ensuremath{\text{\AA}}}
\newcommand{\lwig}{{\lesssim}}
\newcommand{\gwig}{{\gtrsim}}
\newcommand{\lceiling}{{\lceil}}
\newcommand{\rceiling}{{\rceil}}
\newcommand{\lcieling}{{\lceil}}
\newcommand{\rcieling}{{\rceil}}
\newcommand{\lciel}{{\lceil}}
\newcommand{\rciel}{{\rceil}}

\newcommand{\bigZ}{\mathbb{Z}}
\newcommand{\bigN}{\mathbb{N}}
\newcommand{\bigR}{\mathbb{R}}
\newcommand{\bigQ}{\mathbb{Q}}
\newcommand{\bigC}{\mathbb{C}}
\newcommand{\bigH}{\mathbb{H}}

\newcommand{\bfZ}{\mathbf{Z}}
\newcommand{\bfN}{\mathbf{N}}
\newcommand{\bfR}{\mathbf{R}}
\newcommand{\bfQ}{\mathbf{Q}}
\newcommand{\bfC}{\mathbf{C}}
\newcommand{\bfH}{\mathbf{H}}

%It is often necessary to use a \protect command, e.g. on sqrt's in
%a section title.

%typeset chemical inline formulae without need for mathmode
%and indices all at same height. Kopka p192.
\newlength{\fntxvi}\newlength{\fntxvii}
\newcommand{\chem}[1]{
{\fontencoding{OMS}\fontfamily{cmsy}\selectfont
\fntxvi\the\fontdimen16\font
\fntxvii\the\fontdimen17\font
\fontdimen16\font=3pt\fontdimen17\font=3pt
$\mathrm{#1}$
\fontencoding{OMS}\fontfamily{cmsy}\selectfont
\fontdimen16\font=\fntxvi \fontdimen17\font=\fntxvii}}
%supposedly better than old way which was:
%\newcommand{\chem}[1]{\ensuremath{\mathrm{#1}}}

\newcommand{\units}[1]{\ensuremath{\mathrm{#1}}}

\newcommand{\half}{{\raise.43ex\hbox{$\scriptstyle{\frac{1}{2}}$}}}
\newcommand{\onethird}{{\raise.43ex\hbox{$\scriptstyle{\frac{1}{3}}$}}}
\newcommand{\twothirds}{{\raise.43ex\hbox{$\scriptstyle{\frac{2}{3}}$}}}
\newcommand{\onefourth}{{\raise.43ex\hbox{$\scriptstyle{\frac{1}{4}}$}}}
\newcommand{\threefourths}{{\raise.43ex\hbox{$\scriptstyle{\frac{3}{4}}$}}}

\newcommand{\nolinebreakallowed}{\hbox}
\newcommand{\nopagebreakallowed}{\mbox} 

%
%hypergeometric function
%
\newcommand{\pFq}[5]{
{}_{#1}F_{#2} \left( \begin{array}{c} {#3} \\ {#4} \end{array} ; #5 \right)
} 

\newcommand{\innerprod}[2]{\langle #1 \mid #2 \rangle}   %inner product
\newcommand{\bra}[1]{\langle #1 |}
\newcommand{\ket}[1]{| #1 \rangle}  
\newcommand{\floor}[1]{{\lfloor {#1} \rfloor}}
\newcommand{\ceil}[1]{{\lceil {#1} \rceil}}
\newcommand{\ceiling}[1]{{\lceil {#1} \rceil}}

\newcommand{\mean}[1]{{\langle {#1} \rangle}}
\newcommand{\abs}[1]{{| {#1} |}}
\newcommand{\norm}[1]{{\| {#1} \|}}

%uniform-height sqrt
\newcommand{\usqrt}[1]{{\sqrt{\vphantom{H}\smash[b]{#1}}}}

%AMSmath complains about the following, it wants \genfrac to
%be used not \atop or \overwithdelims:
\newcommand{\legendre}{\overwithdelims()}  %legendre symbol
\newcommand{\angchoose}{\atopwithdelims\langle\rangle}  

\newcommand{\blegendre}[2]{{#1 \legendre #2}}
\newcommand{\bangchoose}[2]{{#1 \angchoose #2}}
\newcommand{\bchoose}[2]{{#1 \choose #2}}  %like \binom
\newcommand{\bbrack}[2]{{#1 \brack #2}}
\newcommand{\batop}[2]{{#1 \atop #2}}

%variant dot commands:
\newcommand{\vardddot}[1]{\overset{\therefore}{#1}}
\newcommand{\varddddot}[1]{{\raise0.13ex\hbox{$\stackrel{::}{#1}$}}}

%antidiagonal 3 dots (mirror of \ddots; macro by Yannis Haralambous 1996):
%\def\adots{\mathinner{\mkern2mu\raise\p@\hbox{.}
%\mkern2mu\raise4\p@\hbox{.}\makern1mu
%\raise7\p@\vbox{\kern7\p@\hbox{.}}\mkern1mu}}
%Does not work.

\def\lacute{\mathopen{<}}
\def\racute{\mathclose{>}}
%\def\implic{{\mathbin\Longrightarrow}}
%\def\biimp{{\mathbin\Longleftrightarrow}}

%now frac has line thickness as optional arg
\renewcommand{\frac}[3][]{\genfrac{}{}{#1}{}{#2}{#3}}

%TeX's pmatrix has (), bmatrix [], vmatrix ||, matrix nothing:
%\def\bmatrix#1{\left[ \matrix{#1} \right]}
%\def\vmatrix#1{\left| \matrix{#1} \right|}
%this idea fails due to LATEX vmatrix environment

%\newcommand{\??}{??\marginpar{?}}
%\newcommand{\qq}{??\marginpar{?}}
%this disabled: marginpar does not work with multicol
%nor does longtable

%closed contour integral counterclockwise with arrow:
\newcommand{\cint}{\raise0.96ex\hbox{$\llcorner$}\mkern-15.75mu\oint}
\newcommand{\ccwint}{\leftturn\mkern-19mu\int}
\newcommand{\ccint}{\circlearrowleft\mkern-22.25mu\int}

%nonclosed contour int (ccw arrow):
\newcommand{\cvint}{\curvearrowleft\mkern-21.5mu\int}

%tensor dual:
\newcommand{\tdual}[1]{\overset{*}{#1}}
   %works but a mite too high

%double dual (two stars above it):
\newcommand{\ttdual}[1]{{\raise0.42ex\hbox{$\stackrel{**}{#1}$}}}


\newcommand{\circphone}{\ensuremath{\text{\ding{38}}}}
\newcommand{\plainphone}{\ensuremath{\text{\ding{37}}}}
\newcommand{\scissors}{\ensuremath{\text{\ding{34}}}}
\newcommand{\blender}{\ensuremath{\text{\ding{39}}}}
\newcommand{\airplane}{\ensuremath{\text{\ding{40}}}}
\newcommand{\envelope}{\ensuremath{\text{\ding{41}}}}
\newcommand{\pointfinger}{\ensuremath{\text{\ding{43}}}}
\newcommand{\writinghand}{\ensuremath{\text{\ding{45}}}}
\newcommand{\pencil}{\ensuremath{\text{\ding{46}}}}
\newcommand{\xcross}{\ensuremath{\text{\ding{54}}}}
\newcommand{\zapfcross}{\ensuremath{\text{\ding{58}}}}
\newcommand{\crossprism}{\ensuremath{\text{\ding{62}}}}
\newcommand{\maltesecross}{\ensuremath{\text{\ding{64}}}}
\newcommand{\jewstar}{\ensuremath{\text{\ding{65}}}}
\newcommand{\darkhypsquare}{\ensuremath{\text{\ding{70}}}}
\newcommand{\hypsquareoutline}{\ensuremath{\text{\ding{71}}}}
\newcommand{\darkpentstar}{\ensuremath{\text{\ding{72}}}}
\newcommand{\pentstaroutline}{\ensuremath{\text{\ding{73}}}}
\newcommand{\starprism}{\ensuremath{\text{\ding{80}}}}
\newcommand{\darkhexstar}{\ensuremath{\text{\ding{86}}}}
\newcommand{\snowflake}{\ensuremath{\text{\ding{100}}}}
\newcommand{\zapfball}{\ensuremath{\text{\ding{108}}}}
\newcommand{\cube}{\ensuremath{\text{\ding{113}}}}
\newcommand{\darksemicircle}{\ensuremath{\text{\ding{119}}}}
\newcommand{\darkrectangle}{\ensuremath{\text{\ding{122}}}}
\newcommand{\bigleftquote}{\ensuremath{\text{\ding{123}}}}
\newcommand{\bigleftdblquote}{\ensuremath{\text{\ding{125}}}}
\newcommand{\bigrightquote}{\ensuremath{\text{\ding{124}}}}
\newcommand{\bigrightdblquote}{\ensuremath{\text{\ding{126}}}}
\newcommand{\fruit}{\ensuremath{\text{\ding{166}}}}
\newcommand{\darkheart}{\ensuremath{\text{\ding{170}}}}
\newcommand{\motionarrow}{\ensuremath{\text{\ding{224}}}}
\newcommand{\fatarrow}{\ensuremath{\text{\ding{231}}}}
\newcommand{\arrowprism}{\ensuremath{\text{\ding{233}}}}
\newcommand{\exxagarrow}{\ensuremath{\text{\ding{253}}}}

\newcommand{\smallsim}{\ensuremath{\scriptstyle\sim}}
\newcommand{\prece}{\preccurlyeq}
\newcommand{\succe}{\succcurlyeq}
\newcommand{\sphere}{\Circle}
\newcommand{\ball}{\CIRCLE}
\newcommand{\simpsurf}{\triangle}
\newcommand{\simpvol}{\blacktriangle}
\newcommand{\squaresurf}{\square}
\newcommand{\squarevol}{\blacksquare}
\newcommand{\octsurf}{\lozenge}
\newcommand{\octvol}{\blacklozenge}
\newcommand{\defeq}{\stackrel{\text{def}}{=}}
\newcommand{\swap}{\leftrightarrow}

\newcommand{\md}{\bmod}
\newcommand{\Mod}{\bmod}
\newcommand{\mymod}{\bmod}
\newcommand{\exclamdown}{\ensuremath{\text{!`}}}
\newcommand{\questdown}{\ensuremath{\text{?`}}}

\newcommand{\leftguill}{\guillemotleft}
\newcommand{\rightguill}{\guillemotright}
\newcommand{\leftguillsing}{\guilsinglleft}
\newcommand{\rightguillsing}{\guilsinglright}
\newcommand{\dittomark}{\ensuremath{\text{\tt "}}}

%C-like +- -= *= /= ^= operators
\newcommand{\pluseq}{+{\mkern-9.6mu}=}
\newcommand{\minuseq}{-{\mkern-9.8mu}=}
\newcommand{\timeseq}{\times{\mkern-11mu}=}
\newcommand{\diveq}{\div{\mkern-9.8mu}=}
\newcommand{\slasheq}{/{\mkern-9.6mu}=}
\newcommand{\stareq}{\ast{\mkern-10mu}=}
\newcommand{\upeq}{\uparrow{\mkern-10mu}=}
\newcommand{\quoteeq}{\,\text{\textquotedblleft}{\mkern-4mu}={\mkern-4.5mu}\text{\textquotedblright}\,}
\newcommand{\xor}{\varoplus}
\newcommand{\xoreq}{\xor{\mkern-9.9mu}=}
\newcommand{\landeq}{\land{\mkern-10mu}=}
\newcommand{\loreq}{\lor{\mkern-10.4mu}=}

%C-like ++ -- operators
\newcommand{\plusplus}{  {\raise0.2ex\hbox{$\scriptstyle{+{\mkern-2mu}+}$}}}
\newcommand{\minusminus}{{\raise0.2ex\hbox{$\scriptstyle{-{\mkern-1mu}-}$}}}

%Convenient \Benumerate \Eenumerate etc commands.
%
%incorporates my attempt to fix LATEX article's disgusting spacing 
%in lists. (%Better might be to define new environments...)
%Setting \itemsep to 0 only partly fixes the problem...
%but now seems reasonably fixed after various addtolengths:
%
\newcommand{\Bitemize}{\vspace{-1.3ex}\begin{itemize}
 \setlength{\itemsep}{-\parsep/2}
 %\setlength{\itemsep}{0pt}
 \setlength{\topsep}{-\parskip}
 \addtolength{\parsep}{-\parsep/2} 
 \addtolength{\parskip}{-\parskip/2}
}
\newcommand{\Eitemize}{\end{itemize}}

\newcommand{\Bdingautolist}[1]{\vspace{-1.3ex}\begin{dingautolist}{#1}
 %\setlength{\itemsep}{-\value{parsep}/2}
 %\setlength{\itemsep}{0pt}
 \setlength{\itemsep}{-\parsep/2}
 \setlength{\topsep}{-\parskip}
 \addtolength{\parsep}{-\parsep/2} 
 \addtolength{\parskip}{-\parskip/2}
}
\newcommand{\Edingautolist}{\end{dingautolist}}

\newcommand{\Bdinglist}[1]{\vspace{-1.35ex}\begin{dinglist}{#1}
 \setlength{\itemsep}{-\parsep/2}
 %\setlength{\itemsep}{0pt}
 \setlength{\topsep}{-\parskip}
 \addtolength{\parsep}{-\parsep/2} 
 \addtolength{\parskip}{-\parskip/2}
}
\newcommand{\Edinglist}{\end{dinglist}}

\newcommand{\Benumerate}{\vspace{-1.3ex}\begin{enumerate}
 \setlength{\itemsep}{-\parsep/2}
 \setlength{\topsep}{-\parskip}
 %\setlength{\itemsep}{0pt}
 \addtolength{\parsep}{-\parsep/2} 
 \addtolength{\parskip}{-\parskip/2}
}
\newcommand{\Eenumerate}{\end{enumerate}}

\newcommand{\Bquote}{\begin{quote}
 \setlength{\itemsep}{-\parsep/2}
 \setlength{\topsep}{-\parskip}
 %\setlength{\itemsep}{0pt}
 \addtolength{\parsep}{-\parsep/2} 
 \addtolength{\parskip}{-\parskip/2}
}
\newcommand{\Equote}{\end{quote}}

\newcommand{\Bdescription}{\vspace{-2.1ex}\begin{description}
 \setlength{\itemsep}{-\parsep/2}
 \setlength{\topsep}{-\parskip}
 \addtolength{\parsep}{-\parsep/2} 
 \addtolength{\parskip}{-\parskip/2}
}
\newcommand{\Edescription}{\end{description}}

\newcommand{\Bcenter}{\vspace{-1.7ex}\begin{center}
 \setlength{\topsep}{-\parskip}
 %\vskip{-2ex}
}
\newcommand{\Ecenter}{\end{center}\vspace{-.7ex}}

\newcommand{\Bflushright}{\vspace{-1.7ex}\begin{flushright}
 \setlength{\topsep}{-\parskip}
 %\vskip{-2ex}
}
\newcommand{\Eflushright}{\end{flushright}\vspace{-.7ex}}

\newcommand{\Bflushleft}{\vspace{-1.7ex}\begin{flushleft}
 \setlength{\topsep}{-\parskip}
 %\vskip{-2ex}
}
\newcommand{\Eflushleft}{\end{flushleft}\vspace{-.7ex}}

\newcommand{\Bpicture}{\begin{picture}}
\newcommand{\Epicture}{\end{picture}}

\newcommand{\Balgorithm}{\begin{algorithmic}[1]}  %[5] would make every 5th line numbered
\newcommand{\Ealgorithm}{\end{algorithmic}}

\newcommand{\Btabbing}{\vspace{-1.5ex}\begin{tabbing}}
\newcommand{\Etabbing}{\end{tabbing}\vspace{-.7ex}}

\newcommand{\Balltt}{\vspace{-4.9ex}\begin{alltt}}
\newcommand{\Bverbatim}{\vspace{-4.9ex}\begin{verbatim}}
\newcommand{\Bverbatimstar}{\vspace{-4.9ex}\begin{verbatim*}}

\newcommand{\Bsectionstar}[1]{    %removes stupid extra whitespace
 \section*{#1}\vspace{-1.4ex}  %after section title in text
}

\newcommand{\Bsubsectionstar}[1]{
 \subsection*{#1}\vspace{-1.7ex}
}

\newcommand{\Bsubsubsectionstar}[1]{
 \subsubsection*{#1}\vspace{-1.7ex}
}

\newcommand{\Bsection}[1]{ %removes stupid extra whitespace in table of contents:
 \addtocontents{toc}{\protect{\vspace{-2.1ex}}} 
 \section{#1}\vspace{-1.4ex}  %...and after section title in text
}

\newcommand{\Bsubsection}[1]{
 \addtocontents{toc}{\protect{\vspace{-0.5ex}}} 
 \subsection{#1}\vspace{-1.7ex}
}

\newcommand{\Bsubsubsection}[1]{
 \addtocontents{toc}{\protect{\vspace{-0.5ex}}} 
 \subsubsection{#1}\vspace{-1.7ex}
}

%\ExtraFootnote[num]{text}
%will put a footnote with special symbol number num (=1-9)
%and given text here. Footnote numbering elsewhere is unaffected.
%
\newcommand{\ExtraFootnote}[2][]{%
\renewcommand{\thefootnote}{\fnsymbol{footnote}}%
\footnote[#1]{#2}%
\renewcommand{\thefootnote}{\arabic{footnote}}}

%\ExtraFootnoteMark{num}
%will put the footnote marker for special symbol number num (=1-9)
%here.  Footnote numbering elsewhere is unaffected.
%
\newcommand{\ExtraFootnoteMark}[1]{%
\renewcommand{\thefootnote}{\fnsymbol{footnote}}%
\footnotemark[#1]%
\renewcommand{\thefootnote}{\arabic{footnote}}}

%\ExtraFootnoteText{num}{text}
%will put a footnote with special symbol number num (=1-9) and given text
%at page bottom.  Footnote numbering elsewhere is unaffected.
%
\newcommand{\ExtraFootnoteText}[2][]{%
\renewcommand{\thefootnote}{\fnsymbol{footnote}}%
\footnotetext[#1]{#2}%
\renewcommand{\thefootnote}{\arabic{footnote}}}

%\footnotemark  will put usual numerical footnote marker here & increment
%\footnotetext{text}  will put footnote at page bottom

%From The LATEX companion p.75... but enotesize smaller...
\newcommand{\PutEndNotesHere}{
\begingroup
\setlength{\parindent}{0pt}\setlength{\parskip}{0.8ex}
\renewcommand{\enotesize}{\footnotesize\baselineskip=10pt }
\vspace{-3ex}
\Bsectionstar{End-Notes}
\addtocontents{toc}{\protect{\vspace{-2.1ex}}} 
\addcontentsline{toc}{section}{\numberline{}End-Notes}
\vspace{-6ex}
\theendnotes
\endgroup\par}
%One can cause all footnotes to be printed as endnotes by
%\renewcommand{\footnote}{\endnote}
%but also one could do a global replace.

% Define the \Bib environment to generate the references section
% This is to be used only when BibTex is NOT used.
%associated commands:
% \bibitem{CiteLabel}
% J.Q.Author: Title, Journal 54 (1992) 45-56.
%
% \cite{CiteLabel}
%
\newenvironment{Bib}{
%\Bsectionstar{References} already printed by itself, cannot erase theirs
\addtocontents{toc}{\protect{\vspace{-2.1ex}}} 
\addcontentsline{toc}{section}{\numberline{}References}
\begin{sloppypar}
\begin{thebibliography}{599}\footnotesize
}{
\end{thebibliography}
\end{sloppypar}
}

%Knuth TeXbook ex11.6 pp.67,311:
\newcommand{\textfrac}[2]{\ensuremath{%\leavemode
   \kern.1em \raise .5ex \hbox{\the\scriptfont0 #1}%
   \kern-.1em $/$%
   \kern-.15em \lower .25ex \hbox{\the\scriptfont0 #2}%
}}

%now do not need special spoce after TeX & LaTeX macros (corrects annoying bug):
\renewcommand{\TeX}{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\spacefactor1000\xspace}%

%Knuth TeXbook ex7.7 pp.40,308:
%\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}% ???\

