%\nonstopmode %% Skru på denne for å bruke templaten i et script
\documentclass[a4paper,12pt]{article}

\usepackage{ucs} % Provides extended UTF-8-support
\usepackage[utf8x]{inputenc} % Input av characters
\usepackage[norsk]{babel} % Norske overskrifter
\usepackage[T1]{fontenc} % Output av fonter
\usepackage{graphicx} % Includegraphics osv.
\usepackage{parskip} % space between paragraphs instead of indent
\usepackage{verbatim} % Comments
\usepackage{underscore} % underscore i vanlig tekst, men ikke i adresser
\usepackage{enumitem}
\usepackage{listings} % For å inkludere kode
\usepackage{caption} % For å kunne bruke bedre captions
\usepackage[usenames,dvipsnames]{color} %% Farger i listings av kode
\usepackage{tikz} %% Farger i listings av kode
\usepackage{subcaption} % For å kunne lage subfigurer
\usepackage{amsmath} % Bedre mattepakke
\usepackage{siunitx} % Kan bruke \num(1e5) for å vise standard-format
\usepackage{float} % Absolute positioning with [H]
\usepackage[pdftex]{hyperref}
\usepackage{soul} % \hl
\usepackage[framemethod=tikz]{mdframed} % environment high
\usepackage{multicol} % flere kolonner
\usepackage{gensymb}

\usepackage{fancyvrb}
\definecolor{Brown}{cmyk}{0,0.81,1,0.60}
\definecolor{OliveGreen}{cmyk}{0.64,0,0.95,0.40}
\definecolor{CadetBlue}{cmyk}{0.62,0.57,0.23,0}
\definecolor{lgray}{gray}{0.95}

\usepackage[nottoc,numbib]{tocbibind} % gjør at referanseseksjonen nummereres og vises i innholdsliste

\newcommand{\unit}[1]{\ensuremath{\, \mathrm{#1}}}
\newenvironment{high}{\begin{mdframed}[hidealllines=true,backgroundcolor=blue!20]}{\end{mdframed}}

% Formattering for forskjellige typer ord
\newcommand{\class}[1]{\texttt{#1}}
\newcommand{\file}[1]{\texttt{#1}}
\newcommand{\method}[2]{\texttt{#1(#2)}}

\newenvironment{sitat}{\begin{quote}\begin{em}}{\end{em}\end{quote}}
\newcommand{\sit}[1]{\emph{``#1''}}

\hypersetup{
        colorlinks,
        citecolor=black,
        filecolor=black,
        linkcolor=black,
        urlcolor=black,
}

\lstset{
        language=C,                             % Code langugage. Burde overrides
        basicstyle=\ttfamily,                   % Code font, Examples: \footnotesize, \ttfamily
        keywordstyle=\color{OliveGreen},        % Keywords font ('*' = uppercase)
        commentstyle=\color{gray},              % Comments font
        numbers=left,                           % Line nums position
        numberstyle=\scriptsize,                % Line-numbers fonts
        stepnumber=1,                           % Step between two line-numbers
        numbersep=5pt,                          % How far are line-numbers from code
        backgroundcolor=\color{lgray}\ttfamily, % Choose background color
        frame=none,                             % A frame around the code
        tabsize=4,                              % Default tab size
        captionpos=b,                           % Caption-position = bottom
        breaklines=true,                        % Automatic line breaking?
        breakatwhitespace=false,                % Automatic breaks only at whitespace?
        showspaces=false,                       % Dont make spaces visible
        showstringspaces=false,
        showtabs=false,                         % Dont make tabls visible
        columns=flexible,                       % Column format
        morekeywords={__global__, __device__},  % CUDA specific keywords
        framexleftmargin=2pt,
}

% Spesifikt for EIT
\author{Torbjørn\\Aase \and Andreas\\Bertheussen \and Rune\\Holmgren\and Sigurd\\Holsen \and Jostein\\Munz}
\usepackage[a4paper,tmargin=2.5cm,includehead=true,marginparwidth=4cm, marginparsep=1cm,inner=2.5cm,outer=2.5cm]{geometry}
\usepackage{times}
\usepackage[varg]{txfonts} % times font for matematikk

\usepackage{framed}
\definecolor{shadecolor}{rgb}{1, 0.8, 0.3}

\begin{comment}

Bruk malen ved å skrive
\input{/home/sighol/.hgbackup/latex/template.tex}
i toppen av dokumentet


Nyttig på starten av dokumentet
===============================
        \maketitle
        \tableofcontents

Tabeller
========
        \begin{tabular}{l | l}
                Marinteks formel & Holtrops formel \\
                \num(1.0e+06) & \num(1.0e+06) \\
                \hline
                1.5502 & 1.5459\\
                1.7450 & 1.7403\\
                1.9460 & 1.9409\\
                2.1838 & 2.1783\\
                2.4374 & 2.4315\\
                2.7681 & 2.7617\\
                3.1695 & 3.1626\\
        \end{tabular}

Matriser
========

\begin{matrix}
 a & b & c \\
 d & e & f \\
 g & h & i
\end{matrix}

Figurer
=======

        \begin{figure}[H]
                \centering
                \includegraphics[scale=0.5]{adresse-uten-underscore.png}
                \label{fig: opg1efn}
                \Caption{Kun en linje med tekst}
        \end{figure}

Flere figurer på rekke
======================

        \begin{figure}
                        \centering
                        \begin{subfigure}[H]{0.3\textwidth}
                                        \centering
                                        \includegraphics[width=\textwidth]{gull}
                                        \caption{A gull}
                                        \label{fig:gull}
                        \end{subfigure}%
                        ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.
                          %(or a blank line to force the subfigure onto a new line)
                        \begin{subfigure}[H]{0.3\textwidth}
                                        \centering
                                        \includegraphics[width=\textwidth]{tiger}
                                        \caption{A tiger}
                                        \label{fig:tiger}
                        \end{subfigure}
                        ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.
                          %(or a blank line to force the subfigure onto a new line)
                        \begin{subfigure}[H]{0.3\textwidth}
                                        \centering
                                        \includegraphics[width=\textwidth]{mouse}
                                        \caption{A mouse}
                                        \label{fig:mouse}
                        \end{subfigure}
                        \caption{Pictures of animals}\label{fig:animals}
        \end{figure}

Matematikk
==========

        \[ Equation uten nummerering \]

        $ Inline equation $

        \begin{align}
                Equation med nummerering \notag\\ % \notag : ingen nummerering denne linje
                Kan ikke inneholde blanke linjer
        \end{align}

        \begin{align*}
                y &= (x + 1)(x + 2)
                  &= x² + 3x + 2
                Uten nummerering
        \end{align*}

        Se
        http://en.wikibooks.org/wiki/LaTeX/Mathematics#Advanced_Mathematics:_AMS_Math_package
        for forklaringer

Kode i koden
============

        Definerer språk
                \lstset{
                        language=matlab,
                }

        Lese fra fil
                \lstinputlisting{../opg1f.m}

\end{comment}
