% frames.sth
% report style with frames
% HtX (1.0)  (c) 1997, Richard M. Salter
% Please read copyright and distribution agreement

%\input{report.sth}
\typeout{Substyle:  frames}
\seticondir{icons/}
\setlibdir{./}
\setappletdir{http://www.cs.oberlin.edu/~rms/applets/}
\base{}

\newenvironment{framesetdoc}[1][2]{
\begin{excursion}{#3}{w}
\mkp*{/head}
\ifdef[\mkp*[rows="#1"]{frameset}]{#1}
\ifdef[\mkp*[cols="#2"]{frameset}]{#2}}
{\mkp*{/frameset}\mkp*{/html}\end{excursion}}

\newenvironment{frameset}[0][2]{
\ifdef[\mkp*[rows="#1"]{frameset}]{#1}
\ifdef[\mkp*[cols="#2"]{frameset}]{#2}}
{\mkp*{/frameset}}

\newcommand{\frame}[1][2]{
\mkp*[name="#1" #2 src="#3"]{frame}
}

% Section, subsection, subsubsection with frames

\newcommand{\section}[1][1]{
\setbuf{sect}{Section: #2}
\ifthen {\or{\or{\numeq{\ctr{nav}}{2}}{\numle{\ctr{navlvl}}{0}}}
	    {\nonempty{#1}}}
	\ifdef[\header{2}{\bundle*{0}[#1]{|#2|}}]
	      [\header{2}{\bundle*{0}{#2}}]{#1}\par
\ifelse	\pghead{\header{3}{\buf{sect}}\par}
	\bundle{0}{#2}\setctr{pgdepth}{\depth}
	\pgfoot{\hr\address{\buf{me}}}
\endif}

\newcommand{\subsection}[1][1]{
\setbuf{subsect}{Subsection: #2}
\ifthen {\or{\or{\numeq{\ctr{nav}}{2}}{\numle{\ctr{navlvl}}1}}
	    {\nonempty{#1}}}
	\ifdef[\header{3}{\bundle*{1}[#1]{|#2|}}]
	      [\header{3}{\bundle*{1}{#2}}]{#1}\par
\ifelse	\pghead{\header{3}{\buf{sect}\break ...\buf{subsect}}\par}
	\bundle{1}{#2}\setctr{pgdepth}{\depth}
	\pgfoot{\hr\address{\buf{me}}}
\endif}

\newcommand{\subsubsection}[1][1]{
\setbuf{subsubsect}{Subsubsection: #2}
\ifthen {\or{\or{\numeq{\ctr{nav}}{2}}{\numle{\ctr{navlvl}}2}}
	    {\nonempty{#1}}}
	\ifdef[\header{3}{\bundle*{2}[#1]{|#2|}}]
	      [\header{3}{\bundle*{2}{#2}}]{#1}\par
\ifelse \pghead{\header{3}
	  {\buf{sect}\break ...\buf{subsect}\break
 ... ...\buf{subsubsect}}\par}
	\bundle{2}{#2}\setctr{pgdepth}{\depth}
	\pgfoot{\hr\address{\buf{11}}}
\endif}

\nobody
\title{\mainfileroot}
\outputon
\getbase
\mkp*{/head}
\rtoc{0:1:2:3}{itemize}[main]
\begin{frameset}[][30\pct,70\pct]\nl
\frame[contents]{\curfileroot tc.html}
\frame[main]{\curfileroot 0.html}
\end{frameset}
\begin{excursion}{\curfileroot tc}{w}
\preamb[ffffff]{Contents}
\header{2}{Contents}
\ifthen{\numeq{\pass}{2}}\input{\mainfileroot toc}\endif
\postamb
\end{excursion}
\robinsEggBlue
\bundle{0}{Title Page}
\outputoff
