%
% \begin{topics}{template} ... \end{topics}
% used like enumerate, itemize, description environments
% The item[] is never optional!
%
\newcommand{\topicslabel}[1]{#1\hfil}
\def\@topics#1#2{% #2=right column template
    \begin{list}{}{%
      \let\makelabel\topicslabel
      \parsep=0.1ex plus 0.1ex minus 0.1ex
      \parskip=0.1ex
% Compute size of left column labels from #1 template
      \settowidth{\labelwidth}{\topicslabel{#1}}%
      \setlength{\leftmargin}{\labelwidth}%
      \addtolength{\leftmargin}{\labelsep}%
% next line indents environment left by 2ex.
      \advance\leftmargin by 2ex\relax
% next line indents environment right by 2ex.
      \advance\rightmargin by 2ex\relax
% process right column template, which may be null.
      \settowidth{\itemindent}{#2}%% \itemindent=scratch register
      \ifdim\itemindent>\z@\relax
        \addtolength{\itemindent}{\leftmargin}%
        \addtolength{\itemindent}{\rightmargin}%
        \addtolength{\itemindent}{-\linewidth}%
        \ifdim \itemindent<\z@\relax
        \addtolength{\labelwidth}{-\itemindent}%
        \addtolength{\leftmargin}{-\itemindent}\fi
      \fi
      \itemindent=0ex% reset register
} }
% required LaTeX2e argument #2=left column template
% optional LaTeX2e argument #1=right column template
\newenvironment{topics}[2][]{\@topics{#2}{#1}}{\leftmargin=0in\end{list}}
%
\newdimen\DEtrash % used below as trash dimension
\long\def\TopicsRightBox#1{%
%\parbox[t]{\linewidth}{\sloppy #1}
\begin{minipage}[t]{\linewidth}{\sloppy #1}\end{minipage}\hfill
}
\long\def\TopicsLeftBox#1{%
\DEtrash=\labelwidth
\advance\DEtrash by -\labelsep
\begin{minipage}[t]{\DEtrash}{\sloppy #1}\end{minipage}\hfill
}
\long\def\Writeup#1#2{%
\item[{\sf #1}]%
{\sf \TopicsRightBox{#2}}%
}
