%%------------------------------------------------------------------------------
%%  UPEC2006.cls
%
% LaTeX document class, for a paper presented to the UPEC 2006 conference
% http://upec2006.org/
% For a skeleton paper, see the end of this file.
%
% The lastest version can always be obtained from
% http://volker.dnsalias.net/texmf/
% http://volker.dnsalias.net/soft/texmf/
%
% This LaTeX class requires the following packages:
%   vmargin by Volker Kuhlmann  (available from the same place as this class)
%   caption by Axel Sommerfeldt  (available from CTAN)
%
% Volker Kuhlmann
% Christchurch
% New Zealand
% http://volker.dnsalias.net/contact.html
%
% Copyright (C) 2006 by Volker Kuhlmann <VolkerKuhlmann@gmx.de>
% Released under the terms of the GNU General Public License (GPL) Version 2.
% See http://www.gnu.org/ for details.
%
%%------------------------------------------------------------------------------
%
% HISTORY:
%
%1.5   19May06	Reduced space above \section.
%   	    	Vertical list spacing should probably also be reduced.
%   	    	Changed bibliography style from plain to unsrt.
%   	    	Added \columnbreak.
%1.4   18May06	Reduced spacing between floats and text.
%1.3   16May06	Fixed \subsection formatting.
%1.2   11May06	Added template at end. Finished.
%1.1   11May06	Fine tuned.
%1.0   10May06	Created
%
%%------------------------------------------------------------------------------

\def\classsummary   {UPEC 2006 conference paper}
\def\classname	    {UPEC2006}
\def\classversion   {1.5}
\def\classdate	    {2006/05/19}
\def\docdate	    {2006/05/11}

% Not sure with which previous LaTeX-versions it'll also work, but it works
% with this one
\NeedsTeXFormat{LaTeX2e}[2003/12/01]
\ProvidesClass{\classname}[\classdate\space v\classversion\space\classsummary]



% Class which this class is based on
%
\def\@basedonclass{article}



%
%% Options to the Package
%% ----------------------
%

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\@basedonclass}}

\ProcessOptions

\LoadClass[10pt,twocolumn]{\@basedonclass}



%
%% Page and Paragraph Layout
%% -------------------------
%

\RequirePackage{vmargin}
\setpapersize{A4}
\setmarginsrb{20mm}{24mm}{20mm}{14mm}{0pt}{0mm}{}{10mm}

% Text font: PostScript Times
\RequirePackage{times}
\normalfont\selectfont

%\clubpenalty		300
%\widowpenalty		300
%\displaywidowpenalty	100
%\brokenpenalty		150

\hyphenpenalty	    	750 	% see IEEEtran.cls
\hbadness   	    	1350

\parindent		0em
\parskip		1.5ex plus.4ex minus.25ex

\columnsep	    	1cm

\def\floatpagefraction	{.7}	% default 0.5
\def\topfraction	{.8}	% default 0.7
\def\bottomfraction	{.2}	% default 0.3
\def\textfraction	{.2}	% default 0.2
% This will make \afterpage{\clearpage} gobble up the next section header + some
% text in some circumstances:
%\def\floatpagefraction {.95}
%\def\topfraction       {\floatpagefraction}
%\def\bottomfraction    {\floatpagefraction}
%\def\textfraction      {.05}
%
\textfloatsep	    	10pt plus 1pt minus 2pt
\dbltextfloatsep    	\textfloatsep

\pagestyle  	    	{empty}
\thispagestyle	    	{empty}



%
%% Document Title Page
%% -------------------
%

% Provided by LaTeX: \title, \author, \and, \date, \thanks.

