  % -*- Mode:TeX -*-
%% MACROS FOR HARDWARE MANUAL

\documentstyle[12pt]{book}
 \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!

\catcode`\@=11

%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}

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

\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}}

\sloppy



\let\sym\sf	    % symbols done in sans serif
%\let\sym\tt	    % symbols done in \tt
\let\hex\tt	    % hex numbers done in \tt
\def\usedex#1{#1\index{#1}}		% use a word and index it
%\def\symdex#1{\usedex{{\sym #1}}}	% use a symbol and index it
\def\symdex#1{{\sym #1}\index{#1{\sym #1}}}	% use a symbol and index it
%\def\locextdex#1{\symdex{#1}\index{{\sym #1LOC}}\index{{\sym #1EXT}}}
\def\locextdex#1{\symdex{#1}\index{#1LOC{\sym #1LOC}}\index{#1EXT{\sym #1EXT}}}
					% use a symbol and index it plus its
					% -loc and -ext versions

\tracingstats=2
