%%
%% This is file `dithesis.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% dithesis.dtx  (with options: `class')
%% This is a generated file.
%% 
%% Copyright (C) 2005 by Kostantinos Koukopoulos
%% 
%% This program is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by
%% the Free Software Foundation; either version 2 of the License, or
%% (at your option) any later version.
%% 
%% This program is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%% GNU General Public License for more details.
%% 
%% You should have received a copy of the GNU General Public License
%% along with Foobar; if not, write to the Free Software
%% Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{dithesis}
 [2005/10/01 v0.1 di.uoa.gr thesis class]
\RequirePackage{ifthen}
\PassOptionsToClass{a4paper}{report}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ProcessOptions
\LoadClass{report}
\setlength\footskip{12.5mm}
\addtolength{\parskip}{\baselineskip}

\RequirePackage{setspace}
\onehalfspacing
\setlength\textwidth{165mm}

\setlength\textheight{222mm}
   \if@twoside
      \setlength\oddsidemargin   {25mm}
      \setlength\evensidemargin  {20mm}
   \else
      \setlength\oddsidemargin   {2.5cm}
      \setlength\evensidemargin  {2.5cm}
   \fi
\setlength\marginparwidth {0cm}
\setlength\marginparsep{0cm}

\setlength\topmargin   {20mm}
\setlength\hoffset     {-1in}
\setlength\voffset     {-1in}
\setlength\headheight   {12.5mm}
\setlength\headsep   {10mm}

\PassOptionsToPackage{margin=10pt,
            font={footnotesize},
            labelfont=bf,
            aboveskip=10pt,
            belowskip=0pt}{caption}
\RequirePackage{caption}
\captionsetup[table]{aboveskip=10pt,belowskip=10pt}

\RequirePackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{}
\fancyhead[CE]{\footnotesize{\@title}}
\fancyhead[CO]{\footnotesize{\@title}}
\fancyfoot[LO,RE]{\@author}
\fancyfoot[LE,RO]{\thepage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}
\fancypagestyle{plain}{%
   \fancyhead{}
      \renewcommand{\headrulewidth}{0pt} % and the line
}
\usepackage[american,greek]{babel}
\newcommand{\studcode}[1]{\gdef\@studcode{#1}}
\newcommand{\advisor}[1]{\gdef\@advisor{#1}}
\newcommand{\grkabstract}[1]{\gdef\@grkabstract{#1}}
\newcommand{\engabstract}[1]{\gdef\@engabstract{#1}}
\newcommand{\universityname}[1]{\gdef\@uni{#1}}
\newcommand{\universityschool}[1]{\gdef\@school{#1}}
\newcommand{\universitydept}[1]{\gdef\@dept{#1}}
\newcommand{\thesistype}[1]{\gdef\@type{#1}}
\newcommand{\submitdate}[1]{\gdef\@submitdate{#1}}
\newcommand{\place}[1]{\gdef\@place{#1}}
\newcommand{\greeksubjarea}[1]{\gdef\@greeksubjarea{#1}}
\newcommand{\englishsubjarea}[1]{\gdef\@englishsubjarea{#1}}
\newcommand{\greekkeywords}[1]{\gdef\@greekkeywords{#1}}
\newcommand{\englishkeywords}[1]{\gdef\@englishkeywords{#1}}
\newcommand{\@uni}{Panepist'hmio Ajhnwn}
\newcommand{\@school}{Sqol'h Jetik'wn Episthm'wn}
\newcommand{\@dept}{Tm'hma Plhroforik'hc kai Thlepikoinwnei'wn}
\newcommand{\@type}{Ptuqiak'h Ergas'ia}
\newcommand{\@submitdate}{\ifcase\the\month\or
  Ianou'arioc\or Febrou'arioc\or M'artioc\or Apr'ilioc\or Ma'ioc\or
  Io'unioc\or Io'ulioc\or A'ugoustoc\or Sept'embrioc\or Okt'wbrioc\or
  No'embrioc\or Dek'embrioc\fi
  \space \number\the\year}
\newcommand{\@place}{Aj'hna}
\newcommand{\@greeksubjarea}{}
\newcommand{\@englishsubjarea}{}
\newcommand{\@greekkeywords}{}
\newcommand{\@englishkeywords}{}
\RequirePackage{graphicx}
\newcommand{\titlep}{%
\thispagestyle{empty}
   \begin{minipage}[c]{0.2\textwidth}
      \begin{flushleft}
         \includegraphics[scale=0.13]{universitylogo}
      \end{flushleft}
   \end{minipage}
   \begin{minipage}[c]{0.85 \textwidth}
      \begin{flushleft}\textsc{%
          \@uni\\
          \@school\\
          \@dept }%
      \end{flushleft}
   \end{minipage}
   \vfill
   \begin{center}
      \large{\textsc{\@type}\\
      \vfill
      \expandafter{\@title}}
   \end{center}
   \vfill
   \begin{center}
      \@author\\
      A.M. \@studcode \\
      \bigskip
      Epibl'epwn Kajhght'hc: \@advisor\\
      \bigskip
      \textsc{\@place} \\
      \@submitdate\\
   \end{center}
   \hbox{}%
   \newpage
}%
\newcommand{\signaturepage}{%
\thispagestyle{empty}%
\begin{center}
   \textbf{\scshape Ptuqiak'h Ergas'ia}\\ \bigskip
   \@title\\ \bigskip
   \textbf{\@author}\\
   A.M. \@studcode \\
   \bigskip
   \flushleft{\scshape Epibl'epwn}
   \center{\@advisor}
\end{center}
\hbox{}%
\newpage
}%
\newcommand{\grkabstractpage}{%
\thispagestyle{empty}%
\begin{center}
   \textbf{\scshape Pr'ologoc}
\end{center}
\@grkabstract\vfill{}
\begin{tabular}{ll}
   \textsc{Jematik'h Perioq'h:} & {\@greeksubjarea}\\
   \textsc{L'exeic Kleidi'a:} & {\@greekkeywords}
\end{tabular}
\hbox{}%
\newpage
}%
\newcommand{\engabstractpage}{%
\thispagestyle{empty}%
\begin{center}
   \textsc{\textlatin{Abstract}}
\end{center}
\@engabstract\vfill{}
\begin{tabular}{ll}
   \textsc{\textlatin{Subject Area:}} & {\@englishsubjarea}\\
   \textsc{\textlatin{Keywords:}} & {\@englishkeywords}
\end{tabular}
\hbox{}%
\newpage
}%
\renewcommand{\maketitle}{%
\titlep
\setcounter{page}{1}
\thispagestyle{empty}%
\hbox{}%
\newpage
\titlep
\signaturepage
\grkabstractpage
\engabstractpage
\tableofcontents
\thispagestyle{empty}%
\hbox{}%
\newpage
\thispagestyle{fancy}
\pagenumbering{arabic}
}%

\endinput
%%
%% End of file `dithesis.cls'.
