\typeout{NSF proposal format sub-style -- 1996-09-24}

% Set some reasonable page dimensions -- 1" on each side
\addtolength{\textwidth}{1.0in}
\addtolength{\oddsidemargin}{-0.50in}
\addtolength{\textheight}{1.50in}
\addtolength{\topmargin}{-0.75in}

% Only number chapters and sections
\setcounter{secnumdepth}{2}

%%% Redfine chapter headings so they don't take up so much space!

\def\@makechapterhead#1{ { \parindent 0pt \raggedright
 \ifnum \c@secnumdepth >\m@ne \huge\bf \@chapapp{} \thechapter. 
 \fi \Huge \bf #1\par
 \nobreak \vskip \baselineskip } }
   
\def\@makeschapterhead#1{ { \parindent 0pt \raggedright
 \Huge \bf #1\par
 \nobreak \vskip 40pt } }
  
\renewcommand{\thechapter}{\Alph{chapter}}
\renewcommand{\chaptername}{}

% The following is from manual.sty, which is in turn based on report.sty
% This fragment, with the help of a new definition of the chapter itself,
% allows pages to be numbered <chapter>-<page in chapter> by defining
% a "bychapter" pagenumbering.

\newcounter{lastchapage}\newcounter{chapage}\newcounter{chapnumber}
\def\bychapter#1{\@bychapter{\@nameuse{c@#1}}}

% Modified by DEB to respect the formatting specified by \thechapter
% rather than simply use \thechapnumber
\def\@bychapter#1{\ifnum\c@chapnumber<1 \else\thechapter{-}\thechapage\fi}

\pagenumbering{bychapter}

%
%       PRINT SELECTED PAGES
%
%     Create a file pages.tex which contains the pages you want printed, one
% per line, in the order they will be generated.  After the last page number
% has been matched, all further pages will be printed.  If you only want to
% print the pages listed, put -999999999 as the last page number in the file.
%
% From TUGboat, Volume 8 (1987), No. 2, page 217 (with TeX \pageno replaced
% by LaTeX \c@page):
%
\let\Shipout=\shipout
\newread\pages \newcount\nextpage \openin\pages=pages
\def\getnextpage{\ifeof\pages\else
 {\endlinechar=-1\read\pages to\next
  \ifx\next\empty % in this case we should have eof now
  \else\global\nextpage=\next\fi}\fi}
\ifeof\pages\else\message{PAGES.TEX found, generating only the requested pages!}
 \getnextpage\fi
\def\shipout{
\setcounter{chapage}{\c@page}
\addtocounter{chapage}{-\value{lastchapage}}
\message{(\thechapnumber-\thechapage)}
 \ifeof\pages\let\next=\Shipout
 \else\ifnum\c@page=\nextpage\getnextpage\let\next=\Shipout
  \else\let\next=\Tosspage\fi\fi \next}
\newbox\garbage \def\Tosspage{\deadcycles=0\setbox\garbage=}

% From man12.sty (allows pages to be numbered chap-page_in_chap)
\def\chapter{\cleardoublepage
\setcounter{lastchapage}{\value{page}}
\addtocounter{lastchapage}{-1}
\thispagestyle{plain} \global\@topnum\z@
\@afterindentfalse \secdef\@chapter\@schapter} 
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
 \ifnum\c@chapnumber>\c@chapter \def\thechapnumber{\Alph{chapnumber}}\fi
 \refstepcounter{chapter}
 \setcounter{chapnumber}{\c@chapter}
 \typeout{\@chapapp\space\thechapter.}
 \addcontentsline{toc}{chapter}{\protect
 \numberline{\thechapter}#1}\else
 \addcontentsline{toc}{chapter}{#1}\fi
 \chaptermark{#1}
 \addtocontents{lof}{\protect\addvspace{10pt}}
\addtocontents{lot}{\protect\addvspace{10pt}} \if@twocolumn
\@topnewpage[\@makechapterhead{#2}] 
 \else \@makechapterhead{#2}
 \@afterheading \fi} 
\def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}]
 \else \@makeschapterhead{#1} 
 \@afterheading\fi}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% thebibliography environment from report.sty, 
% but with \chapter* --> \chapter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\thebibliography#1{\chapter{\bibname\@mkboth
  {\uppercase{\bibname}}{\uppercase{\bibname}}}\list
  {\@biblabel{\arabic{enumiv}}}{\settowidth\labelwidth{\@biblabel{#1}}%
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \usecounter{enumiv}%
    \let\p@enumiv\@empty
    \def\theenumiv{\arabic{enumiv}}}%
    \def\newblock{\hskip .11em plus.33em minus.07em}%
    \sloppy\clubpenalty4000\widowpenalty4000
    \sfcode`\.=\@m}
