%% This is LaTeX class `cambridge', for making books in the series %% called `Studies in Natural Language Processing' published by %% Cambridge University Press. %% %% Written by Steven Bird, University of Edinburgh . %% %% $Id: cambridge.cls,v 1.0 1995/06/10 18:00:00 steven Exp $ \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesClass{cambridge}[1995/06/10 v1.0 Cambridge class (SGB)] % pass options on to generic book style \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} \ProcessOptions \LoadClass{book} %%%%%%%% GENERAL DEFINITIONS %%%%%%%% \def\seriestitle{Studies in Natural Language Processing} \def\seriestitlelc{Studies in natural language processing} \def\blankpage{\pagestyle{empty}\cleardoublepage\pagestyle{headings}} %%%%%%%% DIMENSIONS %%%%%%%% \oddsidemargin -0.95mm \evensidemargin -0.47cm \topmargin -1.28mm \headheight 12pt \headsep 18pt \footskip 11mm \parindent 1em \footnotesep 10pt \rightmargin 0pt \textheight 43pc \textwidth 27pc \columnsep 10pt \columnseprule 0pt \@twosidetrue \@mparswitchtrue \def\ds@draft{\overfullrule 5pt} % mark overfull hboxes %%%%%%%%% HYPHENATION CONTROL %%%%%%%% \pretolerance 250 \tolerance 500 \hyphenpenalty 250 \exhyphenpenalty 100 \doublehyphendemerits 7500 \finalhyphendemerits 7500 \brokenpenalty 10000 \lefthyphenmin 3 \righthyphenmin 3 \widowpenalty 10000 \clubpenalty 10000 \displaywidowpenalty 10000 \looseness 1 %%%%%%%% HEADINGS %%%%%%%% \renewcommand\chapter{\if@openright\clearpage\blankpage\else\clearpage\fi \thispagestyle{plain}% \global\@topnum\z@ \@afterindentfalse \secdef\@chapter\@schapter} \renewcommand{\@makechapterhead}[1]{ \vspace*{18pt}% {\parindent \z@ \raggedright \ifnum \c@secnumdepth >\m@ne \Large\bf \@chapapp{} \makebox[3pc][l]{\thechapter} \fi \Large\bf #1\par\nobreak\vskip 18pt \rule{27pc}{0.5pt}\vskip 72pt \thispagestyle{plain} } } \def\@makeschapterhead#1{% \typeout{<#1>} \vspace*{18pt}% {\parindent \z@ \raggedright \Large\bf #1\par\nobreak\vskip 18pt \rule{27pc}{0.5pt}\vskip 72pt \thispagestyle{plain} } } \renewcommand\chaptermark[1]{} \def\chaptername{} \def\ps@headings{% \let\@oddfoot\@empty\let\@evenfoot\@empty % No footer. \def\@evenhead{\rm\thepage\hfil\slshape\leftmark} % Left heading. \def\@oddhead{{\slshape\rightmark}\hfil\rm\thepage} % Right heading. \let\@mkboth\markboth \def\chaptermark##1{% \markboth {\it{\ifnum \c@secnumdepth >\m@ne \@chapapp\ \thechapter. \ \fi ##1}} {\it{\ifnum \c@secnumdepth >\m@ne \hspace{3pc}\thechapter. \ \fi ##1}}} \def\sectionmark##1{% \markright {\it{\ifnum \c@secnumdepth >\z@ \hspace{3pc}\thesection. \ \fi ##1}}} } \def\section{\@startsection {section}{1}{\z@}{30pt}{18pt}{\reset@font\large\bf}} \def\subsection{\@startsection{subsection}{2}{\z@}{30pt}{18pt}{\reset@font\it}} \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{24pt}{12pt}{\reset@font\it}} %%%%%%%% TABLE OF CONTENTS %%%%%%%% % Page style for the first contents page % to ensure it has a right-aligned page number. % No other page is like this. \def\ps@myplain{ \def\@oddhead{\hfil} \def\@oddfoot{\hfil\thepage} } \def\tableofcontents{ \pagestyle{myheadings} \chapter*{\contentsname} \thispagestyle{myplain} \markboth{\it\contentsname}{\it\contentsname} \markright{\it{\hspace{3pc}\contentsname}} \@starttoc{toc} \blankpage } % TOC lines do not have dots, just white space. \def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else \vskip \z@ plus.2\p@ {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip \parindent #2\relax\@afterindenttrue \interlinepenalty\@M \leavevmode \@tempdima #3\relax \advance\leftskip \@tempdima \hbox{}\hskip -\leftskip #4\nobreak\hfill \hbox to\@pnumwidth{\hfil\reset@font\rm #5}\par}\fi} % The design is for a single appendix. Situations requiring more than % one can simply put these into the sections A.1, A.2, ..., A.n. % The argument is the title of the appendix. \def\appendix#1{\par \setcounter{section}{0}% \def\@chapapp{}% \def\thechapter{A}% \markboth{Appendix: #1}{Appendix: #1}% \addcontentsline{toc}{chapter}{Appendix: #1}% \chapter*{Appendix: #1}} %%%%%%%% LINES %%%%%%%% \def\footnoterule{\kern-3\p@ \hrule width 5pc \kern 2.6\p@} \def\cuprule{\rule{27pc}{0.5pt}} %%%%%%%% PRELIMS %%%%%%%% \def\title#1{\def\booktitle{#1}} \def\titlelc#1{\def\booktitlelc{#1}} \def\subtitle#1{\def\booksubtitle{#1}} \def\titlelc#1{\def\booktitlelc{#1}} \def\fulltitle#1{\def\bookfulltitle{#1}} \def\author#1{\def\bookauthor{#1}} \def\authorrev#1{\def\bookauthorrev{#1}} \def\authoruc#1{\def\bookauthoruc{#1}} \def\affiliation#1{\def\bookaffil{#1}} \def\typesetter#1{\def\booktypesetter{#1}} \def\copyrightyear#1{\def\bookcopyrightyear{#1}} \def\firstpublished#1{\def\firstpublishedyear{#1}} \def\isbn#1{\def\theisbn{#1}} \def\initialspaces#1#2#3#4#5{% \newlength{\quartertitlespace}\setlength{\quartertitlespace}{#1} \newlength{\halftitlespace}\setlength{\halftitlespace}{#2} \newlength{\serieslistspace}\setlength{\serieslistspace}{#3} \newlength{\titlepagespace}\setlength{\titlepagespace}{#4} \newlength{\dedicationspace}\setlength{\dedicationspace}{#5}} % In order to get the horizontal rule of the prelims to line % up nicely from one page to the next, it may be necessary to % adjust some of these numbers: \initialspaces{104pt}{77pt}{77pt}{53pt}{104pt} \newenvironment{prelims} {\pagestyle{empty} \sloppy \parindent 0em \pagenumbering{roman}}% {\blankpage \pagenumbering{arabic} \parindent 1em \pagestyle{headings}} \newenvironment{quartertitle} {\vspace*{\quartertitlespace}\cuprule\vskip 54pt % 64-10 \small\noindent}% {\cleardoublepage} \def\halftitle{% \vspace*{\halftitlespace} % default: 77 = 88-11 \seriestitle \vskip 16pt \cuprule \vskip 53pt % 64-11 {\bf \booktitle}\clearpage} \def\seriesitem#1#2{\item{\it #1\/}, #2} % The vertical spacing in this environment may need to be modified % when additional books are added to the series list. The choice is % between making the measurements smaller, so that everything fits on % the one page, or making them bigger, so that there is a sufficient % amount of overflow. Of course, such overflow has implications for % the titlepage, and the \clearpage at the end of this definition may % need to be changed to a \cleardoublepage. The starting page % number of the table of contents would also need to be changed. \def\serieslist{ \vspace*{\serieslistspace} % default: 65 = 76-11 {\bf Studies in Natural Language Processing} \vskip 16pt \cuprule \vskip 20pt \small {\it Series Editor:} Branimir Boguraev, Apple Computers Inc. \vskip 6pt % was 14pt {\it Editorial Advisory Board} \\ Don Hindle, AT\&T Bell Laboratories \\ Martin Kay, Xerox PARC \\ David McDonald, Content Technologies \\ Hans Uszkoreit, University of Saarbr\"ucken \\ Yorick Wilks, Sheffield University \par \vskip 6pt % was 14pt % {\it Also in the series} \vskip 6pt \begin{list}{}{\leftmargin 1em \itemindent -1em \listparindent \itemindent \parsep 0em \itemsep 0em} \item{\it Also in the series} \seriesitem{Semantic Processing for Finite Domains}{M.S.~Palmer} \seriesitem{Reference and Computation}{A.~Kronfeld} \seriesitem{Text Generation}{K.R.~McKeown} \seriesitem{Planning English Sentences}{D.E.~Appelt} \seriesitem{Relational Models of the Lexicon}{M.W.~Evens} \seriesitem{Systemic Text Generation as Problem Solving}{T.~Patten} \seriesitem{Memory and Context for Language Interpretation}{H.~Alshawi} \seriesitem{Machine Translation}{edited by S.~Nirenburg} \seriesitem{Semantic Interpretation and the Resolution of Ambiguity}{G.~Hirst} \seriesitem{The Linguistic Basis of Text Generation}{L.~Danlos} \seriesitem{Computational Linguistics}{R.~Grishman} \seriesitem{Studies in Natural Language Parsing}{edited by D.~Dowty, L.~Karttunen and A.~Zwicky} \seriesitem{Language and Spatial Cognition}{Annette Herskovits} \seriesitem{Machine Translation Systems}{edited by Jonathan Slocum} \seriesitem{Challenges in Natural Language Processing}{edited by M.~Bates and R.M.~Weischedel} \seriesitem{Computational Linguistics and Formal Semantics}{M.~Rosner and R.~Johnson} \seriesitem{Inheritance, Defaults and the Lexicon}{edited by E.J.~Briscoe, A.~Copestake and V.~de Paiva} \seriesitem{Computational Phonology: A Constraint-Based Approach}{S.~Bird} \end{list}\cleardoublepage} \def\titlepage{% \vspace*{\titlepagespace} % default: 53 = 77-24 {\huge\bf \booktitlelc} \vskip 11pt % 21-10 {\small\bf \booksubtitle} \vskip 14pt \cuprule \vskip 52pt % 64-12 {\large by} \vskip 2pt % 14-12 {\large{\bookauthoruc}} \vskip 3pt % 12-9 {\footnotesize\it\bookaffil} \clearpage} \newenvironment{imprints}% {\vspace*{159pt} % 168-9 \footnotesize Published by the Press Syndicate of the University of Cambridge \\ The Pitt Building, Trumpington Street, Cambridge CB2 1RP \\ 40 West 20th Street, New York, NY 10011-4211, USA \\ 10 Stamford Road, Oakleigh, Victoria 3166, Australia \vskip 12pt \copyright\ Cambridge University Press \bookcopyrightyear \vskip 12pt First published \firstpublishedyear \vskip 12pt Printed in Great Britain at the University Press, Cambridge \vskip 12pt {\it A catalogue record for this book is available from the British Library} \vskip 12pt {\it Library of Congress cataloguing in publication data} \vskip 6pt \begin{tabbing} xxxxxxxxxxxxxxxxxx \= xxxxxxxxxxxx \kill \bookauthorrev.\\ \bookfulltitle\ / \bookauthor \\ \hspace*{2ex} p. \hspace*{1ex} cm. -- (\seriestitlelc) \\ Includes bibliographical references and indexes. \\ \theisbn\ (hardback)\\}% {\end{tabbing} \vskip 12pt \theisbn\ hardback \vfill \booktypesetter \pagebreak} \def\dedication#1{\vspace*{\dedicationspace}\cuprule \vskip 54pt % 64-10 {\small\it #1}\cleardoublepage} \newenvironment{preface} {\addcontentsline{toc}{chapter}{Preface} \parindent 1em \markboth{Preface}{Preface}\chapter*{Preface}}% {\clearpage\markboth{}{}} %%%%%%%% DISPLAYS %%%%%%%% % Captions in \small \long\def\@caption#1[#2]#3{\par\addcontentsline{\csname ext@#1\endcsname}{#1}{\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}\begingroup \@parboxrestore \small \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par \endgroup} % No right indentation for quotes \renewenvironment{quote}{\begin{list}{}{}\small\item[]}{\end{list}} % Example macros \newenvironment{EX}[1]{\begin{ex}\label{#1}}{\end{ex}} \newenvironment{SUBEX}[1]{\begin{ex}\label{#1}\begin{examples}}{\end{examples}\end{ex}} %%%%%%%% BIBLIOGRAPHY %%%%%%%% \def\biblio#1{{\small\bibliography{#1}\bibliographystyle{cup}\clearpage\blankpage}} %%%%%%%% INDEX %%%%%%%% \newcommand{\see}[1]{{\it See\/} #1} \newcommand{\seealso}[1]{{\it See also\/} #1} \renewenvironment{theindex}[1] {\footnotesize\def\indexname{#1}\clearpage\blankpage\columnsep 35pt \twocolumn[\@makeschapterhead{\indexname}]% \@mkboth{\indexname}{\indexname}% \addcontentsline{toc}{chapter}{\indexname}% \hfuzz=.5in \parskip=0pt \itemsep=0pt% \begin{list}{}{\itemsep=0pt \parsep=0pt \itemindent=-2ex \parindent=0pt% \leftmargin=2ex \leftmargini=2ex \listparindent=-2ex}}{\end{list}\normalsize} %%%%%%%% APA STYLE CITATIONS %%%%%%%% % NB This is modified by SGB from the public domain APA macros of % Spencer as modified by Young U. Ryu , % as distributed on comp.text.tex on 13 Jun 91. It is used in % conjunction with the CUP bibliography style file cup.bst. %$$$ newapa.sty $$$ --- June 12, 1991 % % \cite[optional notes] -> (Full Author List, Year) % \citeA[optional notes]{key} -> Full Author List (Year) % \citeauthor[optional notes]{key} -> Full Author List % \shortcite[optional notes]{key} -> (Short Author List, Year) % \shortciteA[optional notes]{key} -> Short Author List (Year) % \shortciteauthor[optional notes]{key} -> Short Author List % \citeyear[optional notes]{key} -> (Year) % \def\@cite@start{(} \def\@between@author@year{, } \def\@between@cites{; } \def\@before@note{, } \def\@cite@end{)} % \def\citepunct#1#2#3#4#5{% \def\@cite@start{#1} \def\@between@author@year{#2} \def\@between@cites{#3} \def\@before@note{#4} \def\@cite@end{#5} } % \let\@internalcite\cite % % comment: \cite -> (Full Author List, Year) % comment: \citeA -> Full Author List (Year) % comment: \citeauthor -> Full Author List % \def\cite{\def\@citeseppen{-1000}% \def\@cite##1##2{\@cite@start##1\if@tempswa \@before@note##2\fi\@cite@end}% \def\citeauthoryear##1##2##3{##1\@between@author@year##3}\@internalcite} \def\citeA{\def\@citeseppen{-1000}% \def\@cite##1##2{{##1}\if@tempswa \@before@note##2\@cite@end\else\@cite@end\fi}% \def\citeauthoryear##1##2##3{##1 \@cite@start##3}\@citedata} \def\citeauthor{\def\@citeseppen{-1000}% \def\@cite##1##2{##1\if@tempswa \@before@note##2\fi}% \def\citeauthoryear##1##2##3{##1}\@citedata} % % comment: \shortcite -> (Short Author List, Year) % comment: \shortciteA -> Short Author List (Year) % comment: \shortciteauthor -> Short Author List % \def\shortcite{\def\@citeseppen{-1000}% \def\@cite##1##2{\@cite@start##1\if@tempswa \@before@note##2\fi\@cite@end}% \def\citeauthoryear##1##2##3{##2\@between@author@year##3}\@internalcite} \def\shortciteA{\def\@citeseppen{-1000}% \def\@cite##1##2{{##1}\if@tempswa \@before@note##2\@cite@end\else\@cite@end\fi}% \def\citeauthoryear##1##2##3{##2 \@cite@start##3}\@citedata} \def\shortciteauthor{\def\@citeseppen{-1000}% \def\@cite##1##2{##1\if@tempswa \@before@note##2\fi}% \def\citeauthoryear##1##2##3{##2}\@citedata} % % comment: \citeyear -> (Year) % \def\citeyear{\def\@citeseppen{-1000}% \def\@cite##1##2{\@cite@start##1\if@tempswa \@before@note##2\fi\@cite@end}% \def\citeauthoryear##1##2##3{##3}\@citedata} % \def\@citedata{\@ifnextchar[{\@tempswatrue\@citedatax}{\@tempswafalse\@citedatax[]}} % \def\@citedatax[#1]#2{% \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi \def\@citea{}\@cite{\@for\@citeb:=#2\do {\@citea\def\@citea{\@before@note}\@ifundefined {b@\@citeb}{{\bf ?}\@warning {Citation `\@citeb' on page \thepage \space undefined}} {\csname b@\@citeb\endcsname}}}{#1}} % \def\@citex[#1]#2{% \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi \def\@citea{}\@cite{\@for\@citeb:=#2\do {\@citea\def\@citea{\@between@cites}\@ifundefined {b@\@citeb}{{\bf ?}\@warning {Citation `\@citeb' on page \thepage \space undefined}}% {\csname b@\@citeb\endcsname}}}{#1}} % % (from apalike.sty) % No labels in the bibliography. % Set length of hanging indentation for bibliography entries. \def\@biblabel#1{} \newlength{\bibhang} \setlength{\bibhang}{2em} % \def\thebibliography#1{\chapter*{References} \addcontentsline{toc}{chapter}{References} \list {\relax}{\setlength{\labelsep}{0em} \setlength{\itemindent}{-\bibhang} \setlength{\leftmargin}{\bibhang}} \def\newblock{\hskip .11em plus .33em minus .07em} \markboth{\it References}{\it References} \markright{\it{\hspace{3pc}References}} \sloppy\clubpenalty4000\widowpenalty4000 \sfcode`\.=1000\relax} % \pagestyle{headings} \pagenumbering{arabic}