% Version 1, Revision 3, August 4, 2004 (Ralf Vogel, rvogel@ling.uni-potsdam.de)
% few bug fixes: \and, \andnext, \preauthor and \postauthor, corrections in
% the comments (thanks, Shin!) etc.
% now the maketitle command, \and and \andnext should behave as expected.

% Version 1, Revision 2, July 15, 2004 

% Revision 2: Redefine \and and \andnext such that it inserts just a comma in
% the footer of the first page. \FootAuthor is obsolete now, unless we have
% multiple institutions.

% Question: Do we want nice printing of multiple authors using \and at all? If
% we decide to use comma-separated lists uniformly, life will be much easier.


% Revision 1: July 14, 2004 (Ralf Vogel, rvogel@ling.uni-potsdam.de)
% improve handling of multiple authors, institutions.  Thanks to Stefanie and
% Shin! 

%%%%%%%%%%% Brief introduction:

% 2-4 authors and one institution:
% \author{Author1 \andnext Author2 \andnext Author3 ... }
% \institution{institution}
% \FootAuthor{Author1, Author2, ...}

% If list of authors would go beyond a single line using \andnext:
% \author{Author1, Author2 ... }

%%% \FootAuthor defaults to \author, so in the standard case, there is
%%% no need to define \FootAuthor!
%%% In general: there is no need to use \and or \andnext anyway, because we
%%% treat the institution separately. But I made it accessible.

% Multiple institutions:
% \author{Author1$^{\ast$}, Author2$^{\dagger$} ...}
% \institution{Institution1$^{\ast$}, Institution2$^{\dagger}$ ...}
% \FootAuthor{Author1, Author2, ...}

%%%%%%%%%%%

% intelligent customisable spacing
% usage: \begin{spacing}{1.0} text \end{spacing}
% allowed spacing values: 1.0, 1.5, 2.0
% 

\usepackage{setspace}
\onehalfspacing

% Avoid huge vertical spaces ...
\raggedbottom

% nice spacing
\frenchspacing

% we use times ...
\usepackage{times}

% make reference to last page easy, automatise the pages
% information on the first page footer

\usepackage{lastpage}

% some coarse adjustments, margins, font sizes, footnote format

