%% This file prints out the documentation for xcomment.sty by
%% setting up a few things and then inputting xcomment.doc.
%% You must have Frank Mittelbach's newdoc.sty, doc.sty, and
%% multicol.sty. These are available from ymir.claremont.edu
%% in [anonymous.tex.inputs.latex-mainz], and from other archives.
%% While you are at it, you might as well get the whole Mainz
%% distribution.
%%
%% This requires LaTeX, with or without the New Font Selection
%% Scheme.

\documentstyle[newdoc]{article}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% The next section defines a few font related commands if the
%% new font selection scheme is in force.
%%
%% Additionally you have to use the oldlfont option because this was
%% written for the old LaTeX.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\makeatletter

\ifx \selectfont\undefined \else
 
\newcommand{\tensl}
  {\family{cmr}\series{m}\shape{sl}\size{10}{12pt}\selectfont}

\new@mathgroup\ttfam
\new@internalmathalphabet\mathtt\ttfam{cmtt}{m}{n}
\def\ptt{\family\ttdefault
    \series\default@series
    \shape\default@shape\selectfont\mathtt}
\fi

\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  The next few lines are for those with a new TeX 3.0 to ensure
%%  that hyphenation etc. is done correctly.
%%
 
\ifx \lefthyphenmin\undefined \else
 \lefthyphenmin=2
 \righthyphenmin=3
 \errorcontextlines=1
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  Now we are changing a few parameters for our own purposes
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%  \onecolumn
\sloppy
\setlength{\columnsep}{1.5pc}        % space between columns
\setlength{\columnwidth}{18.75pc}    % width of each column
\setlength{\parindent}{20pt}         % paragraph indent
\setlength{\parskip}{0pt}            % no inter-paragraph space
\setlength{\leftmargini}{2em}        % unchanged
\setlength{\leftmarginv}{.5em}       % unchanged
\setlength{\leftmarginvi}{.5em}      % unchanged
\setlength{\oddsidemargin}{0pt}      % was 42pt
\setlength{\evensidemargin}{0pt}     % was 84pt
\setlength{\topmargin}{-2.5pc}       % was 0pt
\setlength{\headheight}{12pt}        % height of running head, unchanged
\setlength{\headsep}{20pt}           % distance between header and text
\setlength{\marginparwidth}{70pt}    % Big enough for using DescribeMacro.
\setlength{\marginparsep}{10pt}      %  in TUGboat
\setlength{\textheight}{54pc}        % height of text on page
\setlength{\textwidth}{39pc}         % total width of a page
\twocolumn              % two columns %FMi placed after setting of \textwidth

 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  And finally some definitions for the doc style
%%  to get this special article right.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\catcode`\@=11
\def\section{\@startsection {section}{1}{\z@}{-8pt}{4pt}%
        {\normalsize\bf\raggedright}}

\def\subsection{\@startsection{subsection}{2}{\z@}{-8pt}{4pt}%
        {\normalsize\bf\raggedright}}

\def\subsubsection
        {\@startsection{subsubsection}{3}{\z@}{-8pt}{4pt}{\normalsize\bf}}

\def\@maketitle{\newpage
 \null
 \begin{center}
 {\Large\bf \@title \par} \vskip 1.2em {\lineskip .5em
\begin{tabular}[t]{c}\@author 
 \end{tabular}\par} 
 \vskip .8em {\@date} \end{center}
 \par
 \vskip .5em} 

\catcode`\@=12

\def\expanddate#1/#2/#3/{\number#3{} \month=#2 \ifcase\month\or
  January \or February \or March \or April \or May \or June \or
  July \or August \or September \or October \or November \or December \fi
  19#1}
\def\thedocdate{\expandafter\expanddate\docdate/}
\date{\thedocdate}
\pagestyle{myheadings}              % Don't want TUGboat headings.

\def\abstract{
  \section*{abstract}
}
\def\endabstract{}

\newcommand{\SelfDocumenting}{%
  \setlength{\textwidth}{31pc}
  \onecolumn
  \setlength{\parindent}{0pt}
  \setlength{\parskip}{2pt plus 1pt minus 1pt}
  \setlength{\oddsidemargin}{8pc}
  \setlength{\evensidemargin}{8pc}}

\setcounter{IndexColumns}{2}               % two column index
 
\renewcommand{\theCodelineNo}{{\rm\tiny\arabic{CodelineNo}}}

\MakeShortverb{\|}
 
\DisableCrossrefs                         % No Cross references
%\EnableCrossrefs
 
%\OnlyDescription                         % Full article
 
%\RecordChanges                           % Do not print changes
 
\CodelineIndex                            % Code lines numbered
 
% INDEX STUFF
\DoNotIndex{\ ,\!,\[,\\,\],\^,\`,\{,\},\~}
\DoNotIndex{\@ifundefined,\@namedef,\@spaces,\@tempa,\@tempb}
\DoNotIndex{\@warning,\active}
\DoNotIndex{\begingroup,\catcode,\char,\csname,\def,\do}
\DoNotIndex{\docdate,\dospecials,\edef,\else,\endcsname,\endgroup}
\DoNotIndex{\expandafter,\fi,\filedate,\fileversion}
\DoNotIndex{\gdef,\if,\ifcat}
\DoNotIndex{\ifx,\immediate,\lccode,\let}
\DoNotIndex{\lowercase,\next,\noexpand}
\DoNotIndex{\relax,\space,\the}
\DoNotIndex{\toks@,\typeout,\write}

\SelfDocumenting
\begin{document}
  \DocInput{xcomment.doc}
  \newpage
  \PrintIndex                           \end{document} 
\end{document}