\def\strong#1{{%
\def\emph##1{{\bi{}##1}}%
\bf{}#1%
}}
\def\emph#1{{%
\def\strong##1{{\bi{}##1}}%
\it{}#1%
}}

\def\N{{\bb N}}
\def\R{{\bb R}}
\def\E{{\bb E}}
\def\O{{\cal O}}
\def\SYM{{\rm SYM}}
\def\frac#1#2{{{#1} \over {#2}}}

\def\superscript#1{$^{\hbox{\settextsize{0.8\textsize}#1}}$}
\def\subscript#1{$_{\hbox{\settextsize{0.8\textsize}#1}}$}
\newcount\fncount
\fncount=1
\def\fnmark{$^{\the\fncount}$}
\def\fn#1{\footnote\fnmark{#1}\advance\fncount by 1}
\def\section#1#2{
	\vfil\supereject
	\vbox{\settextsize{20}\bf #1\kern 1em\relax#2%
	\addtoc\tocsection{#1}{}{#2}%
	}\nobreak\vskip 12pt
}
\def\subsection#1#2{
	\vskip 12pt\vbox{\settextsize{18}\bf #1\kern 1em\relax#2%
	\addtoc\tocsubsection{#1}{}{#2}%
	}\nobreak\vskip 7pt
}
\def\subsubsection#1#2{
	\vskip 10pt\vbox{\settextsize{16}\bf #1\kern 1em\relax#2%
	\addtoc\tocsubsubsection{#1}{}{#2}%
	}\nobreak\vskip 6pt
}
\def\subsubsubsection#1#2{
	\vskip 8pt\vbox{\settextsize{14}\bf #1\kern 1em\relax#2}\nobreak\vskip 5pt
}
\def\subsubsubsubsection#1#2{
	\vskip 7pt\vbox{\settextsize{12}\bf #1\kern 1em\relax#2}\nobreak\vskip 5pt
}
\def\subsubsubsubsubsection#1#2{
	\vskip 7pt\vbox{\settextsize{12}\bf #1\kern 1em\relax#2}\nobreak\vskip 5pt
}
\long\def\blockquote#1{\vskip\lineskip\vskip\parskip\hbox{\vrule\hskip5pt\vbox{#1}}}
\def\strikeout#1{FIXME: Strikeout not implemented}
\def\underline#1{FIXME: Underline not implemented}


\def\mathbb#1{\hbox{\bb #1}}

\def\unparskip{\vskip-\parskip}

\catcode`@=11
\def\vecoverrightarrow#1{\mathpalette\vecoverrightarrowtmp{#1}}
\def\vecoverrightarrowtmp#1#2{\vbox{\m@th\ialign{##\crcr
      \vecrightarrowfill\crcr\noalign{\kern-\p@\kern 0.09em\nointerlineskip}
      $\hfil#1{#2\,}\hfil$\crcr}}}
\def\vecrightarrowfill{$\settextsize{5}\m@th\smash-\mkern-7mu%
  \cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill
  \settextsize{5}\mkern-7mu\mathord\rightarrow$}
\catcode`@=12


\long\def\linemarkup#1#2{%
\par\noindent\hbox{%
	\hbox{}\hskip -6pt {\colorlocal{#1}\vrule width 1pt \hskip 5pt}%
	\hbox to \hsize{\vbox{#2}\hfil}%
	%\hbox{}\hskip 5pt {\colorlocal{#1}\vrule width 1pt \hskip -6pt}%
}\par%
}
