

%% July 2, 1993
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Edited Book Style                                                    %%
%% Kluwer Academic Publishers                                           %%
%%                                                                      %%
%% Prepared by Amy Hendrickson, TeXnology Inc.                          %%
%%                                                                      %%
%% Inquiries to Suzanne M. Rumsey, net address: prod@world.std.com      %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% This file is to be used in conjunction with kluwerbk.sty, for
%% edited books of articles.

%% Start your file with either
      %\documentstyle[psfonts,editedbk]{kluwerbk}  or
      %\documentstyle[editedbk]{kluwerbk}
%%
%% Documentation is in editedbk.doc.

\def\authortitlepage{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
 \else \newpage \fi \thispagestyle{empty}\c@page\z@
\null\vskip-6pc
\vbox to\textheight{\parskip=0pt
\hrule height 1.5pt\vskip24pt
\hyphenpenalty=10000 % No hyphenation in chapter heads
\parfillskip=0pt
\bigraggedleft
{\Huge\authortitlepagefont{\def\\ {\vskip\parskip}\titlepagetitle}

}
\normalsize
\vskip24pt
\hrule height 1.5pt
\vskip36pt
{\affilfont EDITED BY}
\vskip2pt
\advance \authorcount by1 
\loopcount=1
\loop\expandafter\ifnum\loopcount<\authorcount
\ifnum\loopcount=1 \vskip18pt\else
\vrule height 12pt width12pt depth0pt\vskip12pt\fi
{\authorfont\csname theauthor\the\loopcount\endcsname}\vskip3pt
{\affilfont\csname theaffil\the\loopcount\endcsname}\vskip6pt
{\affilfont\csname theloc\the\loopcount\endcsname}
\vskip12pt \global\advance\loopcount by1 \repeat
\vfill
\theimprint
}
\newpage}


\def\TOCauthor#1{\def\thetocauthor{#1}}
\let\TOCauthors\TOCauthor

\newbox\articlebox

{\obeylines
\gdef\articleauthor{\bgroup\obeylines\xarticleauthor}
\gdef\xarticleauthor#1{\global\setbox\articlebox=\vbox\bgroup%
{\parskip=4pt%
\parfillskip=0pt\obeylines\everypar={\hskip0pt plus 1fil\relax}%
\sectionfont #1

}}


\gdef\articleaffil{\bgroup\obeylines\def\\
{\vskip12pt}%
\xarticleaffil}
\long\gdef\xarticleaffil#1{\vskip12pt%
{\parskip=1pt%
\parfillskip=0pt\obeylines\everypar={\hskip0pt plus 1fil\relax}%
\relax\it#1

}
\egroup\egroup\egroup}}

\def\abstract{\section*{ABSTRACT}\small}
\def\endabstract{}

%%% Code for contributorpage ==>
\def\keepblankline{\futurelet\next\lookatline}

{\obeylines
\gdef\lookatline{\ifx\next\keepblankline%
\let^^M\seewhatisnext%
\else%
\let^^M=\keepblankline%
\vskip1sp\let\go\relax\fi\go}

\gdef\seewhatisnext{\futurelet\next\lookforend}
\gdef\lookforend{\ifx\next\end\let\go\relax\else\let\go\xlookatline\fi\go}

\gdef\xlookatline{\let^^M=\keepblankline%
\iffirstcontrib\global\firstcontribfalse%
\let\go\firstblankline\else%
\goodbreak\vskip\baselineskip%
\let\go\everyblankline\fi\go}
}


\newif\iffirstcontrib
%\firstcontribtrue
\newif\ifnothinghere

