%% inf0105
%% -------
%%
%% En LaTeX-stil for emnet INF0105 Informatikkens verden

%% Standardspesifikasjoner:

\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesClass{inf0105}[2011/02/11 v 1.00 Ifi/UiO document class]

%% Opsjoner:

\DeclareOption{10pt}{}
\DeclareOption{11pt}{\ClassWarningNoLine{inf0105}{Do not
        use type size `11pt'}}
\DeclareOption{12pt}{\ClassWarningNoLine{inf0105}{Do not
        use type size `12pt'}}

\DeclareOption{norsk}{%
  \def \ifi@abc {INF0105 Informatikkens verden}%
  \def \ifi@ifi {Institutt for informatikk}%
  \PassOptionsToPackage{\CurrentOption}{babel}}
\DeclareOption{nynorsk}{%
  \def \ifi@abc {INF0105 Informatikkens verden}%
  \def \ifi@ifi {Institutt for informatikk}%
  \PassOptionsToPackage{\CurrentOption}{babel}}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{atikel1}}
\ExecuteOptions{norsk}
\ProcessOptions \relax

%% Imported packages:

\RequirePackage{babel}
\RequirePackage{fancyhdr}
\RequirePackage[T1]{fontenc}
\RequirePackage{graphicx}
\RequirePackage{textcomp}

%% Base class:

\LoadClass[a4paper,twocolumn,10pt]{artikel1}
\addtolength{\topmargin}{-2cm}
\addtolength{\textheight}{10\baselineskip}

%% Typesetting

\pretolerance = 5000
\tolerance = 8000   \hbadness = \tolerance

\setlength{\parskip}{0pt plus 2pt}
\setlength{\parindent}{1em}
\setlength{\columnsep}{6mm}

%% Select a font:

\renewcommand{\rmdefault}{pnc}
\IfFileExists{t1iofs.fd}
  {\renewcommand{\sfdefault}{iofs}}
  {\renewcommand{\sfdefault}{phv}}
\IfFileExists{t1hlct.fd}
  {\renewcommand{\ttdefault}{hlct}}
  {\renewcommand{\ttdefault}{pcr}}

%% Title:

\title{En tittel}
\author{Forfatteren}

\newenvironment{ingress}
  {\par\begingroup\it\noindent\ignorespaces}
  {\par\endgroup}

%% Headers:

\IfFileExists{ifi-logo-black.eps}
  {\def \ifi@logo {\raisebox{0mm}[0pt][0pt]{%
        \includegraphics[height=0.6cm]{ifi-logo-black}}}}
  {\def \ifi@logo {}}

\pagestyle{fancy}
\lhead{\makebox[0pt][r]{\ifi@logo\hspace{1em}}\it 
  \ifi@ifi{} \textthreequartersemdash{} \ifi@abc}
\chead{}
\rhead{}
\renewcommand{\headrulewidth}{0pt}
\lfoot{}
\cfoot{}
\rfoot{\thepage}

\let \ps@plain = \ps@fancy


%% Miscellaneous:

\setcounter{secnumdepth}{-1}

\endinput
