The dithesis class *

Manolis Paissios
e.paissios@di.uoa.gr
Paschalis Antoniou
p.antoniou@di.uoa.gr
Kostantinos Koukopoulos
kouk@noc.uoa.gr

October 18, 2005


*This document corresponds to dithesis ?, dated ?.

Abstract

This is the unofficial LATEX class file for undergraduate theses that conform to the specifications of the Library of the Department of Informatics at the University of Athens..

1 Introduction

This document class will mainly be helpfull to the students of the Department of Informatics 1 of the University of Athens, who which to write their undergraduate thesis in LATEX2ɛ while conforming to the mandatory guidelines of the department’s library.

1.1 Acknowledgements

As a starting point for the creation of this document class, the suthesis-2e.sty 2 package from Stanford University was used. It was originally written by Joseph Pallas in 1989 and heavily modified by Emma Pease thereafter. Please refer to the suthesis-2e.sty file for the full credits.

1.2 Description

This class builds upon the standard report style to follow the guidelines of the Department of Informatics Library. Among other things it sets the correct margins and interline spacing.

1.2.1 Basic Usage

\documentclass In order to use this document class you must first write the following in your document:

\documentclass[args]{dithesis}

The argsare optional and are passed on to the report document class, on which this class is based.

Due to the fact that this class is based on report one should use the commands \title and \author just as one would when using the report document class.

\studno The \studcode is the code that identifies the author to the administration of the university. Usually a number, like at the University of Athens.

\studcode{code}

\advisor The \advisor is the name of the faculty member who advised the author during the authoring of the thesis.

\advisor{name}

\grkabstract The \grkabstract is the the greek language abstract.

\grkabstract{text}

\engabstract The \engabstract is the the english language abstract.

\engabstract{text}

1.2.2 Example usage
 \documentclass[twoside,12pt]{dithesis}  
 \usepackage[english,greek]{babel}  
 \begin{document}  
 \title{Titlos}  
 \author{Gi’orgos Papad’opoulos}  
 \studcode{123456}  
 \advisor{Dhm’htrhc Qristodo’ulou}  
 \grkabstract{Ant’i Prol’ogou}  
 \engabstract{\textlatin{some kind of abstract}}  
 \maketitle  
 \chapter{Eisagwg’h}  
 mpl’a mpl’a mpla m’pla  
 \end{document}  
 

1.2.3 Optional Front Page Parameters

The following commands let you configure the various academic titles and names that will appear on the title page. By default these parameters are well suited for theses written for the Department of Informatics at the University of Athens: \universityname The name of the university:

\universityname{name}

\universityschool The \universityschool is the name of specific school of the University that the thesis is being presented to.

\universityschool{name}

\universitydept The \universitydept is the name of the specific department of the university that the thesis is being presented to.

\universityschool{name}

\thesistype The \thesistype is a description of the kind of thesis your are writing. For example it could be “Final year project” or “Doctoral dissertation”.

\thesistype{type}

\submitdate The \submitdate is the date that the thesis was submitted to the library. The default for the date is the month and the year.

\submitdate{date}

\place The \place is the place that will appear along with \submitdate.

\place{place}

\greeksubjarea The \greeksubjarea is the greeksubjarea that will appear along with \submitdate.

\greeksubjarea{greeksubjarea}

\englishsubjarea The \englishsubjarea is the englishsubjarea that will appear along with \submitdate.

\englishsubjarea{englishsubjarea}

\greekkeywords The \greekkeywords is the greekkeywords that will appear along with \submitdate.

\greekkeywords{greekkeywords}

\englishkeywords The \englishkeywords is the englishkeywords that will appear along with \submitdate.

\englishkeywords{englishkeywords}

2 Implementation

This document class can only be used with LATEX2ɛ, so the following line makes sure that the user is aware of this:

   
1 class\NeedsTeXFormat{LaTeX2e}[1999/12/01]

Here we announce the document class ’dithesis’ and it’s version

   
2 class\ProvidesClass{dithesis}
3 class[2005/10/01 v0.1 di.uoa.gr thesis class]

Also we will need the ifthen package:

   
4 \RequirePackage{ifthen}

2.1 Class Options

The library requires A4 paper:

   
5 \PassOptionsToClass{a4paper}{report}

Any other options are passed on to the report class on which this document class is based.

   
6 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}

Next we process the options

   
7 \ProcessOptions

and load the report document class

   
8 \LoadClass{report}

3 Document Layout

3.1 Page Layout

3.1.1 Vertical Spacing

\footskip The distance from the baseline of the box which contains the running footer to the baseline of last line of text is controlled by \footskip.

   
9 \setlength\footskip{12.5mm}

