\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{solmu}[2011/06/09 Solmu]
\LoadClass[a4paper,twoside]{article}


% Monipalstainen sivu
\RequirePackage{multicol}


% Sivun muotoilua
\parskip  2ex plus 0.5ex minus 0.5ex
\parindent	 0em
\clubpenalty  500	
\widowpenalty  500
\displaywidowpenalty  100	
\brokenpenalty	 250
\skip\footins  1.3\skip\footins
\footnotesep  1.2\footnotesep
\def\baselinestretch{1.0}
\def\arraystretch{1.0}
\def\textfraction{.2}

\RequirePackage{vmargin}
\setlength{\hoffset}{-1in}
\setlength{\voffset}{-1in}
\setmargins{1.95cm}{1.5cm}{17.15cm}{24.5cm}{12pt}{18pt}{0pt}{0pt}
% leftmargin, topmargin, textwidth, textheight, headheight, headsep, footheight, footskip


% Ala- ja yläreunat
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\lhead[\small\arabic{page}]{\small Solmu x/202y}
\rhead[\small Solmu x/202y]{\small\arabic{page}}
\chead[]{}
\lfoot[]{}
\rfoot[]{}
\cfoot[]{}


% WWW-linkit
\RequirePackage{hyperref}
\hypersetup{pdftitle=Solmu x/202y}
\hypersetup{colorlinks,%
linkcolor=black,%
citecolor=black,%
urlcolor=black} 


% Palstojen väli
\setlength{\columnseprule}{\headrulewidth}
\addtolength{\columnsep}{1mm}


% Lukujen otsikot
\makeatletter
\newcommand\otsikko{\@startsection{section}{1}{\z@}%
                                     {-3.5ex \@plus -1ex \@minus -.2ex}%
                                     {3.0ex \@plus.5ex \@minus .5ex}%
                                     {\normalfont\LARGE\bfseries\raggedright}}

\renewcommand\section{\@startsection{section}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\large\bfseries}}

\renewcommand\subsection{\@startsection{subsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}
\makeatother


\newcommand{\artikkeli}[1]{%
  \otsikko*{#1}%
  \addcontentsline{toc}{section}{#1}}

\newcommand{\kirjoittanut}[1]{%
  \nopagebreak%
  \begin{flushleft}%
    #1
  \end{flushleft}%
  \vspace{0.0cm}}


\vspace*{0.15\textheight}


% Ensimmäisen sivun kuvan paikka
\newcommand{\kuva}{%
\setlength{\unitlength}{1px}%
\begin{picture}(104,86)%
\put(0,0){\line(1,0){104}}%
\put(0,0){\line(0,1){86}}%
\put(0,86){\line(1,0){104}}%
\put(104,0){\line(0,1){86}}%
\end{picture}}

