% $Id: pretzeldoc.sty,v 1.2 1997/07/09 10:39:11 gaertner Exp $
%
% Package containing global macros for the documentation of the
% pretzel project (both source code and user documentation).

% identification:
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pretzeldoc}[1996/03/07]
%
% initial code:
%
% declaration of options:
%
% execution of options:
%
% package loading:
\RequirePackage{a4}
\RequirePackage{makeidx}
%\RequirePackage{showidx}   % bites in Pretzelbook
\RequirePackage{moreverb}
\RequirePackage{multicol}
\RequirePackage{pretzel-latex}
                                        %
% main code:


%
% some logos
%

\def\WEB{{\tt WEB}}
\def\CWEB{{\tt CWEB}}
\def\TANGLE{{\tt TANGLE}}
\def\WEAVE{{\tt WEAVE}}
\def\pretzel{{Pretzel}}
\newcommand{\noweb}{{\tt noweb}}
\newcommand{\HTML}{{\sc HTML}}

\def\CTANGLE{{\tt CTANGLE}}
\def\CWEAVE{{\tt CWEAVE}}
\def\C{{\sc C}}
\def\CPP{{\C\raise1pt\hbox{++}}}

\def\ALGOL{{\sc Algol}}
\def\LISP{{\sc Lisp}}
\def\PASCAL{{\sc Pascal}}
\def\UNIX{{\sc UNIX}}

\def\t#1{{\tt #1}} % short form for typewriter style



% macros for formatting the examples


\newenvironment{inp}{%  % input of an example
  \flushleft                    % examples are flushed left
  \leftskip 1em                 % but indented a bit
  \catcode`\_=12                % typeset underlines
  \tt                           % use typewriter type
  }{%
  \endflushleft
  }

\newcount\ind % counter for counting amount of indentation

\newenvironment{outp}{% % output of prettyprinted text
  \flushleft
  \leftskip 1em
  \sfcode`;=3000                % a `;' acts like a period
  \pretolerance=10000           % no second pass for paragraph makeup
  \hyphenpenalty 10000 \exhyphenpenalty 10000 % no hypenation
  \global\ind=0                 % reset indentation
  \hangindent=\ind em           % standard left indentation for rest of para
  \hangafter=0                  % align all lines
  \parindent=0pt                % no extra para indentation
  \noindent\kern \ind em        % get into horizontal mode
  \ignorespaces
  }{%
  \endflushleft
  }

\def\id#1{\mbox{\it#1\/}} % identifiers in italics
\def\fmt#1{\mbox{\it #1\/}} % format commands also
\def\res#1{\mbox{\bf #1}} % reserved words in boldface
\def\ass{\mbox{${}\mathrel{:=}{}$}} % assignment operator
%\def\andsign{\mbox{$\wedge$}} % and sign
\def\andsign{\res{and}}
\def\myindent{\advance\ind by1} % indent
\def\myoutdent{\advance\ind by-1} % outdent
\def\myforce{\par\noindent\kern\ind em} % forced line break
\def\mybackup{\hspace{-1em}} % backup one em



%
% $Log: pretzeldoc.sty,v $
% Revision 1.2  1997/07/09 10:39:11  gaertner
% use \def instead of \newcommand for pretzel logo in case
% it's already defined.
%
% Revision 1.1  1996/03/07  17:28:09  gaertner
% Initial revision
%
%
%
