%\iffalse
% raeisf.dtx generated using makedtx version 0.9b (c) Nicola Talbot
% Command line args:
%   -src "(.+)\.(cls)\Z=>\1.\2"
%   -src "(.+)\.(bst)\Z=>\1.\2"
%   -src "sample\.tex\Z=>sample.tex"
%   -doc "manual.tex"
%   -author "Nicola Talbot"
%   -dir "source"
%   raeisf
% Created on 2005/11/24 21:23
%\fi
%\iffalse
%<*package>
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%</package>
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
% Copyright (C) 2005 Nicola Talbot, all rights reserved.
% \fi
% \iffalse
%<*driver>
\documentclass[a4paper]{ltxdoc}
\usepackage[colorlinks,bookmarks]{hyperref}


\OnlyDescription

\begin{document}
\DocInput{raeisf.dtx}
\end{document}
%</driver>
%\fi
%
%\title{raeisf.cls : \LaTeXe\ class file to typeset RAE Individual Survey Form}
%\author{Nicola L. C. Talbot}
%\date{24nd November 2005}
%
%\maketitle
%\tableofcontents
%
%\section{Introduction}
%
%The \texttt{raeisf.cls} class file is designed to produce the UEA review for RAE 2008 Individual Survey Form, for those who
%would rather use \LaTeX, instead of Word.  It makes it a lot easier to fill in the form if you already have all your 
%publications in a BibTeX database.  This class file is based on the \texttt{article} class, and requires the following packages:
%\texttt{geometry}, \texttt{longtable}, \texttt{bibunits}, \texttt{ifthen} and \texttt{rotating}. Please make sure you have all
%these packages installed on your system before you use this class file.
%
%When you \LaTeX\ your document, you will also need to run BibTeX on all the \texttt{bu*.aux} files created by \texttt{bibunits}.
%The \texttt{bibunits} package comes with a shell script called \texttt{bibtexall} which runs BibTeX on all \texttt{.aux} files
%found in the current directory.  This unfortunately includes the main auxiliary file, however the script can be modified slightly
%so that it only runs BibTeX on the \texttt{bu*.aux} files:
%\begin{verbatim}
%#!/bin/bash
%
%for file in bu*.aux ; do
%   bibtex `basename $file .aux`
%done
%\end{verbatim}
%
%\DescribeMacro{\makeform}
%The form itself is generated using the command \verb"\makeform". To produce a blank version of the form, simply do:\\[5pt]
%\begin{ttfamily}
%\verb"\documentclass{raeisf}"\\
%\\
%\verb"\begin{document}"\\
%\verb"\makeform"\\
%\verb"\"end\{document\}\\[5pt]
%\end{ttfamily}
%To enter information into the form, you must specified the required
%information (using the commands described later) \emph{before} the command \verb"\makeform".  
%Any text placed after \verb"\makeform" will be appended to the form.
%
%\DescribeMacro{\name}
%Your name is entered using the command \verb"\name"\texttt{\{\meta{your name}\}}.
%\DescribeMacro{\school}
%Your school is entered using the command \verb"\school"\texttt{\{\meta{your school}\}}
%
%\section{Publications}
%
%All your publications (published, in press, submitted) need to be stored in one or more BibTeX databases (\texttt{.bib} files).  
%If they are all contained in a single \texttt{.bib} file, this file can be specified using the command:
%\verb"\defaultbibliography"\texttt{\{\meta{bib name}\}}.  This command is defined in \texttt{bibunits.sty}, please read the 
%\texttt{bibunits} documentation for further details.
%
%The \texttt{raeisf} class file comes with the BibTeX style file \texttt{raeisf.bst}.  This style file defines the three extra
%fields: \texttt{rank} (RAE rank), \texttt{jif} (journal impact factor) and \texttt{reviewed} (peer-reviewed? Should have the value
%\texttt{n} or \texttt{y}). These fields can be used with all entry types. (Note that these
%fields will be ignored if you use any other style file.) This BibTeX style file will be used automatically by the \texttt{raeisf}
%class file.
%
%The form stipulates that senior
%author must be indicated using an asterisk.  If you have a large centrally located bib file containing all your publications,
%it's a nuisance having to edit it every time you want to use it in a different document.  It may be easier to define a command,
%called, say, \verb"\senior", and redefine it depending on your document.  Here is an example:
%\begin{verbatim}
%@preamble{"\def\senior{$^\ast$} % senior author"}
%
%@string{ESANN="Proceedings of the European Symposium on Artificial Neural
%                Networks"}
%
%@inproceedings{cawley2004a,
%   author = "Gavin C. Cawley{\senior} and Nicola L. C. Talbot",
%   title  = "Sparse {B}ayesian kernel logistic regression",
%   booktitle = ESANN # " (ESANN-2004)",
%   address = "Bruges, Belgium",
%   pages = "133--138",
%   month = apr # " 28--30",
%   year = 2004,
%   rank = "1",
%   jif  = "2.19",
%   reviewed = "y"
%}
%
%@article{cawley2004b,
%   author = "Gavin C. Cawley{\senior} and Nicola L. C. Talbot",
%   title = "Hetroscedastic kernel ridge regression",
%   journal = "Neurocomputing",
%   volume = 57,
%   pages = "105--124",
%   year = 2004,
%   rank = "5",
%   jif = "3.0",
%   reviewed = "y"
%}
%
%@inproceedings{saadi2002,
%   author = "K Saadi and Gavin C Cawley and Nicola L C Talbot",
%   title  = "Fast exact leave-one-out cross-validation of least-squares
%             support vector machines",
%   booktitle = ESANN # " (ESANN-2002)",
%   address = "Bruges, Belgium",
%   pages = "149--154",
%   month = apr,
%   year = 2002
%}
%
%@article{theobald2004,
%   author = "Barry Theobald and J. Andrew Bangham{\senior} and I. Matthews 
%             and Gavin C. Cawley",
%   title = "Near-videorealistic synthetic talking faces: Implementation and
%            evaluation",
%   journal = "Speech Communication",
%   note = "submitted on invitation",
%   year = 2004
%}
%\end{verbatim}
%You now only need to change the first line to:
%\begin{verbatim}
%@preamble{"\def\senior{} % senior author"}
%\end{verbatim}
%and the asterisks will be removed.
%
%(Note that the \verb"\senior" command is placed immediately after the \emph{surname} with no
%spaces, that way BibTeX will be fooled into thinking it is part of the author's surname, otherwise
%the name won't be formatted correctly.)
%
%\subsection{Publications and other research outputs after 31 December 2000}
%
%All your publications after 31 December 2000 should be specified using the command:
%\DescribeMacro{\publications}
%\verb"\publications"\texttt{[\meta{bib name}]\{\meta{cite list}\}}
%where \meta{bib name} is the name of your BibTeX database.  This can be omitted if you have
%used the command \verb"\defaultbibliography".
%The argument \meta{cite list} should be a comma-separated list of the bibliography entries you want included in this
%section.  For example:
%\begin{verbatim}
%\publications{cawley2004a,cawley2004b}
%\end{verbatim}
%
%\subsection{Publications in Press (and other outputs which are ready for delivery)}
%
%These are publications which have been \emph{accepted} by the journal/publisher.  This information is specified
%using the command:
%\DescribeMacro{\accepted}
%\verb"\accepted"\texttt{[\meta{bib name}]\{\meta{cite list}\}}.  
%This has the same format as \verb"\publications" described above.
%
%\subsection{Publications Submitted and other Outputs which are being considered}
%
%These are publications which have been \emph{submitted} to a journal.  This information is specified
%using the command:
%\DescribeMacro{\submitted}
%\verb"\submitted"\texttt{[\meta{bib name}]\{\meta{cite list}\}}.  
%This has the same format as \verb"\publications" described above.
%
%\subsection{Publications and Other Outputs Planned}
%
%These are publications you are planning.  This information can be specified using the command:
%\DescribeMacro{\planned}
%\verb"\planned"\texttt{[\meta{bib name}]\{\meta{cite list}\}}.  
%This has the same format as \verb"\publications" described above.
%
%\subsection{Publications/Outputs You Would like to see Published/Delivered Before RAE 2008}
%
%This is research you believe, if published before 31 July 2007, will be a high scorer in RAE terms.  This information
%is specified using the command:
%\DescribeMacro{\wouldlike}
%\verb"\wouldlike"\texttt{[\meta{bib name}]\{\meta{cite list}\}}. 
%This has the same format as \verb"\publications" described above.
%
%\section{Research Grants}
%
%General note: the commands described in this section add items to a longtable environment, so be careful about
%starting new lines --- use \verb"\newline" instead of
%\verb"\\".
%
%\subsection{Research Grants awarded after 31 December 2000}
%
%The information for each research grant should be entered using the command:\\[10pt]
%\DescribeMacro{\grantawarded}
%\verb"\grantawarded"\texttt{\{\meta{PI}\}\{\meta{Co-I}\}\{\meta{Title}\}\{\meta{Start Date}\}\{\meta{End Date}\}\{\meta{Date \\
%Applied}\}\{\meta{Amount}\}\{\meta{Lead School}\}\{\meta{Funder}\}}
%\\[10pt]
%The information will be inserted into a table at the end of the 
%form.  Example:
%\begin{verbatim}
% \grantawarded
% {Dr Gavin Cawley}
% {Dr Nicola Talbot}
% {An interesting project}
% {1 Jan 01}
% {31 Dec 02}
% {1 Jun 00}
% {1,000}
% {CMP}
% {EPSRC}
%\end{verbatim}
%
%You should have a \verb"\grantawarded" command for each entry.  
%If you have the relevant data stored
%in an Excel file, you can saved it as a CSV file, and use the \texttt{csvtools} package.  For example, suppose you have
%a CSV file called \texttt{grants.csv} that contains the following information (lines wrapped to fit on page):
%\begin{verbatim}
%PI,Co-I,Title,Start Date,End Date,Date Applied,Amount,Lead School,Funder
%Dr Gavin Cawley,Dr Nicola Talbot,An interesting project,1 Jan 01,31 Dec 02,
%1 Jun 00,{1,000},CMP,EPSRC
%Dr Gavin Cawley,Dr Nicola Talbot,Another interesting project,1 Jan 02,31 Dec 03,
%1 Jun 01,{2,000},CMP,EPSRC
%\end{verbatim}
%Then you can do:
%\begin{verbatim}
%\applyCSVfile{grants.csv}
%{\edef\cmdargs{
%{\insertPI}
%{\insertbyname{Co-I}}
%{\insertTitle}
%{\insertbyname{Start Date}}
%{\insertbyname{End Date}}
%{\insertbyname{Date Applied}}
%{\insertAmount}
%{\insertbyname{Lead School}}
%{\insertFunder}}
%\expandafter\grantawarded\cmdargs}
%\end{verbatim}
%
%\subsection{Research Grants Pending}
%
%Pending research grants can be entered using the command:\\[10pt]
%\DescribeMacro{\grantpending}
%\verb"\grantpending"\texttt{\{\meta{PI}\}\{\meta{Co-I}\}\{\meta{Title}\}\{\meta{Start Date}\}\{\meta{End Date}\}\{\meta{Date \\
%Applied}\}\{\meta{Amount}\}\{\meta{Lead School}\}\{\meta{Funder}\}}
%\\[10pt]
%This has the same format as \verb"\grantawarded".  
%
%\subsection{Planned Research Grants}
%
%Planned research grants can be entered using the command:\\[10pt]
%\DescribeMacro{\grantplanned}
%\verb"\grantplanned"\texttt{\{\meta{PI}\}\{\meta{possible Co-I}\}\{\meta{planned title}\}\{\meta{est.\ start 
%date}\}\{\meta{est.\ end date}\}\{\meta{planned date of application}\}\{\meta{est.\ amount to be applied for}\}\{\meta{likely 
%funder(s)}\}}
%\\[10pt]
%You should have the command \verb"\grantplanned" for each planned research grant.  
%
%\subsection{Research Grant Applications You Would Like to Make in the Next Two Years}
%
%Each research grant application you would like to make should be entered using the command:\\[10pt]
%\DescribeMacro{\desiredRGapp}
%\verb"\desiredRGapp"\texttt{\{\meta{PIs and Co-Is}\}\{\meta{Title/Description}\}\{\meta{Funding Body and 
%Amount}\}\{\meta{Dates}\}}
%
%\section{Conferences and Meetings}
%
%\subsection{Presentation at Major Conferences/Meetings since December 31 2000}
%
%Each presentation should be entered using the command:\\[10pt]
%\DescribeMacro{\presentation}
%\verb"\presentation"\texttt{\{\meta{conference}\}\{\meta{date and venue}\}\{\meta{presentation}\}\{\meta{type}\}}
%
%\subsection{Future Major Conferences/Meetings at which you are definitely making a presentation}
%
%Each presentation should be entered using the command:\\[10pt]
%\DescribeMacro{\futuremeeting}
%\verb"\futuremeeting"\texttt{\{\meta{conference}\}\{\meta{date and venue}\}\{\meta{presentation}\}\{\meta{type}\}}
%
%\subsection{What are the most important international/national conference/meetings in your research area within the
%next two years?}
%
%Each meeting should be entered using the command:\\[10pt]
%\DescribeMacro{\importantmeeting}
%\verb"\importantmeeting"\texttt{\{\meta{conference}\}\{\meta{date and venue}\}}
%
%\section{Awards and Memberships}
%
%\subsection{Major awards/recognitions after December 31, 2000}
%
%Each award should be entered using the command:\\[10pt]
%\DescribeMacro{\majoraward}
%\verb"\majoraward"\texttt{\{\meta{title of award}\}\{\meta{date}\}\{\meta{awarding body}\}\{\meta{reason}\}}
%
%\subsection{Possible future awards, up to July 31, 2007}
%
%Each possible future award is entered using the command:\\[10pt]
%\DescribeMacro{\futureaward}
%\verb"\futureaward"\texttt{\{\meta{title}\}\{\meta{date}\}\{\meta{awarding body}\}\{\meta{reason}\}}
%
%\subsection{Membership of international/national research/learned bodies, steering committees etc.\ (after 31 December 2000)}
%
%Each entry should be specified using the command:\\[10pt]
%\DescribeMacro{\committeemembership}
%\verb"\committeemembership"\texttt{\{\meta{body}\}\{\meta{position/role}\}\{\meta{period of membership}\}}
%
%\subsection{Possible future membership of international/national research/learned bodies, steering committees etc?}
%
%Each entry should be specified using the command:\\[10pt]
%\DescribeMacro{\membershipaspiration}
%\verb"\membershipaspiration"\texttt{\{\meta{body}\}\{\meta{position/role}\}\{\meta{period of membership}\}}
%
%\subsection{Editorships/Editorial Boards (after 31 December 2000)}
%
%Each entry should be specified using the command:\\[10pt]
%\DescribeMacro{\editorship}
%\verb"\editorship"\texttt{\{\meta{journal/series}\}\{\meta{position}\}\{\meta{period}\}}
%
%\subsection{Possible future editorships, or membership of editorial boards}
%
%Each entry should be specified using the command:\\[10pt]
%\DescribeMacro{\editorshipaspiration}
%\verb"\editorshipaspiration"\texttt{\{\meta{journal/series}\}\{\meta{position}\}\{\meta{start date}\}}
%
%\subsection{Membership of advisory bodies/consultancies}
%
%Each entry should be specified using the command:\\[10pt]
%\DescribeMacro{\consultancy}
%\verb"\consultancy"\texttt{\{\meta{body}\}\{\meta{position}\}\{\meta{period}\}}
%
%\subsection{Possible future membership of advisory bodies/consultancies}
%
%Each entry should be specified using the command:\\[10pt]
%\DescribeMacro{\consultancyaspiration}
%\verb"\consultancyaspiration"\texttt{\{\meta{body}\}\{\meta{position}\}\{\meta{period}\}}
%
%\section{Research}
%
%\subsection{Research Grouping}
%
%Each entry should be specified using the command:\\[10pt]
%\DescribeMacro{\researchgrouping}
%\verb"\researchgrouping"\texttt{\{\meta{name}\}\{\meta{affiliation}\}}
%
%\subsection{Your research plans/strategy}
%
%You research plan or strategy should be entered using the command:\\[10pt]
%\DescribeMacro{\researchplan}
%\verb"\researchplan"\texttt{\{\meta{text}\}}
%
%\subsection{Research opportunities for your school/UEA/NRP}
%
%The details should be entered using the command:\\[10pt]
%\DescribeMacro{\researchopportunities}
%\verb"\researchopportunities"\texttt{\{\meta{text}\}}
%
%\subsection{Your general views on your research, your activity profile and school/UEA priorities}
%
%This information should be entered using the command:\\[10pt]
%\DescribeMacro{\generalviews}
%\verb"\generalviews"\texttt{\{\meta{text}\}}
%
%\section{Contact Details}
%
%Dr Nicola Talbot\\
%School of Computing Sciences\\
%University of East Anglia\\
%Norwich. NR4 7TJ\\
%\url{http://theoval.cmp.uea.ac.uk/~nlct}
%
%
%
%\StopEventually{}
%\section{The Code}
%    \begin{macrocode}
%<*raeisf.cls>
%    \end{macrocode}
% Declare class file.
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{raeisf}[2004/10/29 v1.01]
%    \end{macrocode}
% Base this class file on the article class file
%    \begin{macrocode}
\LoadClass[a4paper]{article}
%    \end{macrocode}
% Load required packages
%    \begin{macrocode}
\RequirePackage[margin=1in,top=0.25in]{geometry}
\RequirePackage{longtable}
\RequirePackage{bibunits}
\RequirePackage{ifthen}
\RequirePackage{rotating}
%    \end{macrocode}
% Redefine \verb|\section|
%    \begin{macrocode}
\renewcommand{\section}{\@startsection
{section}
{1}
{0mm}
{-\baselineskip}
{0.5\baselineskip}
{\normalfont\large\bfseries}}
%    \end{macrocode}
% No paragraph indentations, have a blank line between
% paragraphs.
%    \begin{macrocode}
\setlength{\parindent}{0pt}
\setlength{\parskip}{10pt plus 2pt minus 1pt}
%    \end{macrocode}
% \subsection{Bibliographies}
% Redefine the way the bibliographies appear. First
% define a counter for use in the bibliographies.
%    \begin{macrocode}
\newcounter{bibcount}
%    \end{macrocode}
% Redefine \verb|\@bibitem|.
%    \begin{macrocode}
\renewcommand{\@bibitem}[1]{%
\refstepcounter{bibcount}
\if@filesw
  \immediate \write \@auxout {\string \bibcite {#1}{\the\value{bibcount}}}
\fi
\ignorespaces
}
%    \end{macrocode}
% Redefine thebibligraphy to use a longtable environment. Define
% a length for the publication field.
%    \begin{macrocode}
\newlength\pubwidth
\setlength{\pubwidth}{4.6in}
%    \end{macrocode}
% Refine thebiblography
%    \begin{macrocode}
\renewenvironment{thebibliography}[1]{%
\begin{longtable}{|p{0.5in}|p{\pubwidth}|l|l|}\hline
\bfseries Ra & \bfseries Publication & \bfseries JIF & 
\bfseries Re\\\hline}{%
\end{longtable}}
%    \end{macrocode}
% In case using older version of bibunits that doesn't
% have |\defaultbibliography| defined.
%    \begin{macrocode}
\providecommand{\defaultbibliography}[1]{%
\renewcommand{\bu@bibdata}{#1}}
%    \end{macrocode}
% Define commands to store information. Name field.
%    \begin{macrocode}
\newcommand{\@name}{}
\newcommand{\name}[1]{\renewcommand{\@name}{#1}}
%    \end{macrocode}
% School field.
%    \begin{macrocode}
\newcommand{\@school}{}
\newcommand{\school}[1]{\renewcommand{\@school}{#1}}
%    \end{macrocode}
% Publications. Second argument is a comma-separated list
% of citations (for use in |\nocite|). The first argument is
% the name of the bib file. This makes a bibunit that just
% calls |\nocite| and then prints the bibliography.
%    \begin{macrocode}
\newcommand{\@publications}{%
\begin{thebibliography}{} & & & \\\hline\end{thebibliography}}
\newcommand{\publications}[2][\bu@bibdata]{%
\renewcommand{\@publications}{%
\begin{bibunit}[raeisf]\nocite{#2}\putbib[#1]\end{bibunit}}}
%    \end{macrocode}
% Publications in press. Same as above.
%    \begin{macrocode}
\newcommand{\@accepted}{\begin{thebibliography}{} & & & \\\hline
\end{thebibliography}}
\newcommand{\accepted}[2][\bu@bibdata]{%
\renewcommand{\@accepted}{%
\begin{bibunit}[raeisf]\nocite{#2}\putbib[#1]\end{bibunit}}}
%    \end{macrocode}
% Submitted publications. Same as above.
%    \begin{macrocode}
\newcommand{\@submitted}{\begin{thebibliography}{} & & & \\\hline
\end{thebibliography}}
\newcommand{\submitted}[2][\bu@bibdata]{%
\renewcommand{\@submitted}{%
\begin{bibunit}[raeisf]\nocite{#2}\putbib[#1]\end{bibunit}}}
%    \end{macrocode}
% Planned publications. Same as above.
%    \begin{macrocode}
\newcommand{\@planned}{\begin{thebibliography}{} & & & \\\hline
\end{thebibliography}}
\newcommand{\planned}[2][\bu@bibdata]{%
\renewcommand{\@planned}{%
\begin{bibunit}[raeisf]\nocite{#2}\putbib[#1]\end{bibunit}}}
%    \end{macrocode}
% Publications would liketo see published before RAE. Same as above.
%    \begin{macrocode}
\newcommand{\@wouldlike}{\begin{thebibliography}{} & & & \\\hline
\end{thebibliography}}
\newcommand{\wouldlike}[2][\bu@bibdata]{%
\renewcommand{\@wouldlike}{%
\begin{bibunit}[raeisf]\nocite{#2}\putbib[#1]\end{bibunit}}}
%    \end{macrocode}
% Macro to append items to a list. (Taken from the \TeX{}book.
%    \begin{macrocode}
\toksdef\rae@ta=0 \toksdef\rae@tb=2
\long\def\rae@appendrow#1\to#2{%
\rae@ta={#1\\\hline}\rae@tb=\expandafter{#2}%
\xdef#2{\the\rae@tb\the\rae@ta}%
}
%    \end{macrocode}
% Now deal with items for the sideways tables. Unfortunately
% there isn't a sideways version of longtable, so this is a
% bit fiddly. First define a counter to keep track of how many
% pages the table spans.
%    \begin{macrocode}
\newcount\c@grantawarded
\c@grantawarded=1\relax
%    \end{macrocode}
% Need a temporary counter for loop
%    \begin{macrocode}
\newcount\c@raetmp
%    \end{macrocode}
% Flag to determine whether or not to append the text ``continued''.
%    \begin{macrocode}
\newif\ifrae@cont
%    \end{macrocode}
% Define table header for grant awarded table.
%    \begin{macrocode}
\newcommand*{\@grantawardedheader}{%
\begin{tabular}{|p{0.9in}|p{0.9in}|p{0.9in}|p{0.9in}|p{0.9in}|p{0.9in}|p{0.9in}|p{0.9in}|p{0.9in}|}
\multicolumn{9}{l}{\bfseries\large Table for question 6 (grants since 1 Jan 01)\ifrae@cont\ Continued\fi}\\[10pt]
\hline
\bfseries PI &
\bfseries Co-I &
\bfseries Title &
\bfseries Start date &
\bfseries End date &
\bfseries Date applied for &
\bfseries Amount Awarded &
\bfseries Lead school &
\bfseries Funder\\\hline
}
%    \end{macrocode}
% Individual grant awarded table segment. Argument is the
% segment number.
%    \begin{macrocode}
\newcommand*{\@grantawardedseg}[1]{%
\begin{sideways}
\@grantawardedheader
\expandafter\if\csname @grantawarded\romannumeral#1\endcsname\relax
 & & & & & & & & \\\hline
\else
\csname @grantawarded\romannumeral#1\endcsname
\fi
\end{tabular}
\end{sideways}
}
%    \end{macrocode}
% |\@grantawarded| should display all the tables associated
% with this type.
%    \begin{macrocode}
\newcommand*{\@grantawarded}{%
\c@raetmp=0\relax
\rae@contfalse
\loop
\advance\c@raetmp by 1\relax
\ifrae@cont\newpage\fi
\rae@conttrue
\@grantawardedseg{\c@raetmp}
\ifnum\c@raetmp<\c@grantawarded
\repeat
}
%    \end{macrocode}
% Is there enough room to append a new row? Syntax:
% |\@checkenoughroom{[|\meta{above}|]{|\meta{count}|}{|\meta{list}|}{|\meta{new 
% row}|}|.
% \meta{above} indicates material above this table (which is 
% physically to the left since it's sideways on.)
%    \begin{macrocode}
\newif\ifrae@enoughroom
\newlength\rae@h
\newlength\rae@d
\newsavebox\rae@sbox
\newcommand*{\@checkenoughroom}[4][]{%
\begin{lrbox}{\rae@sbox}
\begin{minipage}{\textheight}
\csname @#3header\endcsname
\csname @#3\romannumeral#2\endcsname
#4
\end{tabular}%
\end{minipage}
\end{lrbox}
\settoheight{\rae@h}{\usebox\rae@sbox}%
\settodepth{\rae@d}{\usebox\rae@sbox}%
\advance\rae@h by \rae@d
\settowidth{\rae@d}{#1}%
\advance\rae@h by \rae@d
\ifdim\rae@h>\textwidth
\rae@enoughroomfalse
\else
\rae@enoughroomtrue
\fi
}
%    \end{macrocode}
% Append row to sideways table. Syntax:
% |\@swappendrow|[|\meta{above}{]|\meta{type}|}{|\meta{counter}|}{|\meta{row}|}{|\meta{\skip}|}|.
% The last parameter is the gap between this table and the one
% before.
%    \begin{macrocode}
\newcommand{\@swappendrow}[5][]{%
\def\@newrow{#4}%
\@checkenoughroom[#1]{#3}{#2}{%
\@newrow}%
\ifrae@enoughroom
\else
\expandafter\ifx\csname @#2\romannumeral#3\endcsname\relax
\def#5{\newpage}%
\else
\advance#3 by 1\relax
\fi
\fi
\@ifundefined{@#2\romannumeral#3}{%
\expandafter\def\csname @#2\romannumeral#3\endcsname{}}{}%
\expandafter\rae@ta\expandafter=\expandafter{\@newrow}
\edef\rae@doappendrow{%
\noexpand\rae@appendrow
{\the\rae@ta}%
\noexpand\to
\expandafter\noexpand\csname @#2\romannumeral#3\endcsname
}%
\rae@doappendrow
}
%    \end{macrocode}
% Add row to grantawarded table.
%    \begin{macrocode}
\newcommand{\grantawarded}[9]{%
\@swappendrow{grantawarded}{\c@grantawarded}{%
#1 & #2 & #3 & #4 & #5 & #6 & #7 & #8 & #9}{\@nil}%
}
%    \end{macrocode}
% Define new counter to keep track of grant pending tables.
%    \begin{macrocode}
\newcount\c@grantpending
\c@grantpending=1\relax
%    \end{macrocode}
% Add line to grant pending list.
%    \begin{macrocode}
\newcommand{\grantpending}[9]{%
\ifnum\c@grantpending=1\relax
\@swappendrow[\@grantawardedseg\c@grantawarded
\@awardedskip]{grantpending}{\c@grantpending}{%
#1 & #2 & #3 & #4 & #5 & #6 & #7 & #8 & #9}{\@awardedskip}%
\else
\@swappendrow{grantpending}{\c@grantpending}{%
#1 & #2 & #3 & #4 & #5 & #6 & #7 & #8 & #9}{\@awardedskip}%
\fi
}
%    \end{macrocode}
% Define table header for grant pending table.
%    \begin{macrocode}
\newcommand*{\@grantpendingheader}{%
\begin{tabular}{|p{0.9in}|p{0.9in}|p{0.9in}|p{0.9in}|p{0.9in}|p{0.9in}|p{0.9in}|p{0.9in}|p{0.9in}|}
\multicolumn{9}{l}{\bfseries\large Table for question 7 
(applications pending)\ifrae@cont\ Continued\fi}\\[10pt]
\hline
\bfseries PI &
\bfseries Co-I &
\bfseries Title &
\bfseries Expected Start date &
\bfseries Expected End date &
\bfseries Date applied for &
\bfseries Amount applied for&
\bfseries Lead school &
\bfseries Funder\\\hline
}
%    \end{macrocode}
% |\@grantpending| should display all the tables associated
% with this type.
%    \begin{macrocode}
\newcommand*{\@grantpending}{%
\c@raetmp=0\relax
\rae@contfalse
\loop
\advance\c@raetmp by 1\relax
\ifrae@cont\newpage\fi
\@grantpendingseg\c@raetmp
\rae@conttrue
\ifnum\c@raetmp<\c@grantpending
\repeat
}
%    \end{macrocode}
% Individual grant pendinged table segment. Argument is the
% segment number.
%    \begin{macrocode}
\newcommand*{\@grantpendingseg}[1]{%
\begin{sideways}
\@grantpendingheader
\expandafter\if\csname @grantpending\romannumeral#1\endcsname\relax
 & & & & & & & & \\\hline
\else
\csname @grantpending\romannumeral#1\endcsname
\fi
\end{tabular}
\end{sideways}
}
%    \end{macrocode}
% Add line to grant planned list.
% Define new counter to keep track of grant planned tables.
%    \begin{macrocode}
\newcount\c@grantplanned
\c@grantplanned=1\relax
%    \end{macrocode}
% Add line to grant planned list.
%    \begin{macrocode}
\newcommand{\grantplanned}[8]{%
\ifnum\c@grantplanned=1\relax
\settowidth{\rae@d}{\@grantawardedseg\c@grantawarded
\@awardedskip\@grantpendingseg\c@grantpending
\@pendingskip}%
\ifdim\rae@d>\textwidth
\@swappendrow[\@grantpendingseg\c@grantpending
\@pendingskip]{grantplanned}{\c@grantplanned}{%
#1 & #2 & #3 & #4 & #5 & #6 & #7 & #8 }{\@pendingskip}%
\else
\@swappendrow[\@grantawardedseg\c@grantawarded
\@awardedskip\@grantpendingseg\c@grantpending
\@pendingskip]{grantplanned}{\c@grantplanned}{%
#1 & #2 & #3 & #4 & #5 & #6 & #7 & #8 }{\@pendingskip}%
\fi
\else
\@swappendrow{grantplanned}{\c@grantplanned}{%
#1 & #2 & #3 & #4 & #5 & #6 & #7 & #8 }{\@pendingskip}%
\fi
}
%    \end{macrocode}
% Define table header for grant planned table.
%    \begin{macrocode}
\newcommand*{\@grantplannedheader}{%
\begin{tabular}{|p{0.9in}|p{0.9in}|p{0.9in}|p{0.95in}|p{1.0in}|p{1.2in}|p{1.2in}|p{1.2in}|}
\multicolumn{8}{l}{\bfseries\large Table for question 8 (planned 
research grants)\ifrae@cont\ Continued\fi}\\[10pt]
\hline
\bfseries PI &
\bfseries Possible Co-Is &
\bfseries Planned Title &
\bfseries Est.\ Expected Start date &
\bfseries Est.\ Expected End date &
\bfseries Planned date of application &
\bfseries Est.\ Amount to be applied for&
\bfseries Likely Funder(s)\\\hline
}
%    \end{macrocode}
% |\@grantplanned| should display all the tables associated
% with this type.
%    \begin{macrocode}
\newcommand*{\@grantplanned}{%
\c@raetmp=0\relax
\rae@contfalse
\loop
\advance\c@raetmp by 1\relax
\ifrae@cont\newpage\fi
\begin{sideways}
\@grantplannedheader
\expandafter\if\csname @grantplanned\romannumeral\c@raetmp\endcsname\relax
 & & & & & & & \\\hline
\else
\csname @grantplanned\romannumeral\c@raetmp\endcsname
\fi
\end{tabular}
\end{sideways}
\rae@conttrue
\ifnum\c@raetmp<\c@grantplanned
\repeat
}
%    \end{macrocode}
% Add line to list of grant applications you would like to make.
%    \begin{macrocode}
\newcommand{\@desiredRGapp}{}
\newcommand{\desiredRGapp}[4]{%
\rae@appendrow{#1 & #2 & #3 & #4}\to\@desiredRGapp}
%    \end{macrocode}
% Add line to list of presentations.
%    \begin{macrocode}
\newcommand{\@presentation}{}
\newcommand{\presentation}[4]{%
\rae@appendrow{#1 & #2 & #3 & #4}\to\@presentation}
%    \end{macrocode}
% Add line to list of future meetings.
%    \begin{macrocode}
\newcommand{\@futuremeeting}{}
\newcommand{\futuremeeting}[4]{%
\rae@appendrow{#1 & #2 & #3 & #4}\to\@futuremeeting}
%    \end{macrocode}
% Add line to list of most important meetings.
%    \begin{macrocode}
\newcommand{\@importantmeeting}{}
\newcommand{\importantmeeting}[2]{%
\rae@appendrow{#1 & #2}\to\@importantmeeting}
%    \end{macrocode}
% Add line to list of major awards.
%    \begin{macrocode}
\newcommand{\@majoraward}{}
\newcommand{\majoraward}[4]{%
\rae@appendrow{#1 & #2 & #3 & #4}\to\@majoraward}
%    \end{macrocode}
% Add line to list of possible future awards.
%    \begin{macrocode}
\newcommand{\@futureaward}{}
\newcommand{\futureaward}[4]{%
\rae@appendrow{#1 & #2 & #3 & #4}\to\@futureaward}
%    \end{macrocode}
% Add line to list of committee memberships.
%    \begin{macrocode}
\newcommand{\@committeemembership}{}
\newcommand{\committeemembership}[3]{%
\rae@appendrow{#1 & #2 & #3}\to\@committeemembership}
%    \end{macrocode}
% Add line to list of possible future committee memberships.
%    \begin{macrocode}
\newcommand{\@membershipaspiration}{}
\newcommand{\membershipaspiration}[3]{%
\rae@appendrow{#1 & #2 & #3}\to\@membershipaspiration}
%    \end{macrocode}
% Add line to list of editorships.
%    \begin{macrocode}
\newcommand{\@editorship}{}
\newcommand{\editorship}[3]{%
\rae@appendrow{#1 & #2 & #3}\to\@editorship}
%    \end{macrocode}
% Add line to list of possible future editorships.
%    \begin{macrocode}
\newcommand{\@editorshipaspiration}{}
\newcommand{\editorshipaspiration}[3]{%
\rae@appendrow{#1 & #2 & #3}\to\@editorshipaspiration}
%    \end{macrocode}
% Add line to list of consultancies.
%    \begin{macrocode}
\newcommand{\@consultancy}{}
\newcommand{\consultancy}[3]{%
\rae@appendrow{#1 & #2 & #3}\to\@consultancy}
%    \end{macrocode}
% Add line to list of possible future consultancies.
%    \begin{macrocode}
\newcommand{\@consultancyaspiration}{}
\newcommand{\consultancyaspiration}[3]{%
\rae@appendrow{#1 & #2 & #3}\to\@consultancyaspiration}
%    \end{macrocode}
% Add line to list of research groupings.
%    \begin{macrocode}
\newcommand{\@researchgrouping}{}
\newcommand{\researchgrouping}[2]{%
\rae@appendrow{#1 & #2}\to\@researchgrouping}
%    \end{macrocode}
% Research plans.
%    \begin{macrocode}
\newcommand{\@researchplan}{}
\newcommand{\researchplan}[1]{\renewcommand{\@researchplan}{#1}}
%    \end{macrocode}
% Research opportunities.
%    \begin{macrocode}
\newcommand{\@researchopportunities}{}
\newcommand{\researchopportunities}[1]{%
\renewcommand{\@researchopportunities}{#1}}
%    \end{macrocode}
% General views
%    \begin{macrocode}
\newcommand{\@generalviews}{}
\newcommand{\generalviews}[1]{\renewcommand{\@generalviews}{#1}}
%    \end{macrocode}
% Print publications section.
%    \begin{macrocode}
\newcommand{\makepubs}{%
\centerline{\bfseries\large
UEA Review for RAE 2008 Individual Survey Form}
\par
\textbf{Please return this form by email to your Head of School by 8\textsuperscript{th} November}
\par
\framebox[\textwidth][l]{\textbf{Name:} \@name}
\par
\framebox[\textwidth][l]{\textbf{School:} \@school}
\par
\section{Publications and other research outputs after 31 December 2000}
\begin{itshape}
These should include all details.

For journals, all authors should be listed, in order they appear in the published article.  Volume number,
page numbers, etc should be included.  If you are listing a publication which is not peer-reviewed (e.g.\
correspondence, a book review, or a comment, please so indicate).  Please also indicate the 2003 impact factor
of the journal, where appropriate.

Information on impact factors for social sciences and sciences is available through `Web of Knowledge',
accessible through the library web pages from UEA machines.  Go to the Library home page, click on `ATHENS' under
`electronic resources' and then scroll down to `Web of Knowledge'.  If you experience any problems, you should
contact the library helpdesk on x2421.

For books, please list all authors in the order they appear in the published piece, as well as indicating page numbers.
If you are an editor of a book or a set of Proceedings, please make this clear.  If you are an author of a chapter in an
edited book or Proceedings (including where you, yourself, are an editor), please list all authors and page numbers.
In the case of a set of Proceedings, please give details of the Meeting (title, date etc).  Please indicate if the
piece was peer-reviewed.

Please include \textbf{all} your publications after 31 December 2000, and rank-order the publications by your own judgement
of suitability for submission in RAE 2008.

For joint publications please indicate with an asterisk the senior author.

You may be asked to provide a reprint/copy, or partial copy of longer pieces, if your School does not already have a copy.
This may be used for the purposes of RAE review.
\end{itshape}
\@publications
\par
Ra = RAE Rank; JIF = Journal Impact Factor 2003; Re = Peer-reviewed, ``y'' or ``n''.

\section{Publications In Press (and other outputs which are ready for delivery)}

\begin{itshape}
These are publications which have been \underline{accepted} by the Journal/Publisher --- who are in
possession of the full and completed text.  Please indicate estimated publication date.  Also indicate
your assessment of the RAE 2008 ranking, relative to the ranking above in 1 (e.g.\ ``4'', or ``better than 2 above'').
You may be asked to provide a copy or partial copy, of the texts.  Again, please indicate with an asterisk the senior
author in joint publications.
\end{itshape}
\@accepted

\section{Publications Submitted and other Outputs which are being considered}

\begin{itshape}
These are publications which have been \underline{submitted} to a journal, or full text which has been \underline{submitted}
to a publisher, and for which you have not yet received formal confirmation of publication.  This section should also
include pieces ``in review'', and for which final modifications are being made.  Please estimate publication date, if
accepted. Please also provide your assessment of the RAE Rank (relative to those publications in 1 above).  You may be
asked to provide a copy, or partial copy, of the texts.
\end{itshape}
\@submitted

\section{Publications and Other Outputs Planned}

\begin{itshape}
Please detail publications which you are planning and which you expect to have been published before the RAE 2008
cut-off date (31 July 2007). Indicate the target Journal/Publisher.  Please make a realistic assessment of Journal/Publisher
turnaround times.  Make the same assessment of possible RAE ranking (relative to 1 above).
\end{itshape}
\@planned

\section{Publications/Outputs You Would Like to See Published/Delivered Before RAE 2008}

\begin{itshape}
In this section, please give details of a piece of research you believe, if published before 31 July 2007,
will be a high scorer in RAE terms, but which --- at the moment --- is unlikely to be published before the
cut-off date.  Indicate target Journal (including impact factor) or Publisher.  Please be realistic about
Journal/Publisher turn-round times.

Give no more than about 50 words description of the research.

Are these publications contingent on the success of a pending research grant application?  Are there other
constraints which you believe could be removed to allow this publication to go ahead?

Please indicate by an asterisk the senior author.
\end{itshape}
\@wouldlike
}
%    \end{macrocode}
% Print the grants section.
%    \begin{macrocode}
\newcommand{\makegrants}{
\section{Research Grants awarded after 31 December 2000}
\begin{itshape}
Research services are provided a list of all active grants you have held since 1 January 2001.  You can
list any that are missing on the tables at the end of this document or indicate on the report you are provided.
For any missing grants, please provide as much information as is shown on the printouts or requested in the tables
as possible.

You will find tables at the end of this document in which to enter any extra information for questions 6, 7 and 8.
\end{itshape}

\section{Research Grants Pending}

\begin{itshape}
Research services are also providing a list of any applications that are pending.  Please follow instructions as for
6 above.
\end{itshape}

\section{Planned Research Grants}

\begin{itshape}
Please list similar information as for 7 above (insofar as you can).  List all possible applicants (include
brief affiliations for those not at UEA).  A table for completion is provided at the end of the document.
\end{itshape}

\section{Research Grant Applications You Would Like to Make in the next Two Years}

\begin{itshape}
Please provide details of a research application you would like to make, but which may turn out to be unlikely
because of current constraints.  What are those constraints?  Can they be realistically removed?
\end{itshape}
\ifthenelse{\equal{\@desiredRGapp}{}}{\renewcommand{\@desiredRGapp}{ & & & \\\hline}}{}
\begin{longtable}{|p{0.7in}|p{3.4in}|p{0.6in}|p{0.9in}|}\hline
\centering\bfseries PIs and Co-Is &
\centering\bfseries Title/description &
\centering\bfseries Funding body and amount &
{\centering\bfseries Dates of \newline research \& of application\par}\\\hline
\@desiredRGapp
\end{longtable}
}
%    \end{macrocode}
% Print the presentations section.
%    \begin{macrocode}
\newcommand{\makepresentations}{
\section{Presentation at Major Conferences/Meetings since December 31 2000}

\begin{itshape}
Please list presentations you \textbf{personally} have made at major research meetings.  These should be meetings which are,
within your research community, important (i) internationally (ii) nationally.  They should not include local or regional
events, and they should have been attended by internationally --- or nationally-recognised researchers in your own area of
research.  Some colleagues will have attended many such events; for those who have, please give one or two examples per year,
and estimate the total number you have attended over the period 1 January 2001 to present.
\end{itshape}
\ifthenelse{\equal{\@presentation}{}}{\renewcommand{\@presentation}{ & & & \\\hline}}{}
\begin{longtable}{|p{1in}|p{0.8in}|p{3in}|p{0.8in}|}\hline
\bfseries Conference &
\bfseries Date \&\newline Venue &
\bfseries Presentation &
\bfseries Type \newline
Keynote, \newline
Invited,\newline
Lecture,\newline
Poster, etc\\\hline
\@presentation
\end{longtable}

\section{Future Major Conferences/Meetings at which you are definitely making a presentation}

\begin{itshape}
Please provide similar information as for 10 above.  For those researchers who have many to attend, please give a few
examples.
\end{itshape}
\ifthenelse{\equal{\@futuremeeting}{}}{\renewcommand{\@futuremeeting}{ & & & \\\hline}}{}
\begin{longtable}{|p{1in}|p{0.8in}|p{3in}|p{0.8in}|}\hline
\bfseries Conference &
\bfseries Date \&\newline Venue &
\bfseries Presentation &
\bfseries Type \newline
Keynote, \newline
Invited,\newline
Lecture,\newline
Poster, etc\\\hline
\@futuremeeting
\end{longtable}

\section{What are the most Important International/National Conference/Meetings in your research area within the next two years?}

\begin{itshape}
\end{itshape}
\ifthenelse{\equal{\@importantmeeting}{}}{\renewcommand{\@importantmeeting}{ & \\\hline}}{}
\begin{longtable}{|p{0.48\textwidth}|p{0.47\textwidth}|}
\hline
\bfseries Conference &
\bfseries Date and Venue\\\hline
\@importantmeeting
\end{longtable}
}
%    \end{macrocode}
% Print major awards section.
%    \begin{macrocode}
\newcommand{\makeawards}{
\section{Major Awards/Recognitions after December 31 2000}

\begin{itshape}
Please list Major Awards, Medals, Recognitions you have received during the period 1 January 2001 to the present.  These
awards should be significant at the international and/or national scales, and they should be in recognition of research
excellence or for excellent contributions to international and/or national research strategy/management.
\end{itshape}
\ifthenelse{\equal{\@majoraward}{}}{\renewcommand{\@majoraward}{ & & & \\\hline}}{}
\begin{longtable}{|p{1.5in}|p{1.0in}|p{1.6in}|p{1.5in}|}\hline
\bfseries Title of Award &
\bfseries Date &
\bfseries Awarding Body&
\bfseries Reason for Award\\\hline
\@majoraward
\end{longtable}

\section{Possible Future Awards, up to July 31 2007}

\begin{itshape}
Do you have an award in your sights?  Please give a realistic assessment of your chances.
\end{itshape}
\ifthenelse{\equal{\@futureaward}{}}{\renewcommand{\@futureaward}{ & & & \\\hline}}{}
\begin{longtable}{|p{1.5in}|p{1.0in}|p{1.6in}|p{1.5in}|}\hline
\bfseries Title of Award &
\bfseries Date &
\bfseries Awarding Body&
\bfseries Reason for Award\\\hline
\@futureaward
\end{longtable}
}
%    \end{macrocode}
% Print membership section
%    \begin{macrocode}
\newcommand{\makemembership}{
\section{Membership of International/National Research/Learned Bodies, Steering Committees etc.\
(after 31 December 2000)}

\begin{itshape}
Please list Membership of Bodies which, you believe, reflects your research standing in the international/national
research communities.  Indicate your role (Chair, Secretary, Regional Member etc).
\end{itshape}
\ifthenelse{\equal{\@committeemembership}{}}{\renewcommand{\@committeemembership}{ & & \\\hline}}{}
\begin{longtable}{|p{1.9in}|p{1.9in}|p{1.9in}|}\hline
\bfseries Body &
\bfseries Position/Role &
\bfseries Period of Membership\\\hline
\@committeemembership
\end{longtable}

\section{Possible Future Membership of International/National Research/Learned Bodies, Steering Committees etc?}

\begin{itshape}
Do you have realistic aspirations for membership?  If so, please detail.
\end{itshape}
\ifthenelse{\equal{\@membershipaspiration}{}}{\renewcommand{\@membershipaspiration}{ & & \\\hline}}{}
\begin{longtable}{|p{1.9in}|p{1.9in}|p{1.9in}|}\hline
\bfseries Body &
\bfseries Position/Role &
\bfseries Period of Membership\\\hline
\@membershipaspiration
\end{longtable}

\section{Editorships/Editorial Boards (after 31 December 2000)}
\begin{itshape}
\end{itshape}
\ifthenelse{\equal{\@editorship}{}}{\renewcommand{\@editorship}{ & & \\\hline}}{}
\begin{longtable}{|p{1.9in}|p{2.9in}|p{0.9in}|}\hline
\bfseries Journal/Series &
\bfseries Position\newline e.g.\ Chief Editor, Member Ed.\ Board etc &
\bfseries Period\\\hline
\@editorship
\end{longtable}

\section{Possible Future Editorships, or Membership of Editorial Boards}

\begin{itshape}
Do you have realistic aspirations? If so, please detail.
\end{itshape}
\ifthenelse{\equal{\@editorshipaspiration}{}}{\renewcommand{\@editorshipaspiration}{ & & \\\hline}}{}
\begin{longtable}{|p{1.9in}|p{2.9in}|p{0.9in}|}\hline
\bfseries Journal/Series &
\bfseries Position\newline e.g.\ Chief Editor, Member Ed.\ Board etc &
\bfseries Start date\\\hline
\@editorshipaspiration
\end{longtable}

\section{Membership of Advisory Bodies/Consultancies}

\begin{itshape}
Are you a member of a body, with international/national significance, which advises on government/public policy,
knowledge transfer, application of research etc?  Please also include here industrial/company consultancies.
\end{itshape}
\ifthenelse{\equal{\@consultancy}{}}{\renewcommand{\@consultancy}{ & & \\\hline}}{}
\begin{longtable}{|p{1.9in}|p{2.9in}|p{0.9in}|}\hline
\bfseries Body &
\bfseries Position &
\bfseries Period\\\hline
\@consultancy
\end{longtable}

\section{Possible Future Membership of Advisory Bodies/Consultancies}

\begin{itshape}
Do you have realistic apsirations? If so, please detail.
\end{itshape}
\ifthenelse{\equal{\@consultancyaspiration}{}}{\renewcommand{\@consultancyaspiration}{ & & \\\hline}}{}
\begin{longtable}{|p{1.9in}|p{2.9in}|p{0.9in}|}\hline
\bfseries Body &
\bfseries Position &
\bfseries Period\\\hline
\@consultancyaspiration
\end{longtable}
}
%    \end{macrocode}
% Print research section.
%    \begin{macrocode}
\newcommand{\makeresearch}{
\section{Research Grouping}
\begin{itshape}
With which other researchers (School, UEA, NRP) do you see yourself forming a coherent research group or cluster?
\end{itshape}
\ifthenelse{\equal{\@researchgrouping}{}}{\renewcommand{\@researchgrouping}{ & \\\hline}}{}
\begin{longtable}{|p{1.9in}|p{3.95in}|}\hline
\bfseries Name&
\bfseries Affiliation \\\hline
\@researchgrouping
\end{longtable}

\section{Your Research Plans/Strategy}

\begin{itshape}
Please describe, in 100 words or less, how you would like your research to develop in the period from the present to
2010.  Do you have a clear idea of how your research fits into your School's research plans/strategies?
\end{itshape}
\begin{longtable}{|p{\textwidth}|}
\hline\endhead
\\\hline\endfoot
\@researchplan
\end{longtable}

\section{Research Opportunities for your School/UEA/NRP}

\begin{itshape}
If you believe that there are real research opportunities, currently unidentified at School or University level,
please describe them heer in 50 words or less.  In particular, please bear in mind collaborations across the whole
NRP.
\end{itshape}
\begin{longtable}{|p{\textwidth}|}
\hline\endhead
\\\hline\endfoot
\@researchopportunities
\end{longtable}

\section{Your General Views on your Research, your Activity Profile, and School/UEA Priorities}

\begin{itshape}
Here is an opportunity for you to make comments about the status of your research, your research plans, how you
perceive your research fitting into the School's plans or the university's priorities, difficulties in attaining
your research objectives, any concerns or thoughts that you have about your own activity profile both now and in the
future etc.
\end{itshape}

\begin{bfseries}
If you wish to make confidential comments, you can do so direct to Professor Davies, via e-mail to
t.d.davies@uea.ac.uk.
\end{bfseries}
\begin{longtable}{|p{\textwidth}|}
\hline\endhead
\\\hline\endfoot
\@generalviews
\end{longtable}
}
%    \end{macrocode}
% Gap between grant tables
%    \begin{macrocode}
\newcommand*{\@awardedskip}{\hspace{10pt}}
\newcommand*{\@pendingskip}{\hspace{10pt}}
%    \end{macrocode}
% Print grant tables
%    \begin{macrocode}
\newcommand{\makegranttables}{
\@grantawarded
\@awardedskip
\@grantpending
\@pendingskip
\@grantplanned
}
%    \end{macrocode}
% Put it all together, and print the entire form.
%    \begin{macrocode}
\newcommand{\makeform}{\makepubs
\makegrants
\makepresentations
\makeawards
\makemembership
\makeresearch
\makegranttables}
%    \end{macrocode}
%    \begin{macrocode}
%</raeisf.cls>
%    \end{macrocode}
%    \begin{macrocode}
%<*raeisf.bst>
%    \end{macrocode}
%    \begin{macrocode}
 % BibTeX bibliography style `raeisf' based on `abbrv'

ENTRY
  { address
    author
    booktitle
    chapter
    edition
    editor
    howpublished
    institution
    journal
    key
    month
    note
    number
    organization
    pages
    publisher
    school
    series
    title
    type
    volume
    year
    rank
    jif
    reviewed
  }
  {}
  { label }

INTEGERS { output.state before.all mid.sentence after.sentence after.block between.cols }

FUNCTION {init.state.consts}
{ #0 'before.all :=
  #1 'mid.sentence :=
  #2 'after.sentence :=
  #3 'after.block :=
  #4 'between.cols :=
}

STRINGS { s t }

FUNCTION {output.nonnull}
{ 's :=
  output.state mid.sentence =
    { ", " * write$ }
    { output.state after.block =
        { add.period$ write$
          newline$
          "\newblock " write$
        }
        { output.state before.all =
            'write$
            { output.state between.cols =
                { " & " * write$ }
                {add.period$ " " * write$}
              if$
            }
          if$
        }
      if$
      mid.sentence 'output.state :=
    }
  if$
  s
}

FUNCTION {output}
{ duplicate$ empty$
    'pop$
    'output.nonnull
  if$
}

FUNCTION {output.check}
{ 't :=
  duplicate$ empty$
    { pop$ "empty " t * " in " * cite$ * warning$ }
    'output.nonnull
  if$
}

FUNCTION {output.bibitem}
{ newline$
  "\bibitem{" write$
  cite$ write$
  "}" write$
  newline$
  ""
  before.all 'output.state :=
}

FUNCTION {fin.entry}
{ " \\\hline " *
  write$
}

FUNCTION {new.block}
{ output.state before.all =
    'skip$
    { after.block 'output.state := }
  if$
}

FUNCTION {new.sentence}
{ output.state after.block =
    'skip$
    { output.state before.all =
        'skip$
        { after.sentence 'output.state := }
      if$
    }
  if$
}

FUNCTION {not}
{   { #0 }
    { #1 }
  if$
}

FUNCTION {and}
{   'skip$
    { pop$ #0 }
  if$
}

FUNCTION {or}
{   { pop$ #1 }
    'skip$
  if$
}

FUNCTION {new.block.checka}
{ empty$
    'skip$
    'new.block
  if$
}

FUNCTION {new.block.checkb}
{ empty$
  swap$ empty$
  and
    'skip$
    'new.block
  if$
}

FUNCTION {new.sentence.checka}
{ empty$
    'skip$
    'new.sentence
  if$
}

FUNCTION {new.sentence.checkb}
{ empty$
  swap$ empty$
  and
    'skip$
    'new.sentence
  if$
}

FUNCTION {field.or.null}
{ duplicate$ empty$
    { pop$ "" }
    'skip$
  if$
}

FUNCTION {emphasize}
{ duplicate$ empty$
    { pop$ "" }
    { "{\em " swap$ * "}" * }
  if$
}

INTEGERS { nameptr namesleft numnames }

FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
      nameptr #1 >
        { namesleft #1 >
            { ", " * t * }
            { numnames #2 >
                { "," * }
                'skip$
              if$
              t "others" =
                { " et~al." * }
                { " and " * t * }
              if$
            }
          if$
        }
        't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}

FUNCTION {format.authors}
{ author empty$
    { "" }
    { author format.names }
  if$
}

FUNCTION {format.editors}
{ editor empty$
    { "" }
    { editor format.names
      editor num.names$ #1 >
        { ", editors" * }
        { ", editor" * }
      if$
    }
  if$
}

FUNCTION {format.title}
{ title empty$
    { "" }
    { title "t" change.case$ }
  if$
}

FUNCTION {format.rank}
{ rank empty$
    { " " }
    { rank }
  if$
}

FUNCTION {format.jif}
{ jif empty$
    { "\mbox{} " }
    { jif }
  if$
}

FUNCTION {format.reviewed}
{ reviewed empty$
    { " \mbox{} " }
    { reviewed }
  if$
}

FUNCTION {n.dashify}
{ 't :=
  ""
    { t empty$ not }
    { t #1 #1 substring$ "-" =
        { t #1 #2 substring$ "--" = not
            { "--" *
              t #2 global.max$ substring$ 't :=
            }
            {   { t #1 #1 substring$ "-" = }
                { "-" *
                  t #2 global.max$ substring$ 't :=
                }
              while$
            }
          if$
        }
        { t #1 #1 substring$ *
          t #2 global.max$ substring$ 't :=
        }
      if$
    }
  while$
}

FUNCTION {format.date}
{ year empty$
    { month empty$
        { "" }
        { "there's a month but no year in " cite$ * warning$
          month
        }
      if$
    }
    { month empty$
        'year
        { month " " * year * }
      if$
    }
  if$
}

FUNCTION {format.btitle}
{ title emphasize
}

FUNCTION {tie.or.space.connect}
{ duplicate$ text.length$ #3 <
    { "~" }
    { " " }
  if$
  swap$ * *
}

FUNCTION {either.or.check}
{ empty$
    'pop$
    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  if$
}

FUNCTION {format.bvolume}
{ volume empty$
    { "" }
    { "volume" volume tie.or.space.connect
      series empty$
        'skip$
        { " of " * series emphasize * }
      if$
      "volume and number" number either.or.check
    }
  if$
}

FUNCTION {format.number.series}
{ volume empty$
    { number empty$
        { series field.or.null }
        { output.state mid.sentence =
            { "number" }
            { "Number" }
          if$
          number tie.or.space.connect
          series empty$
            { "there's a number but no series in " cite$ * warning$ }
            { " in " * series * }
          if$
        }
      if$
    }
    { "" }
  if$
}

FUNCTION {format.edition}
{ edition empty$
    { "" }
    { output.state mid.sentence =
        { edition "l" change.case$ " edition" * }
        { edition "t" change.case$ " edition" * }
      if$
    }
  if$
}

INTEGERS { multiresult }

FUNCTION {multi.page.check}
{ 't :=
  #0 'multiresult :=
    { multiresult not
      t empty$ not
      and
    }
    { t #1 #1 substring$
      duplicate$ "-" =
      swap$ duplicate$ "," =
      swap$ "+" =
      or or
        { #1 'multiresult := }
        { t #2 global.max$ substring$ 't := }
      if$
    }
  while$
  multiresult
}

FUNCTION {format.pages}
{ pages empty$
    { "" }
    { pages multi.page.check
        { "pages" pages n.dashify tie.or.space.connect }
        { "page" pages tie.or.space.connect }
      if$
    }
  if$
}

FUNCTION {format.vol.num.pages}
{ volume field.or.null
  number empty$
    'skip$
    { "(" number * ")" * *
      volume empty$
        { "there's a number but no volume in " cite$ * warning$ }
        'skip$
      if$
    }
  if$
  pages empty$
    'skip$
    { duplicate$ empty$
        { pop$ format.pages }
        { ":" * pages n.dashify * }
      if$
    }
  if$
}

FUNCTION {format.chapter.pages}
{ chapter empty$
    'format.pages
    { type empty$
        { "chapter" }
        { type "l" change.case$ }
      if$
      chapter tie.or.space.connect
      pages empty$
        'skip$
        { ", " * format.pages * }
      if$
    }
  if$
}

FUNCTION {format.in.ed.booktitle}
{ booktitle empty$
    { "" }
    { editor empty$
        { "In " booktitle emphasize * }
        { "In " format.editors * ", " * booktitle emphasize * }
      if$
    }
  if$
}

FUNCTION {empty.misc.check}
{ author empty$ title empty$ howpublished empty$
  month empty$ year empty$ note empty$
  and and and and and
  key empty$ not and
    { "all relevant fields are empty in " cite$ * warning$ }
    'skip$
  if$
}

FUNCTION {format.thesis.type}
{ type empty$
    'skip$
    { pop$
      type "t" change.case$
    }
  if$
}

FUNCTION {format.tr.number}
{ type empty$
    { "Technical Report" }
    'type
  if$
  number empty$
    { "t" change.case$ }
    { number tie.or.space.connect }
  if$
}

FUNCTION {format.article.crossref}
{ key empty$
    { journal empty$
        { "need key or journal for " cite$ * " to crossref " * crossref *
          warning$
          ""
        }
        { "In {\em " journal * "\/}" * }
      if$
    }
    { "In " key * }
  if$
  " \cite{" * crossref * "}" *
}

FUNCTION {format.crossref.editor}
{ editor #1 "{vv~}{ll}" format.name$
  editor num.names$ duplicate$
  #2 >
    { pop$ " et~al." * }
    { #2 <
        'skip$
        { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
            { " et~al." * }
            { " and " * editor #2 "{vv~}{ll}" format.name$ * }
          if$
        }
      if$
    }
  if$
}

FUNCTION {format.book.crossref}
{ volume empty$
    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
      "In "
    }
    { "Volume" volume tie.or.space.connect
      " of " *
    }
  if$
  editor empty$
  editor field.or.null author field.or.null =
  or
    { key empty$
        { series empty$
            { "need editor, key, or series for " cite$ * " to crossref " *
              crossref * warning$
              "" *
            }
            { "{\em " * series * "\/}" * }
          if$
        }
        { key * }
      if$
    }
    { format.crossref.editor * }
  if$
  " \cite{" * crossref * "}" *
}

FUNCTION {format.incoll.inproc.crossref}
{ editor empty$
  editor field.or.null author field.or.null =
  or
    { key empty$
        { booktitle empty$
            { "need editor, key, or booktitle for " cite$ * " to crossref " *
              crossref * warning$
              ""
            }
            { "In {\em " booktitle * "\/}" * }
          if$
        }
        { "In " key * }
      if$
    }
    { "In " format.crossref.editor * }
  if$
  " \cite{" * crossref * "}" *
}

FUNCTION {article}
{ output.bibitem
  format.rank output
  between.cols 'output.state :=
  format.authors "author" output.check
  new.block
  format.title "title" output.check
  new.block
  crossref missing$
    { journal emphasize "journal" output.check
      format.vol.num.pages output
      format.date "year" output.check
    }
    { format.article.crossref output.nonnull
      format.pages output
    }
  if$
  new.block
  note output
  between.cols 'output.state :=
  format.jif output
  between.cols 'output.state :=
  format.reviewed output
  fin.entry
}

FUNCTION {book}
{ output.bibitem
  format.rank output
  between.cols 'output.state :=
  author empty$
    { format.editors "author and editor" output.check }
    { format.authors output.nonnull
      crossref missing$
        { "author and editor" editor either.or.check }
        'skip$
      if$
    }
  if$
  new.block
  format.btitle "title" output.check
  crossref missing$
    { format.bvolume output
      new.block
      format.number.series output
      new.sentence
      publisher "publisher" output.check
      address output
    }
    { new.block
      format.book.crossref output.nonnull
    }
  if$
  format.edition output
  format.date "year" output.check
  new.block
  note output
  between.cols 'output.state :=
  format.jif output
  between.cols 'output.state :=
  format.reviewed output
  fin.entry
}

FUNCTION {booklet}
{ output.bibitem
  format.rank output
  between.cols 'output.state :=
  format.authors output
  new.block
  format.title "title" output.check
  howpublished address new.block.checkb
  howpublished output
  address output
  format.date output
  new.block
  note output
  between.cols 'output.state :=
  format.jif output
  between.cols 'output.state :=
  format.reviewed output
  fin.entry
}

FUNCTION {inbook}
{ output.bibitem
  format.rank output
  between.cols 'output.state :=
  author empty$
    { format.editors "author and editor" output.check }
    { format.authors output.nonnull
      crossref missing$
        { "author and editor" editor either.or.check }
        'skip$
      if$
    }
  if$
  new.block
  format.btitle "title" output.check
  crossref missing$
    { format.bvolume output
      format.chapter.pages "chapter and pages" output.check
      new.block
      format.number.series output
      new.sentence
      publisher "publisher" output.check
      address output
    }
    { format.chapter.pages "chapter and pages" output.check
      new.block
      format.book.crossref output.nonnull
    }
  if$
  format.edition output
  format.date "year" output.check
  new.block
  note output
  between.cols 'output.state :=
  format.jif output
  between.cols 'output.state :=
  format.reviewed output
  fin.entry
}

FUNCTION {incollection}
{ output.bibitem
  format.rank output
  between.cols 'output.state :=
  format.authors "author" output.check
  new.block
  format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
      format.chapter.pages output
      new.sentence
      publisher "publisher" output.check
      address output
      format.edition output
      format.date "year" output.check
    }
    { format.incoll.inproc.crossref output.nonnull
      format.chapter.pages output
    }
  if$
  new.block
  note output
  between.cols 'output.state :=
  format.jif output
  between.cols 'output.state :=
  format.reviewed output
  fin.entry
}

FUNCTION {inproceedings}
{ output.bibitem
  format.rank output
  between.cols 'output.state :=
  format.authors "author" output.check
  new.block
  format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
      format.pages output
      address empty$
        { organization publisher new.sentence.checkb
          organization output
          publisher output
          format.date "year" output.check
        }
        { address output.nonnull
          format.date "year" output.check
          new.sentence
          organization output
          publisher output
        }
      if$
    }
    { format.incoll.inproc.crossref output.nonnull
      format.pages output
    }
  if$
  new.block
  note output
  between.cols 'output.state :=
  format.jif output
  between.cols 'output.state :=
  format.reviewed output
  fin.entry
}

FUNCTION {conference} { inproceedings }

FUNCTION {manual}
{ output.bibitem
  format.rank output
  between.cols 'output.state :=
  author empty$
    { organization empty$
        'skip$
        { organization output.nonnull
          address output
        }
      if$
    }
    { format.authors output.nonnull }
  if$
  new.block
  format.btitle "title" output.check
  author empty$
    { organization empty$
        { address new.block.checka
          address output
        }
        'skip$
      if$
    }
    { organization address new.block.checkb
      organization output
      address output
    }
  if$
  format.edition output
  format.date output
  new.block
  note output
  between.cols 'output.state :=
  format.jif output
  between.cols 'output.state :=
  format.reviewed output
  fin.entry
}

FUNCTION {mastersthesis}
{ output.bibitem
  format.rank output
  between.cols 'output.state :=
  format.authors "author" output.check
  new.block
  format.title "title" output.check
  new.block
  "Master's thesis" format.thesis.type output.nonnull
  school "school" output.check
  address output
  format.date "year" output.check
  new.block
  note output
  between.cols 'output.state :=
  format.jif output
  between.cols 'output.state :=
  format.reviewed output
  fin.entry
}

FUNCTION {misc}
{ output.bibitem
  format.rank output
  between.cols 'output.state :=
  format.authors output
  title howpublished new.block.checkb
  format.title output
  howpublished new.block.checka
  howpublished output
  format.date output
  new.block
  note output
  between.cols 'output.state :=
  format.jif output
  between.cols 'output.state :=
  format.reviewed output
  fin.entry
  empty.misc.check
}

FUNCTION {phdthesis}
{ output.bibitem
  format.rank output
  between.cols 'output.state :=
  format.authors "author" output.check
  new.block
  format.btitle "title" output.check
  new.block
  "PhD thesis" format.thesis.type output.nonnull
  school "school" output.check
  address output
  format.date "year" output.check
  new.block
  note output
  between.cols 'output.state :=
  format.jif output
  between.cols 'output.state :=
  format.reviewed output
  fin.entry
}

FUNCTION {proceedings}
{ output.bibitem
  format.rank output
  between.cols 'output.state :=
  editor empty$
    { organization output }
    { format.editors output.nonnull }
  if$
  new.block
  format.btitle "title" output.check
  format.bvolume output
  format.number.series output
  address empty$
    { editor empty$
        { publisher new.sentence.checka }
        { organization publisher new.sentence.checkb
          organization output
        }
      if$
      publisher output
      format.date "year" output.check
    }
    { address output.nonnull
      format.date "year" output.check
      new.sentence
      editor empty$
        'skip$
        { organization output }
      if$
      publisher output
    }
  if$
  new.block
  note output
  between.cols 'output.state :=
  format.jif output
  between.cols 'output.state :=
  format.reviewed output
  fin.entry
}

FUNCTION {techreport}
{ output.bibitem
  format.rank output
  between.cols 'output.state :=
  format.authors "author" output.check
  new.block
  format.title "title" output.check
  new.block
  format.tr.number output.nonnull
  institution "institution" output.check
  address output
  format.date "year" output.check
  new.block
  note output
  between.cols 'output.state :=
  format.jif output
  between.cols 'output.state :=
  format.reviewed output
  fin.entry
}

FUNCTION {unpublished}
{ output.bibitem
  format.rank output
  between.cols 'output.state :=
  format.authors "author" output.check
  new.block
  format.title "title" output.check
  new.block
  note "note" output.check
  format.date output
  between.cols 'output.state :=
  format.jif output
  between.cols 'output.state :=
  format.reviewed output
  fin.entry
}

FUNCTION {default.type} { misc }

MACRO {jan} {"Jan."}

MACRO {feb} {"Feb."}

MACRO {mar} {"Mar."}

MACRO {apr} {"Apr."}

MACRO {may} {"May"}

MACRO {jun} {"June"}

MACRO {jul} {"July"}

MACRO {aug} {"Aug."}

MACRO {sep} {"Sept."}

MACRO {oct} {"Oct."}

MACRO {nov} {"Nov."}

MACRO {dec} {"Dec."}

MACRO {acmcs} {"ACM Comput. Surv."}

MACRO {acta} {"Acta Inf."}

MACRO {cacm} {"Commun. ACM"}

MACRO {ibmjrd} {"IBM J. Res. Dev."}

MACRO {ibmsj} {"IBM Syst.~J."}

MACRO {ieeese} {"IEEE Trans. Softw. Eng."}

MACRO {ieeetc} {"IEEE Trans. Comput."}

MACRO {ieeetcad}
 {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}

MACRO {ipl} {"Inf. Process. Lett."}

MACRO {jacm} {"J.~ACM"}

MACRO {jcss} {"J.~Comput. Syst. Sci."}

MACRO {scp} {"Sci. Comput. Programming"}

MACRO {sicomp} {"SIAM J. Comput."}

MACRO {tocs} {"ACM Trans. Comput. Syst."}

MACRO {tods} {"ACM Trans. Database Syst."}

MACRO {tog} {"ACM Trans. Gr."}

MACRO {toms} {"ACM Trans. Math. Softw."}

MACRO {toois} {"ACM Trans. Office Inf. Syst."}

MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}

MACRO {tcs} {"Theoretical Comput. Sci."}

READ

FUNCTION {sortify}
{ purify$
  "l" change.case$
}

INTEGERS { len }

FUNCTION {chop.word}
{ 's :=
  'len :=
  s #1 len substring$ =
    { s len #1 + global.max$ substring$ }
    's
  if$
}

FUNCTION {sort.format.names}
{ 's :=
  #1 'nameptr :=
  ""
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { nameptr #1 >
        { "   " * }
        'skip$
      if$
      s nameptr "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}" format.name$ 't :=
      nameptr numnames = t "others" = and
        { "et al" * }
        { t sortify * }
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}

FUNCTION {sort.format.title}
{ 't :=
  "A " #2
    "An " #3
      "The " #4 t chop.word
    chop.word
  chop.word
  sortify
  #1 global.max$ substring$
}

FUNCTION {author.sort}
{ author empty$
    { key empty$
        { "to sort, need author or key in " cite$ * warning$
          ""
        }
        { key sortify }
      if$
    }
    { author sort.format.names }
  if$
}

FUNCTION {author.editor.sort}
{ author empty$
    { editor empty$
        { key empty$
            { "to sort, need author, editor, or key in " cite$ * warning$
              ""
            }
            { key sortify }
          if$
        }
        { editor sort.format.names }
      if$
    }
    { author sort.format.names }
  if$
}

FUNCTION {author.organization.sort}
{ author empty$
    { organization empty$
        { key empty$
            { "to sort, need author, organization, or key in " cite$ * warning$
              ""
            }
            { key sortify }
          if$
        }
        { "The " #4 organization chop.word sortify }
      if$
    }
    { author sort.format.names }
  if$
}

FUNCTION {editor.organization.sort}
{ editor empty$
    { organization empty$
        { key empty$
            { "to sort, need editor, organization, or key in " cite$ * warning$
              ""
            }
            { key sortify }
          if$
        }
        { "The " #4 organization chop.word sortify }
      if$
    }
    { editor sort.format.names }
  if$
}

FUNCTION {presort}
{ type$ "book" =
  type$ "inbook" =
  or
    'author.editor.sort
    { type$ "proceedings" =
        'editor.organization.sort
        { type$ "manual" =
            'author.organization.sort
            'author.sort
          if$
        }
      if$
    }
  if$
  "    "
  *
  year field.or.null sortify
  *
  "    "
  *
  title field.or.null
  sort.format.title
  *
  #1 entry.max$ substring$
  'sort.key$ :=
}

ITERATE {presort}

SORT

STRINGS { longest.label }

INTEGERS { number.label longest.label.width }

FUNCTION {initialize.longest.label}
{ "" 'longest.label :=
  #1 'number.label :=
  #0 'longest.label.width :=
}

FUNCTION {longest.label.pass}
{ number.label int.to.str$ 'label :=
  number.label #1 + 'number.label :=
  label width$ longest.label.width >
    { label 'longest.label :=
      label width$ 'longest.label.width :=
    }
    'skip$
  if$
}

EXECUTE {initialize.longest.label}

ITERATE {longest.label.pass}

FUNCTION {begin.bib}
{ preamble$ empty$
    'skip$
    { preamble$ write$ newline$ }
  if$
  "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
}

EXECUTE {begin.bib}

EXECUTE {init.state.consts}

ITERATE {call.type$}

FUNCTION {end.bib}
{ newline$
  "\end{thebibliography}" write$ newline$
}

EXECUTE {end.bib}
%    \end{macrocode}
%    \begin{macrocode}
%</raeisf.bst>
%    \end{macrocode}
%    \begin{macrocode}
%<*sample.tex>
%    \end{macrocode}
\documentclass{raeisf}

% name of bib file
%\defaultbibliography{} 

\begin{document}

% your name
%\name{}

%your school
\school{School of Computing Sciences}

% 1. Publications and other research outputs after 31 Dec 2000

% Syntax : \publications[bib name]{cite list}

% 2. Publications in press

% Syntax : \accepted[bib name]{cite list}

% 3. Publications Submitted

% Syntax : \submitted[bib name]{cite list}

% 4. Publications planned

% Syntax : \planned[bib name]{cite list}

% 5. Publications/Outputs you would like to see published/delivered

% The description of the research can be entered in the "note" field
% in the bib file.

% Syntax : \wouldlike[bib name]{cite list}

% 6. Research Grants awarded after 31 December 2000.

% Syntax : \grantawarded{PI}{Co-I}{Title}{Start Date}{End Date}{Date Applied for}{Amount Awarded}{Lead School}{funder}
% You can have as many occurances of this command as is required.

% 7. Research grants pending

% Syntax: \grantpending{PI}{Co-I}{Title}{Expected Start Date}{Expected End Date}{Date Applied for}{Amount applied for}{Lead School}{funder}

% 8. Planned Research Grants

% Syntax: \grantplanned{PI}{possible co-I}{planned title}{est. expected start date}{est. expected end date}{planned date of application}{est. amount to be applied for}{likely funder(s)}

% 9. Research grant applications you would like to Make in the next two years.

% Syntax: \desiredRGapp{PIs and Co-Is}{Title/Description}{Funding body and amount}{Dates of research and of application}
% You can have as many occurances of this command as is required.

% 10. Presentations at Major Conferences/Meetings since December 31 2000.

% Syntax: \presentation{conference}{date and venue}{presentation}{type}
% You can have as many occurances of this command as is required.

% 11. Future Major Conferences/Meetings at which you are definitely making a presentation

% Syntax: \futuremeeting{conference}{date and venue}{presentation}{type}
% You can have as many occurances of this command as required.

% 12. What are the most Important International/National Conference/Meetings
% in your research area within the next two years?

% Syntax: \importantmeeting{conference}{date and venue}
% You can have as many occurances of this command as required.


% 13. Major Awards/Recognitions after December 31 2000

% Syntax: \majoraward{title of award}{date}{awarding body}{reason for award}
% You can have as many occurances of this command as required.


% 14. Possible Future awards, up to July 31 2007

% Syntax: \futureaward{title of award}{date}{awarding body}{reason for award}
% You can have as many occurances of this command as required.


% 15. Membership of International/National Research/Learned Bodies, Steering 
% Committees etc. (after 31 December 2000)

% Syntax: \committeemembership{body}{position/role}{period of membership}
% You can have as many occurances of this command as required.


% 16. Possible Future Membership of International/National Research/Learned
% Bodies, Steering Committees etc?

% Syntax: \membershipaspiration{body}{position/role}{period of membership}
% You can have as many occurances of this command as required.

% 17. Editorships/Editorial Boards (after 31 December 2000)

% Syntax: \editorship{journal/series}{position}{period}
% You can have as many occurances of this command as required.

% 18. Possible Future Editorships, or Membership of Editorial Boards

% Syntax: \editorshipaspiration{journal/series}{position}{start date}
% You can have as many occurances of this command as required.

% 19. Membership of Advisory Bodies/Consultancies

% Syntax: \consultancy{body}{position}{period}
% You can have as many occurances of this command as required.


% 20. Possible membership of advisory bodies/consultancies

% Syntax: \consultancyaspiration{body}{position}{period}
% You can have as many occurances of this command as required.

% 21. Research Grouping

% Syntax: \researchgrouping{name}{affiliation}
% You can have as many occurances of this command as required.

% 22. Your Research Plans/Strategy

% Syntax: \researchplan{text}

% 23. Research Opportunities for your School/UEA/NRP

% Syntax: \researchopportunities

% 24. Your General Views on your Research, your Activity Profile, and School/UEA
% Priorities

% Syntax: \generalviews{text}

% This command generates the form:

\makeform

% Anything here will be tacked onto the end of the form.

\end{document}
%    \begin{macrocode}
%</sample.tex>
%    \end{macrocode}
%\Finale
\endinput