{\obeylines
\gdef\everyblankline#1^^M{\egroup\ifnothinghere\global\nothingherefalse%
\else\vbox{\unvbox0}\fi%
\global\setbox0=\vbox\bgroup\noindent{\bf #1}\vskip1pt}%

\gdef\firstblankline#1^^M{%
\def\one{#1}%
\ifx\one\empty\relax\global\nothingheretrue%
\bgroup\else%
\global\setbox0=\vbox\bgroup\noindent{\bf #1}\vskip1pt%
\fi\def\firstblankline{\everyblankline}}

\gdef\contributorpage{\obeylines\xcontributorpage}

\long\gdef\xcontributorpage{\newpage
\bgroup
\thispagestyle{empty}
\twocolumn[
\vbox to 7.5pc{\hrule height 1.5pt
\hyphenpenalty=10000 % No hyphenation in chapter heads
\vskip12pt\vskip-\parskip
\def\\ {\vskip-\parskip}\parfillskip=0pt
\LARGE\bigraggedleft
\chaptitle\uppercase{CONTRIBUTORS}\vskip1sp\vfill}]\small%
\parskip=0pt%
\obeylines%
\let^^M=\keepblankline%
\firstblankline
\global\everypar={\bf\global\everypar={\rm\global\everypar={}}}%
}

\gdef\endcontributorpage{\egroup\vskip1sp\vbox{\unvbox0}%
\egroup\onecolumn\newpage}
}

%%% <== End code for contributorpage


\def\references{\section*{REFERENCES}
 \addcontentsline{toc}{section}{\protect
 \numberline{REFERENCES\string\hss}}
\bgroup\list
 {[\arabic{enumi}]}{\settowidth\labelwidth{[99]}\leftmargin\labelwidth
 \advance\leftmargin\labelsep
 \usecounter{enumi}}
 \def\newblock{\hskip .11em plus .33em minus .07em}
 \sloppy\clubpenalty4000\widowpenalty4000
 \sfcode`\.=1000\relax\frenchspacing}

\def\endreferences{\endlist\vskip1sp\egroup\parindent=0pt\relax}


\def\thebibliography#1{\section*{REFERENCES}\list
 {[\arabic{enumi}]}{\settowidth\labelwidth{[99]}\leftmargin\labelwidth
 \advance\leftmargin\labelsep
 \usecounter{enumi}}
 \def\newblock{\hskip .11em plus .33em minus .07em}
 \sloppy\clubpenalty4000\widowpenalty4000
 \sfcode`\.=1000\relax\frenchspacing}

\def\endthebibliography{\endlist\vskip1sp\parindent=0pt\relax}

\def\thesection {\ifinappend\thechapter.\fi\arabic{section}}
\def\thesubsection {\thesection.\arabic{subsection}}
\def\theequation{\ifinappend\thechapter.\fi\arabic{equation}}

\def\thetable{\ifinappend\thechapter.\fi\@arabic\c@table}
\def\thefigure{\ifinappend\thechapter.\fi\@arabic\c@figure}

\newif\ifinappend

\def\xnumberline#1{\hbox to1.1in{#1\hfil}}

\def\appendix#1{\ifinappend\else\setcounter{chapter}{0}\fi
\global\inappendtrue
\global\advance \c@chapter by1
\setcounter{section}{0}
\def\@chapapp{Appendix}
\def\thechapter{\Alph{chapter}}
{\def\\ { }\xdef\apptitle{#1}}
\addcontentsline{toc}{section}{\protect
\xnumberline{APPENDIX \thechapter\string\hss}{\apptitle\string\hfill}}
{\def\\ { }
\vskip40pt
\setcounter{section}{0}
\setcounter{equation}{0}
\setcounter{figure}{0}
\setcounter{table}{0}
\vbox to 7.5pc{%
{\chaptitle \rightline{APPENDIX \thechapter}}
\vskip8pt
\hrule height 1.5pt
\hyphenpenalty=10000 % No hyphenation in chapter heads
\vskip12pt\vskip-\parskip
\def\\ {\vskip-\parskip}\parfillskip=0pt
\LARGE\bigraggedleft
\sectionfont\uppercase{#1}\vskip1sp\vfill}%
\ignorespaces}}

\def\acks{\section*{Acknowledgements}}

%%%


\let\articletitle\chapter


%% new==>
\def\bigraggedleft{\leftskip0pt plus1fil\relax}

\newif\ifsettoroman

\gdef\@chapter[#1]#2{
\global\newchaptrue
 \refstepcounter{chapter}
 \typeout{\@chapapp\space\thechapter.}
{\def\\ { }
\ifinappend 
\addcontentsline{toc}{appendix}{\protect
 \numberline{\thechapter}\string\uppercase{#1}}
\else
\addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}%
\string\uppercase{#1}\string\newline\space{\string\it\space\thetocauthor}}
\fi
 \chaptermark{\let\\ =\ #1}
 \addcontentsline{lof}{listenv}{{\bf\@chapapp\ \thechapter}}
 \addcontentsline{lot}{listenv}{{\bf\@chapapp\ \thechapter}}
}% end curly to delimit \def\\ { }
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}] 
 \else \@makechapterhead{#2}
 \@afterheading \fi }

\def\@makechapterhead#1{
\null\vskip-5pc
\setbox0=\vbox{\hbox to\textwidth{\hfill\chapnumber\thechapter}
\hyphenpenalty=10000 % No hyphenation in chapter heads
\vskip8pt
\hrule height 1.5pt
\vskip12pt\vskip-\parskip
\def\\ {\vskip-\parskip}\parfillskip=0pt
\bigraggedleft
\LARGE\chaptitle\uppercase{\def\\ {\vskip-\parskip}#1}\vskip1sp
\vskip.5\baselineskip
\vbox {\unvbox\articlebox}%
}
\ifdim\ht0>17pc
\unvbox0
\else
\vbox to17pc{\unvbox0\vfill}\fi
\ifnum\c@chapter=1
\ifappendix\else
\ifsettoroman\else\global\settoromantrue
\pagenumbering{arabic}\fi\fi\fi
\gdef\thepage{\@arabic\c@page}}

\let\shortenedtitle\chaptermark

%% Default values, for complete book.
\title{Edited Book Title}
\author{Editor or Editors of Book}
\affil{Editor Affiliation}
\location{Affiliation Location}
\advance\authorcount by-1 \relax

\def\themathletter{\relax}
\def\mathletter#1{\gdef\themathletter{#1}}
\def\spletter#1{\gdef\thespletter{#1}}
\spletter{}

\def\theequation{\thespletter\ifappendix \thechapter.\fi\arabic{equation}\themathletter}