\parskip \parskip is the vertical space between paragraphs.

   
10 \addtolength{\parskip}{\baselineskip}

We require the setspace package to set the intra-line spacing:

   
11 \RequirePackage{setspace}
12 \onehalfspacing

3.1.2 Text Dimensions

\textwidth Text width is set to 156mm.

   
13 \setlength\textwidth{165mm}

\textheight The \textheight is the height of text (including footnotes and figures, excluding running head and foot).

   
14 \setlength\textheight{222mm}

3.1.3 Margins

\oddsidemargin  \evensidemargin Theses may be either single or double sided. Margins are specified by the library.

   
15    \if@twoside
16       \setlength\oddsidemargin   {25mm}
17       \setlength\evensidemargin  {20mm}
18    \else
19       \setlength\oddsidemargin   {2.5cm}
20       \setlength\evensidemargin  {2.5cm}
21    \fi

\marginparwidth  \marginparsep Why is this zero? ASK PASXALI

   
22 \setlength\marginparwidth {0cm}
23 \setlength\marginparsep{0cm}

\topmargin The \topmargin is the distance between the top of ‘the printable area’ –which is 1 inch below the top of the paper– and the top of the box which contains the running head.

   
24 \setlength\topmargin   {20mm}
                                                                    

                                                                    

I don’t know what these do

   
25 \setlength\hoffset     {-1in}
26 \setlength\voffset     {-1in}
27 \setlength\headheight   {12.5mm}
28 \setlength\headsep   {10mm}

3.2 Captions

We use the caption package to make the captions pretty

   
29 \PassOptionsToPackage{margin=10pt,
30             font={footnotesize},
31             labelfont=bf,
32             aboveskip=10pt,
33             belowskip=0pt}{caption}
34 \RequirePackage{caption}
35 \captionsetup[table]{aboveskip=10pt,belowskip=10pt}

3.3 Fancy Headers

We use the fancyheaders package to get pretty headers.

   
36 \RequirePackage{fancyhdr}
37 \pagestyle{fancy}