\newcommand\address[1]{\gdef\@address{#1}}
\renewcommand\and{, }

% \maketitle does a \twocolumn[\@maketitle]

\def\@maketitle{%
  \newpage
  \null
  \vskip 0em%
  \begingroup
    \centering
    \let \footnote \thanks
    \let\upec@nl\\
    \DeclareRobustCommand\\{\upec@nl}%
    {\large\bfseries \MakeUppercase{\@title}\par}%
  \endgroup
  \vskip 1.5em%
  {\lineskip .5em%
    \@author\par
    \vskip 1.4em%
    \@address\par}%
  \par
  \vskip 3.5em
  \usebox{\@abstractbox}\par
  \vskip 2em}

% Tack a \thispagestyle{empty} on the end of \maketitle, to counteracts its
% explicit \thispagestyle{plain}
\let\upec@maketitle\maketitle
\def\maketitle{\upec@maketitle\thispagestyle{empty}}



%
%% Abstract, Keywords, Acknowledgements, Author Address
%% ----------------------------------------------------
%

% Definition of frontmatter/backmatter sections.
% For table of contents handling, see PhD_VK.cls 2.3.

% With book class : Must use the star form, or headers show
% wrong text (sometimes in other chapters!). Must use \@mkboth to get the
% headings text into te header. Must do more trickery to get toc entry.

\newbox\@abstractbox
\renewenvironment{abstract}{%
    \begin{lrbox}{\@abstractbox}%
    	\begin{minipage}{\textwidth}%
	\section*{\abstractname}
	\bfseries
}{%
    	\end{minipage}%
    \end{lrbox}%
    \global\setbox\@abstractbox=\hbox{\usebox\@abstractbox}%
}
% Defined by article class, but not book class:
%\newcommand\abstractname{Abstract}

% The acknowledgement environment is defined in a similar manner as the
% abstract.
% For compatibility with other classes - for UPEC, may use a normal section.
\newenvironment{acknowledgement}{%
  \section{\acknowledgementname}}{}
\newcommand\acknowledgementname{Acknowledgements}



%
%% Headers and Footers
%% -------------------
%

%\RequirePackage{fancyhdr}
%
% ...



%
%% Footnote formatting
%% -------------------
%



%
%% Sectioning
%% ----------
%

%
% Number nothing (yuck)
%
\setcounter{secnumdepth}{0}

%% Get rid of it from here and use Javier Bezos's titlesec package.
%% Much too complicated just for changing a chapter title layout.
%
%\RequirePackage[]{titlesec}

% Copy from article.cls and modify:
\renewcommand\section{\@startsection
    {section}{1}{\z@}%
    {-3.2ex \@plus -1ex \@minus -0.8ex}%
    {0.5ex \@plus.2ex}%
    {\normalfont\bfseries\centering\MakeUppercase}}
\renewcommand\subsection{\@startsection
    {subsection}{2}{\z@}%
    {-1.25ex\@plus -1ex \@minus -.2ex}%
    {0.001ex \@plus .01ex \@minus 0ex}%
    {\normalfont\bfseries}}
%\newcommand\section{\@startsection {section}{1}{\z@}%
%                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
%                                   {2.3ex \@plus.2ex}%
%                                   {\normalfont\Large\bfseries}}
%\newcommand\subsection{\@startsection{subsection}{2}{\z@}%
%                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
%                                     {1.5ex \@plus .2ex}%
%                                     {\normalfont\large\bfseries}}

% Remove the \parskip again which is always inserted
% after the section title text.
\let\@@@afterheading\@afterheading
\def\@afterheading{\nobreak\vskip-\parskip\@@@afterheading}



%
%% Floats (Figures, Tables)
%% ------------------------
%

% Format captions
\RequirePackage[
	font={normalsize,bf},
	justification=centering,
	margin=0em
    ]{caption}



%
%% Table of Contents, List of Figures, List of Tables
%% --------------------------------------------------
%

%
% Let subsubsections be listed in the table of contents.
%
\setcounter{tocdepth}{3}



%
%% Bibliography / References
%% -------------------------
%

% Change to `References' since this is more appropriate for a thesis.
\providecommand\refname{References}% only exists with babel
\providecommand\bibname{}% make sure it exists
\renewcommand\bibname{\refname}
% The above won't work with babel, not even with \AtBeginDocument, because babel
% redefines \bibname with every language change.
% The following only works for one/some language(s) (bad), and wipes other
% definitions (worse):
\newcommand\bibisrefname{\renewcommand\bibname{\refname}}
\AtBeginDocument{\def\extrasUKenglish{\bibisrefname}}

% Provide a command which suppresses the automatic insertion of space by an
% immediately following \cite command when the cite package is loaded with
% option "adjust" (which is default). This des nothing when option "noadjust" is
% active.
\providecommand\citenoadjust{\hskip0.000009pt\relax}

% Bibliography style.
% This can't currently be overridden by the document, for example when the use
% has a more sophisticated plain style, other than by e.g. copying the other
% style as plain.bst into the document's directory. A class option to suppress
% this \bibliographystyle would be better.
\bibliographystyle{unsrt}



%
%% Column Balancing
%% ----------------
%

% Balance columns on last page. Use between paragraphs, or between words.
\newcommand\columnbreak{%
    \unskip
    \raggedbottom
    \pagebreak[4] \relax % without this space, words are run together
}



\endinput
%% 
%% EOF UPEC2006.cls
%%------------------------------------------------------------------------------




\documentclass{UPEC2006}

\begin{document}

\title{%
    Title of paper going \\
    over two lines%
}

\author{V. Kuhlmann\and S. Author}

\address{University of Canterbury, Christchurch, New Zealand}

\begin{abstract}
...
\end{abstract}


\maketitle


\section{Introduction}

\subsection{Minor heading}

\section{Conclusions}

\section*{Acknowledgment}

% Remember to put a \columnbreak onto the last page, such that the two columns
% on the last page both have the same length.
\columnbreak

\bibliography{}

\section*{Author's address}

\end{document}
