%%
%% This is file `kautitle.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% kautools.dtx  (with options: `title')
%% 
%% This is a generated file.
%% 
%% Copyright (c) 2011-2014 Stefan Berthold <stefan.berthold@kau.se>
%% 
%% This file is part of the kauthesis bundle.
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status `author-maintained'.
%% 
%% The Current Maintainer and author of this work is Stefan Berthold.
%% 
%% This work consists of all files listed in manifest.txt.
%% 
%% kautools.dtx
%% Copyright (c) 2011-2015 Stefan Berthold <stefan.berthold@kau.se>
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{kautitle}
    [2014/10/22 v1.15 Karlstad University kautools bundle]
\ProcessOptions\relax
\RequirePackage{xkeyval}
\RequirePackage{tikz}
\RequirePackage{hyphenat}
\RequirePackage{kaumeta}
\define@cmdkeys[kut]{pkg}[kut@]{normalfont,titlefont}
\setkeys[kut]{pkg}%
  { normalfont=\fontfamily{aun}\fontsize{18}{21.6}\selectfont\bfseries
  , titlefont=\fontfamily{aub}\fontsize{28}{33.6}\selectfont }
\newcommand\setkautitlefont[1]{\setkeys[kut]{pkg}{#1}}
\let\kut@maketitle\maketitle
\renewcommand\maketitle{%
  \thispagestyle{empty}
  \begin{tikzpicture}[remember picture, overlay]%
    \path (current page.north west) +(-4pt,4pt) node (NW) {};
    \path (current page.south east) +(4pt,-4pt) node (SE) {};
    \path (current page.north west) +(-3pt,3pt) node (NWC) {};
    \path (current page.south east) +(3pt,-3pt) node (SEC) {};
    \path[clip] (NWC) rectangle (SEC);
    \path (current page.south west) node[rotate=243.5] {\pgfimage{kau-logo-tryck}};%
    \path (current page.north east) node[rotate=175] {\pgfimage{kau-logo-tryck}};%
    \path (current page.north west) node
      [shift={(10pt,-12pt)},anchor=south west,rotate=270
      ,font=\kut@normalfont\vphantom{Xy}]
      {\@subject};
    \path (current page.south east) node
      [shift={(-8pt,6pt)},anchor=north east,rotate=270
      ,rounded corners,fill=black,text=white,inner sep=8pt
      ,font=\kut@normalfont\vphantom{Xy}]
      {\@shortinstitute};
    \path
      (current page.east) node[shift={(-10,0)}] (A) {}
      (current page.east) node[shift={(0,-2.5)}] (B) {}
      [shading=axis,left color=white,right color=black] (A) rectangle (B.south east)
    ;
    \path (B) node
      [anchor=north east
      ,inner sep=8pt
      ,text=black
      ,font=\kut@normalfont\vphantom{Xy}
      ,text width=14cm,text ragged left]
      {\@author};
    \path[fill=white,opacity=0.90,transparency group] (NW) rectangle (SE);
    \path (B) node
      [anchor=south east,shift={(-3pt,0)}
      ,text=yellow!75!red
      ,font=\kut@titlefont\vphantom{Xy}
      ,text width=14cm,text ragged left]
      {\nohyphens{\@title}};
  \end{tikzpicture}%
  \clearpage%
}
\endinput
%%
%% End of file `kautitle.sty'.