with this we ensure that the chapter and section headings are in lowercase.

   
38 \renewcommand{\chaptermark}[1]{\markboth{#1}{}}
39 \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}

delete current setting for header and footer:

   
40 \fancyhf{}
41 \fancyhead[CE]{\footnotesize{\@title}}
42 \fancyhead[CO]{\footnotesize{\@title}}
43 \fancyfoot[LO,RE]{\@author}
44 \fancyfoot[LE,RO]{\thepage}
                                                                    

                                                                    
45 \renewcommand{\headrulewidth}{0.5pt}
46 \renewcommand{\footrulewidth}{0.5pt}

get rid of headers on plain pages

   
47 \fancypagestyle{plain}{%
48    \fancyhead{}
49       \renewcommand{\headrulewidth}{0pt} % and the line
50 }

3.4 Required commands

Before we define any commands we must include the babel package to have greek support:

   
51 \usepackage[american,greek]{babel}

\studcode  \advisor  \grkabstract  \engabstract 

   
52 \newcommand{\studcode}[1]{\gdef\@studcode{#1}}
53 \newcommand{\advisor}[1]{\gdef\@advisor{#1}}
54 \newcommand{\grkabstract}[1]{\gdef\@grkabstract{#1}}
55 \newcommand{\engabstract}[1]{\gdef\@engabstract{#1}}

3.5 Configuration Commands

\universityname  \universityschool  \universitydept  \thesistype  \submitdate  \place  \greeksubjarea  \englishsubjarea  \greekkeywords  \englishkeywords Here we declare commands to permit the user to specify these common academic attributes:

   
56 \newcommand{\universityname}[1]{\gdef\@uni{#1}}
57 \newcommand{\universityschool}[1]{\gdef\@school{#1}}
58 \newcommand{\universitydept}[1]{\gdef\@dept{#1}}
59 \newcommand{\thesistype}[1]{\gdef\@type{#1}}
60 \newcommand{\submitdate}[1]{\gdef\@submitdate{#1}}
61 \newcommand{\place}[1]{\gdef\@place{#1}}
62 \newcommand{\greeksubjarea}[1]{\gdef\@greeksubjarea{#1}}
63 \newcommand{\englishsubjarea}[1]{\gdef\@englishsubjarea{#1}}
64 \newcommand{\greekkeywords}[1]{\gdef\@greekkeywords{#1}}
65 \newcommand{\englishkeywords}[1]{\gdef\@englishkeywords{#1}}

and their default values:

   
66 \newcommand{\@uni}{Panepist’hmio Ajhnwn}
67 \newcommand{\@school}{Sqol’h Jetik’wn Episthm’wn}
68 \newcommand{\@dept}{Tm’hma Plhroforik’hc kai Thlepikoinwnei’wn}
69 \newcommand{\@type}{Ptuqiak’h Ergas’ia}
70 \newcommand{\@submitdate}{\ifcase\the\month\or
71   Ianou’arioc\or Febrou’arioc\or M’artioc\or Apr’ilioc\or Ma’ioc\or
72   Io’unioc\or Io’ulioc\or A’ugoustoc\or Sept’embrioc\or Okt’wbrioc\or
73   No’embrioc\or Dek’embrioc\fi
74   \space \number\the\year}
75 \newcommand{\@place}{Aj’hna}
76 \newcommand{\@greeksubjarea}{}
77 \newcommand{\@englishsubjarea}{}
                                                                    

                                                                    
78 \newcommand{\@greekkeywords}{}
79 \newcommand{\@englishkeywords}{}

3.6 Special Pages

\titlep Here is where we implement the title page. To include a university logo on the titlepage we need the graphicx package:

   
80 \RequirePackage{graphicx}

The command \titlep is used in \maketitle to create the required title page.

   
81 \newcommand{\titlep}{%
82 \thispagestyle{empty}

Next we include the university logo in the upper left corner and the administrative names next to it (in small caps):

   
83    \begin{minipage}[c]{0.2\textwidth}
84       \begin{flushleft}
85          \includegraphics[scale=0.13]{universitylogo}
86       \end{flushleft}
87    \end{minipage}
88    \begin{minipage}[c]{0.85 \textwidth}
89       \begin{flushleft}\textsc{%
90           \@uni\\
91           \@school\\
92           \@dept }%
93       \end{flushleft}
94    \end{minipage}

In the center of the page goes the title of the thesis:

   
95    \vfill
96    \begin{center}
97       \large{\textsc{\@type}\\
98       \vfill
99       \expandafter{\@title}}
100    \end{center}
101    \vfill
                                                                    

                                                                    

And last we have the author, the advisor, the place and the date centered:

   
102    \begin{center}
103       \@author\\
104       A.M. \@studcode \\
105       \bigskip
106       Epibl’epwn Kajhght’hc: \@advisor\\
107       \bigskip
108       \textsc{\@place} \\
109       \@submitdate\\
110    \end{center}
111    \hbox{}%
112    \newpage
113 }%

\signaturepage Here we implement the page where the supervisor puts his signature.

   
114 \newcommand{\signaturepage}{%
115 \thispagestyle{empty}%
116 \begin{center}
117    \textbf{\scshape Ptuqiak’h Ergas’ia}\\ \bigskip
118    \@title\\ \bigskip
119    \textbf{\@author}\\
120    A.M. \@studcode \\
121    \bigskip
122    \flushleft{\scshape Epibl’epwn}
123    \center{\@advisor}
124 \end{center}
125 \hbox{}%
126 \newpage
127 }%

\grkabstractpage Here we implement the greek abstract page.

   
128 \newcommand{\grkabstractpage}{%
129 \thispagestyle{empty}%
130 \begin{center}
131    \textbf{\scshape Pr’ologoc}
132 \end{center}
133 \@grkabstract\vfill{}
                                                                    

                                                                    
134 \begin{tabular}{ll}
135    \textsc{Jematik’h Perioq’h:} & {\@greeksubjarea}\\
136    \textsc{L’exeic Kleidi’a:} & {\@greekkeywords}
137 \end{tabular}
138 \hbox{}%
139 \newpage
140 }%

\engabstractpage Here we implement the english abstract page.

   
141 \newcommand{\engabstractpage}{%
142 \thispagestyle{empty}%
143 \begin{center}
144    \textsc{\textlatin{Abstract}}
145 \end{center}
146 \@engabstract\vfill{}
147 \begin{tabular}{ll}
148    \textsc{\textlatin{Subject Area:}} & {\@englishsubjarea}\\
149    \textsc{\textlatin{Keywords:}} & {\@englishkeywords}
150 \end{tabular}
151 \hbox{}%
152 \newpage
153 }%

\maketitle Finally we redefine \maketitle to put together the titlepages pages while supressing page numbering and fancy headers. We have first a title page, then a completely blank page, then another title page, then greek and english abstract pages and last the contents.

   
154 \renewcommand{\maketitle}{%
155 \titlep
156 \setcounter{page}{1}
157 \thispagestyle{empty}%
158 \hbox{}%
159 \newpage
160 \titlep
161 \signaturepage
162 \grkabstractpage
163 \engabstractpage
164 \tableofcontents
165 \thispagestyle{empty}%
166 \hbox{}%
167 \newpage
168 \thispagestyle{fancy}
                                                                    

                                                                    
169 \pagenumbering{arabic}
170 }%