\setlrmarginsandblock{2.5cm}{2.5cm}{*}
\addtolength{\oddsidemargin}{0.5cm}
\addtolength{\evensidemargin}{-0.5cm}
\setulmarginsandblock{3.5cm}{2.5cm}{*}
\setlength{\footmarkwidth}{.5cm} \setlength{\footmarksep}{0em} 
\setlength{\thanksmarkwidth}{.5cm} \setlength{\thanksmarksep}{0em} 
\footmarkstyle{\textsuperscript{#1}\hfill}
\thanksmarkstyle{\textsuperscript{#1}\hfill}
\let\footnotesize\small

% headings

\pagestyle{myheadings}
\makeheadrule{myheadings}{\textwidth}{0.4pt}
\makeevenhead{myheadings}{\small\normalfont\thepage}{}{\small\normalfont\leftmark}
\makeoddhead{myheadings}{\small\normalfont\rightmark}{}{\small\normalfont\thepage}

% maketitle starts at the top

\setlength{\droptitle}{-4\baselineskip}

% this is a trick to get the footer on the first page right:

\addtolength{\textheight}{-3.5cm}

% the package is based on the memoir class, section headings ...

\maxsecnumdepth{subsection}
\renewcommand{\chapnumfont}{\bfseries}
\renewcommand{\chaptitlefont}{\bfseries}
\setsecheadstyle{\bfseries\raggedright}
\setsubsecheadstyle{\bfseries\raggedright}



% abstract and keywords 

\renewenvironment{abstract}{\vspace*{-4ex}%
 \removelastskip \begin{spacing}{1.0}\small
    \begin{adjustwidth}{2cm}{2cm}\removelastskip}
  {\end{adjustwidth}\end{spacing}\renewcommand{\@ptsize}{4}}

\renewcommand{\abstractname}{}
\newcommand{\keywords}[1]{%
 \begin{adjustwidth}{2cm}{2cm}
\vspace*{-2ex}\small\itshape Keywords:~#1
  \end{adjustwidth}
}

\renewcommand{\abstracttextfont}{\small} 





% definitions for maketitle

\def\@institution{} \def\institution#1{\gdef\@institution{#1}}
\def\@ISISeds{} \def\ISISeds#1{\gdef\@ISISeds{#1}}
\def\@ISIStitle{} \def\ISIStitle#1{\gdef\@ISIStitle{#1}}
\def\@ISISyear{} \def\ISISyear#1{\gdef\@ISISyear{#1}}
\def\@ISISno{} \def\ISISno#1{\gdef\@ISISno{#1}}

\def\@FootAuthor{} \def\FootAuthor#1{\gdef\@FootAuthor{#1}}
\FootAuthor{\@author}


\pretitle{\begin{center}\large\bfseries}
\posttitle{\end{center}}
\preauthor{\begin{center}\begin{spacing}{1.5}\begin{tabular}[t]{c}\itshape}
\postauthor{\end{tabular}\\\textnormal{\@institution}\end{spacing}\end{center}}

% make author2 italicised: usage: \author{Author1 \andnext Author2}

\renewcommand*{\andnext}{%
  \end{tabular} \begin{tabular}[t]{c}\itshape}

\renewcommand*{\and}{%
  \end{tabular} \begin{tabular}[t]{c}\itshape}


% redefinitions of maketitle commands

\renewcommand{\maketitle}{\label{FirstPage}%
  \begingroup
    \@bsmarkseries
%%    \def\@makefnmark{\rlap{\@textsuperscript{%
%%       \normalfont\@bsthanksheadpre \tamark \@bsthanksheadpost}}}%
    \def\@makefnmark{\@textsuperscript{%
       \normalfont\@bsthanksheadpre \tamark \@bsthanksheadpost}}%
    \long\def\@makefntext##1{\makethanksmark ##1}
    \if@twocolumn
      \ifnum \col@number=\@ne
        \@maketitle
      \else
        \twocolumn[\@maketitle]%
      \fi
    \else
      \newpage
      \global\@topnum\z@
      \@maketitle
    \fi
    \thispagestyle{ISISfirstpage}\@thanks
  \endgroup
  \@bscontmark  %  \setcounter{footnote}{0}%
  \addtolength{\textheight}{2cm}
  }

\renewcommand{\@maketitle}{%
  \let\footnote\@mem@titlefootkill
%  \newpage
%  \null
%  \vskip 2em%
        \vspace*{\droptitle}
%  \maketitlehooka
  {\@bspretitle \@title \@bsposttitle}
%  \maketitlehookb
  {\@bspreauthor \@author \@bspostauthor}
%  \maketitlehookc
%  {\@bspredate \@date \@bspostdate}
%  \maketitlehookd
%  \par
%  \vskip 1.5em
}

% The footer of the first page


\newcommand{\ISISissue}%
{Interdisciplinary Studies on Information Structure \@ISISno\ (\@ISISyear):
  \pageref{FirstPage}--\pageref{LastPage}}
 
\newcommand{\ISIScopyright}[1]%
{{\copyright}\@ISISyear\ \@FootAuthor}

\setheadfoot{28pt}{0pt}
\makepagestyle{ISISfirstpage}

\makeevenfoot{ISISfirstpage}{}%
{\renewcommand{\andnext}{\unskip, }
\renewcommand{\and}{\unskip, }
\begin{center}\small
\begin{tabular}{c}
    \textbf{\ISISissue}\\
    \ISISeds \\
    \ISIStitle
      \end{tabular}%
    \end{center}
}{}

\makeoddfoot{ISISfirstpage}{}%
{\renewcommand{\andnext}{\unskip, }
\renewcommand{\and}{\unskip, }
\begin{center}\small%\vspace*{-5ex}
\begin{tabular}{c}
    \textbf{\ISISissue}\\
    \@ISIStitle \\
    \ISIScopyright{}
      \end{tabular}%
    \end{center}
}{}


% Formatting the contact info

\newenvironment{contact}%
{\vspace*{24pt}\begin{spacing}{1.0}\raggedright\itshape}{\end{spacing}}



