%%************************************************************************ %% %% Annals of Software Engineering %% %% LaTeX2e Class File %% %% Scott A. Guyer %% %% Oct. 28, 1997 %% %% Virginia Tech, Department of Computer Science, Blacksburg, VA, USA. %% %% %%------------------------------------------------------------------------ %% USAGE: This is a LaTeX2e class file, so to use this class, authors %% should just use \documentclass{ase} and proceed as they would %% with an article class. The primary new additions are the %% runningtitle and runningauthor commands (see next paragraph). %% %% Authors should remember to define the \runningtitle and %% \runningauthor commands to something reasonable so that the %% headers (\runningauthor, \runningtitle) fit nicely in the header. %% %% MINUTIA: %% The \setsecboxwidth command sets the width of the counter box %% as well as the \parindent for that section header. This should remain %% constant throughout the document. The section head will be printed %% at the end of that counter box. The effect is that all the headings %% and indents of the section are aligned. %% %% Authors should use BiBTeX. However, there is no need to specify %% a \bibliographystyle since this class handles it (we currently %% use ASE). The result is an alphabetical list of bibs where %% only the first line of each bibitem is left justified. The %% remaining lines of each bibitem are indented by a specified %% by a default dimension. The current default is 1.5em. To alter %% this, authors may use the \setbibhang command to specify another %% reasonable dimension. %% %% Revised: 1/27/97 -- Scott A. Guyer %% Added page layout commands to force 1in left-right margins with %% .75in top and bottom margins. %% %% Added command to options to force 1.62 baselinestretch %% (i.e. double spacing). %% %% Revised: 2/4/97 -- Scott A. Guyer %% Header alignment problem on even numbered (right-side) pages fixed. %% %% Revised: 2/18/97 -- Scott A. Guyer %% Fixed the pagenumbering problem with the abstract. The abstract %% now begins on page 'ii'. %% %% Revised: 2/27/97 -- Scott A. Guyer %% Forced the use of the new ASE bibliography style file instead of %% apalike. Also, require the package 'cite.sty' for customizing %% punctuation appropriately. %% %% Revised: 8/11/97 -- Scott A. Guyer %% Fixed a bug with \labelsep and \labelwidth for the bibliography %% environment. They were set outside the bibliography environment %% and thus had a global effect. %% %%************************************************************************ \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ase}[1996/09/14 Annals of Software Engineering class] \LoadClass{article} \RequirePackage{cite} \RequirePackage{ifthen} %%---------------------------------------------------------------- %% OPTIONS: All options should be declared and defined in this %% section. %%---------------------------------------------------------------- \@titlepagetrue \@twosidetrue \DeclareOption{twoside}{% \PassOptionsToClass{twoside}{article}% } \DeclareOption{draft}{% \PassOptionsToClass{draft}{article}% \renewcommand{\baselinestretch}{1.62} } \DeclareOption{titlepage}{\@titlepagetrue} \DeclareOption*{% \PassOptionsToClass{\CurrentOption}{article}% } \ExecuteOptions{twoside,titlepage,draft} \ProcessOptions %% %% Make sure we get the title page and abstract on their %% own separate pages. %% \if@titlepage \renewcommand{\maketitle}{\begin{titlepage}% \thispagestyle{empty}\pagenumbering{roman} \let\footnotesize\small \let\footnoterule\relax \null\vfil \vskip 60\p@ \begin{center}% {\LARGE \@title \par}% \vskip 3em% {\large \lineskip .75em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 1.5em% {\large \@date \par}% % Set date in \large size. \end{center}\par \@thanks \vfil\null \end{titlepage}% \setcounter{footnote}{0}% \let\thanks\relax\let\maketitle\relax \gdef\@thanks{}\gdef\@author{}\gdef\@title{}% \renewenvironment{abstract}{% \titlepage \null\vfil \setcounter{page}{2}\thispagestyle{plain} \begin{center} \bfseries \abstractname \end{center}} {\par\vfil\null\endtitlepage\clearpage\pagenumbering{arabic}}} \fi %%---------------------------------------------------------------- %% CLASS DEFINITIONS: these are the definitions that define the %% look and feel of this class. %%---------------------------------------------------------------- %% %% Page Setup---headings and such. %% Authors should define the running title and running author so %% that the two can be presented nicely on a single line in the %% header. %% \pagenumbering{arabic} \pagestyle{myheadings} \gdef\@rtitle{} \newcommand{\runningtitle}[1]{\gdef\@rtitle{#1}} \gdef\@rauthor{} \newcommand{\runningauthor}[1]{\gdef\@rauthor{#1}} \AtBeginDocument{% \markboth{\@rauthor, \@rtitle\hfil}{\hfil\@rauthor, \@rtitle}% } %% %% Need to add some page sizing --- margins and what-not. %% \setlength{\textwidth}{6.5in} \setlength{\topmargin}{0pt} \setlength{\voffset}{-.25in} \setlength{\evensidemargin}{0pt} \setlength{\oddsidemargin}{0pt} \setlength{\hoffset}{0pt} \setlength{\textheight}{650pt} %% %% Sectioning---These should do everything they usually do, but %% we are changing the fonts. We also want to make sure the %% section numbers are printed in a uniformly spaced box. This %% box has the size of \@secboxwidth. Users can set this with %% the \setsecboxwidth command. %% %% Redefine \startsection and \sect from latex.ltx so that %% we can ensure the heading is in upper case for the %% top level section headings. \def\setsecboxwidth#1{\@secboxwidth=#1 \parindent=\@secboxwidth} \newdimen\@secboxwidth \@secboxwidth=3em \parindent=\@secboxwidth \def\@seccntformat#1{\csname the#1\endcsname} \def\@ASEstartsection#1#2#3#4#5#6{\if@noskipsec \leavevmode \fi \par \@tempskipa #4\relax \@afterindenttrue \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse \fi \if@nobreak \everypar{}\else \addpenalty{\@secpenalty}\addvspace{\@tempskipa}\fi \@ifstar {\@ssect{#3}{#4}{#5}{#6}}% {\@dblarg{\@ASEsect{#1}{#2}{#3}{#4}{#5}{#6}}}} \def\@ASEsect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth \let\@svsec\@empty\else \refstepcounter{#1}% \let\@@protect\protect \def\protect{\noexpand\protect\noexpand}% \edef\@svsec{\@seccntformat{#1}}% \let\protect\@@protect\fi \@tempskipa #5\relax \ifdim \@tempskipa>\z@ \begingroup #6\relax \@hangfrom{\hskip #3\relax\makebox[\@secboxwidth][l]{\@svsec}}% {\interlinepenalty \@M \uppercase{#8}\par}% \endgroup \csname #1mark\endcsname{#7}\addcontentsline {toc}{#1}{\ifnum #2>\c@secnumdepth \else \protect\numberline{\csname the#1\endcsname}\fi #7}\else \def\@svsechd{#6\hskip #3\relax %% \relax added 2 May 90 \@svsec \uppercase{#8}\csname #1mark\endcsname {#7}\addcontentsline {toc}{#1}{\ifnum #2>\c@secnumdepth \else \protect\numberline{\csname the#1\endcsname}% \fi #7}}\fi \@xsect{#5}} \def\@sect#1#2#3#4#5#6[#7]#8{% \ifnum #2>\c@secnumdepth \let\@svsec\@empty\else \refstepcounter{#1}% \let\@@protect\protect \def\protect{\noexpand\protect\noexpand}% \edef\@svsec{\@seccntformat{#1}}% \let\protect\@@protect\fi % \protected@edef\@svsec{\@seccntformat{#1}}% % \fi \@tempskipa #5\relax \ifdim \@tempskipa>\z@ \begingroup #6\relax \@hangfrom{\hskip #3\relax\makebox[\@secboxwidth][l]{\@svsec}}% {\interlinepenalty \@M #8\par}% \endgroup \csname #1mark\endcsname{#7}\addcontentsline {toc}{#1}{\ifnum #2>\c@secnumdepth \else \protect\numberline{\csname the#1\endcsname}\fi #7}\else \def\@svsechd{#6\hskip #3\relax %% \relax added 2 May 90 \@svsec #8\csname #1mark\endcsname {#7}\addcontentsline {toc}{#1}{\ifnum #2>\c@secnumdepth \else \protect\numberline{\csname the#1\endcsname}% \fi #7}}\fi \@xsect{#5}} %% %% Now, on to the indentation problem. We want every new paragraph %% to be indented, including the first of a new section. %% \def\@xsect#1{\@tempskipa #1\relax \ifdim \@tempskipa>\z@ \par \nobreak \vskip \@tempskipa \@afterheading \hskip\parindent \else \global\@nobreakfalse \global\@noskipsectrue \everypar{\if@noskipsec \global\@noskipsecfalse \clubpenalty\@M \hskip -\parindent \begingroup \@svsechd \endgroup \unskip \@tempskipa #1\relax \hskip -\@tempskipa \else \clubpenalty \@clubpenalty \everypar{}\fi} \fi\ignorespaces } %% %% The section specifications. %% \renewcommand{\section}{\@ASEstartsection {section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus .2ex}% {\reset@font\bfseries}} \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\reset@font\normalsize\bfseries}} \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\reset@font\normalsize\itshape}} \renewcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}% {3.25ex \@plus1ex \@minus.2ex}% {-1em}% {\reset@font\normalsize}} %% %% Setup the bibliography so that the reference list is %% printed with only the first line of a bibentry left justified. %% Every other line is indented by \@bibhang (by default 1.5em). %% The user can change this with the \setbibhang command. %% \def\@biblabel#1{} \newdimen\@bibhang \@bibhang=1.5em \def\setbibhang#1{\@bibhang=#1} \renewenvironment{thebibliography}[1]{% \setlength{\labelwidth}{0pt} \setlength{\labelsep}{0pt} \section*{\refname \@mkboth{\uppercase{\refname}}{\uppercase{\refname}}}% \vspace{-1.5em} \setlength{\parindent}{0pt} \def\newblock{} \renewcommand{\bibitem}[2][]{% \if@filesw {\let\protect\noexpand\immediate \write\@auxout{\string\bibcite{##2}{##1}}} \fi\hangindent=\@bibhang\hangafter=1}} {} %% %% Force the ASE bibliography style and complain when %% the user tries to change it. %% %% \renewcommand\citepunct{; \penalty\@m\hskip.13emplus.1emminus.1em} \def\refname{REFERENCES} \AtBeginDocument{% \immediate\write\@mainaux{\string\bibstyle{ase}} } \renewcommand{\bibliographystyle}[1]{% \typeout{***Warning: The softeng class uses the ASE bibliography style. bibliographystyle{#1} command ignored.} } %% %% Fix the footnotes so that the footnote mark is a %% superscripted counter followed by a paren. %% \def\thefootnote{\arabic{footnote})}