% report.sth % HtX (1.0b) (c) 1995, Richard M. Salter % Please read copyright and distribution agreement \typeout{Style: report} \typeout{Source File: \curfileroot} \typeout{Current Directory: \getwd} \typeout{Base: \getbase} \typeout{Key File: \buf{keyholef}} \typeout{Date: \buf{date}} %\base{http://www.cs.indiana.edu\getrd/} %\base{file:///\getwd/} \newbuf{sect}\newbuf{subsect}\newbuf{subsubsect}\newbuf{navtxt} \newbuf{lsect}\newbuf{lsubsect}\newbuf{lsubsubsect} \newctr{nav}\clrctr{nav}\newctr{pgdepth}\clrctr{pgdepth} \newctr{navlvl}\setctr{navlvl}{100} \newctr{fig}\clrctr{fig} \newcommand{\navigatebrief}{\setctr{nav}{1}} \newcommand{\navigatefull}{\clrctr{nav}} \newcommand{\navigateflat}{\setctr{nav}{2}} \newcommand{\flatsection}{\clrctr{navlvl}} \newcommand{\flatsubsection}{\setctr{navlvl}1} \newcommand{\flatsubsubsection}{\setctr{navlvl}2} \newbuf{sectoc}\setbuf{sectoc}{0:1:2:3} % Section, subsection, subsubsection \newcommand{\section}[1][1]{ \ifthen {\topofbundle0} \toc{\buf{sectoc}}{\header{2}{Contents}}{itemize}\par \endif \setbuf{sect}{Section: #2} \ifthen {\or{\or{\numeq{\ctr{nav}}{2}}{\numle{\ctr{navlvl}}{0}}} {\samestr{#1}{s}}} \header{2}{\bundle*{0}{#2}}\par \elseif {\numeq{\ctr{nav}}{1}} \pghead{\header{3}{\buf{sect}}\par} \bundle{0}{#2}\setctr{pgdepth}{\depth}\nnav \pgfoot{\hr\address{\buf{me}}} \ifelse \pghead{\setctr{pgdepth}{\depth}\context[-2][]["100 \pct"] [\header{3}{Section:\\\mkp*{ul} #2}]\par} \bundle{0}{#2} \pgfoot{\hr\address{\buf{me}}} \endif} \newcommand{\section*}[1][1]{ \section[#1]{#2} \setbuf{lsect}{\buf{sect}} \ifthen {\numeq{\ctr{nav}}{1}} \pgfoot{\hr\buf*{navtxt}\address{\buf{me}}} \ifelse \pgfoot{\context[-2][]["100 \pct"][][\buf{lsect}] \par\address{\buf{me}}} \endif} \newcommand{\subsection}[1][1]{ \ifthen {\topofbundle1} \toc{1:2}{\header{2}{Subsection(s)}}{directory} \endif \setbuf{subsect}{Subsection: #2} \ifthen {\or{\or{\numeq{\ctr{nav}}{2}}{\numle{\ctr{navlvl}}1}} {\samestr{#1}{s}}} \header{3}{\bundle*{1}{#2}}\par \elseif {\numeq{\ctr{nav}}{1}} \pghead{\header{3}{\buf{sect}\break ...\buf{subsect}}\par} \bundle{1}{#2}\setctr{pgdepth}{\depth}\nnav \pgfoot{\hr\address{\buf{me}}} \ifelse \pghead{\setctr{pgdepth}{\depth}\context[-2][]["100\pct"] [\header{3}{Subsection:\\\mkp*{ul} #2}][]\par} \bundle{1}{#2} \pgfoot{\hr\address{\buf{me}}} \endif} \newcommand{\subsection*}[1][1]{ \subsection[#1]{#2} \setbuf{lsubsect}{\buf{subsect}} \ifthen {\numeq{\ctr{nav}}{1}} \pgfoot{\hr\buf*{navtxt}\address{\buf{me}}} \ifelse \pgfoot{\context[-2][]["100\pct"][][\buf{lsubsect}] \par\address{\buf{me}}} \endif} \newcommand{\subsubsection}[1][1]{ \ifthen {\and{\topofbundle2}{\not{\samestr{#1}{S}}}} \toc{2}{\header{2}{Subsubsection(s)}}{directory} \endif \setbuf{subsubsect}{Subsubsection: #2} \ifthen {\or{\or{\numeq{\ctr{nav}}{2}}{\numle{\ctr{navlvl}}2}} {\or{\samestr{#1}{s}}{\samestr{#1}{S}}}} \header{3}{\bundle*{2}{#2}}\par \elseif {\numeq{\ctr{nav}}{1}} \pghead{\header{3} {\buf{sect}\break ...\buf{subsect}\break ... ...\buf{subsubsect}}\par} \bundle{2}{#2}\setctr{pgdepth}{\depth}\nnav \pgfoot{\hr\address{\buf{11}}} \ifelse \pghead{\setctr{pgdepth}{\depth}\context[-2][]["100\pct"] [\header{3}{Subsubsection:\\\mkp*{ul} #2}][]\par} \bundle{2}{#2} \pgfoot{\hr\address{\buf{11}}} \endif} \newcommand{\subsubsection*}[1][1]{ \subsubsection[#1]{#2} \setbuf{lsubsubsect}{\buf{subsubsect}} \ifthen {\numeq{\ctr{nav}}{1}} \pgfoot{\hr\buf*{navtxt}\address{\buf{11}}} \elseif \pgfoot{\context[-2][]["100\pct"][][\buf{lsubsubsect}] \par\address{\buf{me}}} \endif} \newcommand{\topofbundle}[1]{\numle{\depth}{#1}} \newcommand{\nnav}{ \setctr0{\depth} \setctr1{\minus{\ctr0}{1}} \setbuf5{\path{\ctr0}} \setbuf6{\epath{\ctr1}} \setctr2{\bunidx{\ctr1}} \setbuf{navtxt}{ \link{@c\filenum 0}{\image[top][up]{\icondir contents.gif}} Contents\nl} \ifthen {\numgt{\ctr1}{0}} \setbuf{navtxt}{\buf*{navtxt} \link{\bunstring{\buf6}}{\image[top][up]{\icondir up.gif}} \substr{0}{8}{\button{\buf6}}\ldots\nl} \endif \setbuf7{\path{\ctr1}{\minus{\ctr2}{1}}} \ifthen {\numgt{\ctr2}{0}} \setbuf{navtxt}{\buf*{navtxt} \link{\bunstring{\buf7}}{\image[top][back]{\icondir back.gif}} \substr{0}{8}{\button{\buf7}}\ldots\nl} \endif \setbuf7{\epath{\ctr1}{\plus{\ctr2}{1}}} \setbuf8{\button{\buf7}} \ifthen {\nonempty{\buf8}} \setbuf{navtxt}{\buf*{navtxt} \link{\bunstring{\buf7}}{\image[top][forward]{\icondir forward.gif}} \substr{0}{8}{\buf8}\ldots\nl} \endif\buf*{navtxt}\hr} % abstract \newenvironment{abstract}{ \header{2}{Abstract} \mkp*[size=-1]{font}\begin{quote}} {\end{quote}\mkp*{/font}} % figure \newenvironment{figure}[0][1]{ \incctr{fig}\begin{center}\anchor{@fig@\ctr{fig}}{\hr[noshade]}} {\end{center}\hr[noshade]} \newcommand{\caption}[1]{\header{5}{Figure \ctr{fig}: #1}} \newcommand{\flabel}[1]{\label*{#1}{\ctr{fig}}} \newcommand{\fref}[1]{\setctr0{\ref{#1}}\link{@fig@\ctr0}{Figure \ctr0}} % initialization \newkeyhole[\mainfileroot\/ Key][fffff5]{\curfileroot key} % end of report.sth