\documentstyle[12pt]{book}  % -*- Mode:TeX -*-
 \pagestyle{headings}

 \setlength{\textwidth}{5.75in}
% \setlength{\oddsidemargin}{1.25in}
 \setlength{\oddsidemargin}{0.3in}    %don't comment out: it's not the same as 0.0in!!!
 \setlength{\evensidemargin}{0.2in}   %don't comment out: it's not the same as 0.0in!!!
 \setlength{\textheight}{8.25in} 
 \setlength{\topmargin}{0pt}
% see \topsep below: changed in a brute force way to waste less space around verbatims!


 \def\microskip{\vskip 0.1ex}
 \def\miniskip{\vskip 0.2ex}
 \def\noteskip{\smallskip}


\catcode`\@=11

%% To allow printing of 0 as a section (subsection, item, etc.) number
% \def\@arabic#1{\ifnum #1>0 \number #1\fi} % original definition
  \def\@arabic#1{\number #1} % my redefinition

%to change captions from normalsize to small size
\long\def\mycaption#1[#2]#3{\addcontentsline{\csname
  ext@#1\endcsname}{#1}{\protect\numberline{\csname 
  the#1\endcsname}{\ignorespaces #2}}\par
  \begingroup
    \@parboxrestore
    \small
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
  \endgroup}
\renewcommand\caption{\refstepcounter\@captype \@dblarg{\mycaption\@captype}}

\def\mychapter{\cleardoublepage
   \thispagestyle{plain}
   \global\@topnum\z@
   \@afterindentfalse
   \secdef\@chapter\@schapter}
\renewcommand\chapter{\mychapter}

\def\@mymakechapterhead#1{             % Heading for \chapter command
%  \noindent\today\par                %**** puts date on top of chapter, for proofing *** 3-24-86 TOMT
  \vspace*{50pt}                     % Space at top of text page.
  { \parindent 0pt \raggedright 
    \ifnum \c@secnumdepth >\m@ne     % IF secnumdepth > -1 THEN
      \huge\bf \@chapapp{} \thechapter % Print 'Chapter' and number.
      \par 
      \vskip 20pt \fi                  % Space between number and title.
    \Huge \bf                        % Title.
    #1\par 
    \nobreak                         % TeX penalty to prevent page break.
    \vskip 40pt                      % Space between title and text.
  } }
\def\@mymakeschapterhead#1{             % Heading for \chapter* command
%  \noindent\today\par                %**** 3-24-86 TOMT
  \vspace*{50pt}                     % Space at top of page.
  { \parindent 0pt \raggedright 
    \Huge \bf                        % Title.
    #1\par 
    \nobreak                         % TeX penalty to prevent page break.
    \vskip 40pt                      % Space between title and text.
  } }
\renewcommand\@makechapterhead{\@mymakechapterhead}
\renewcommand\@makeschapterhead{\@mymakeschapterhead}

% change section headings to lowercase

\def\ps@headings{\def\@oddfoot{}\def\@evenfoot{}%       No feet.
\def\@evenhead{\rm \thepage\hfil \sl \leftmark}%        Left heading.
\def\@oddhead{\hbox{}\sl \rightmark \hfil \rm\thepage}% Right heading.
\def\chaptermark##1{\markboth {\ifnum \c@secnumdepth >\m@ne
      \@chapapp\ \thechapter. \ \fi ##1}{}}%
\def\sectionmark##1{\markright {\ifnum \c@secnumdepth >\z@
   \thesection. \ \fi ##1}}}
\pagestyle{headings}

\def\tableofcontents{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
 \fi\chapter*{Contents\markboth{Contents}{Contents}}
 \@starttoc{toc}\if@restonecol\twocolumn\fi}
\def\l@part#1#2{\addpenalty{-\@highpenalty}
 \addvspace{2.25em plus 1pt} \begingroup
 \@tempdima 3em \parindent \z@ \rightskip \@pnumwidth \parfillskip
-\@pnumwidth 
 {\large \bf \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
 \nobreak \endgroup}

% TTY FORMATS

%\id is like \verb, but inserts some space before and after text

\def\idpad{$\;$}
\def\id{\idpad\begingroup \tt \let\do\@makeother \dospecials 
          \@ifstar{\@sid}{\@id}}
\def\@sid#1{\def\@tempa ##1#1{##1\endgroup\idpad}\@tempa}
\def\@id{\obeyspaces \frenchspacing \@sid}

%\redefine verbatim to use \small size
%\def\verbatim{\@verbatim \small\tt \frenchspacing\@vobeyspaces \@xverbatim}
%vs. \def\verbatim{\@verbatim \frenchspacing\@vobeyspaces \@xverbatim}

\topsep 4pt plus 1 pt minus 1 pt  %    9pt plus 3pt minus 5pt

\catcode`\@=12

%arguments for control-panel commands
\newcommand{\narg}[1]{\idpad{\tt #1}\,}
\newcommand{\targ}[1]{\,{\tt #1}\idpad}

 \catcode`\~=11 \newcommand{\mytilde}{~}  \catcode`\~=13
 \catcode`\$=11 \newcommand{\mydollar}{$} \catcode`\$=3
 \catcode`\_=11 \newcommand{\myunder}{_} \catcode`\_=8

\newcommand{\prog}[1]{{\tt \idpad#1\idpad}} % tty word padded

%% INDEX STUFF (see also DIAGNOSTICS)
%%      Uses slightly modified Rivest's windex macros
\input{/usr/tt/cam6/soft/mywindex.tex}

%% DIAGNOSTICS

%               \WARN{<text>} prints <text> as a large-size marginal note, and as a message preceded
%               by `WARNING: ' on the terminal and log file.
\def\WARN#1{\marginpar{{\large#1}}\message{WARN: #1}}


% DATA FOR FIGURES

 \setcounter{totalnumber}{5}
 \renewcommand{\textfraction}{0.2}

 \newcommand{\figurespace}[3]{% label, height, caption
 \begin{figure}[htb]
  \hbox{\vrule height#2}
  \caption{#3}
 \label{#1}
 \end{figure}                 }


% Used for Forth-screen figures
\def\scrn{5.125in} %12pt % size of 64 \tt chars in \small type

% Plain text macros

\let\em=\sl

\newcommand{\by}{$\times$}
\newcommand{\cam}{{\sc cam}}
\newcommand{\Cam}{{\sc Cam}}
\newcommand{\cama}{{\sc cam-a}}
\newcommand{\camb}{{\sc cam-b}}
\renewcommand{\pc}{{\sc pc}}
\newcommand{\cp}{control panel}
\newcommand{\cxp}{control-panel}
\def\cambook{{\sl CAM Book}}
\def\hm{{\sl Hardware Manual}}
\def\cf#1{[\cambook\ #1]}

\sloppy




