%%
%% This is file `cthtitle.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% cthtitle.dtx  (with options: `cthtitle')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% You are *not* allowed to modify this file.
%% 
%% You are *not* allowed to distribute this file.
%% For distribution of the original source see the terms
%% for copying and modification in the file cthtitle.dtx.
%% 
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
\newif\ifChalm@GU
\Chalm@GUfalse
\DeclareOption{Chalmers}{\AtBeginDocument{\Chalm@GUfalse}}
\DeclareOption{ChalGU}  {\AtBeginDocument{\Chalm@GUtrue}}
\ProcessOptions
\RequirePackage[dvips]{graphicx}
\graphicspath{%
  {./eps/}
  {/usr/ed-pkg/pkg/tetex-2.0.2/texmf-local/tex/PostScript/}
  {/usr/ed-pkg/pkg/tetex-2.0.2/texmf-local/tex/generic/PostScript/}
  }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\titlepages}{%
  \cleardoublepage
  \setcounter{page}{1}%
  \Cover@Page
  %% Make sure that there will be no page number on the back of the
  %% cover page.
  \if@twoside\clearpage\thispagestyle{empty}\null\fi
  \clearpage
  \setcounter{page}{1}%
  \Title@Page
  \clearpage
  \Printed@Page
  \cleardoublepage
  \setcounter{page}{1}%
}
\newcommand{\CoverDocumentKind}[1]{\renewcommand{\Cover@DocumentKind}{#1}}%
\newcommand{\Cover@DocumentKind}{PREPRINT}%
\newcommand{\CoverGraphics}[1]{\renewcommand{\Cover@Graphics}{#1}}%
\newcommand{\Cover@Graphics}{}%
\newcommand{\TitleDocumentKind}[1]{\renewcommand{\Title@DocumentKind}{#1}}%
\newcommand{\Title@DocumentKind}{Preprint Mathematics}%
\newcommand{\department}[1]{\renewcommand{\@Department}{#1}}%
\newcommand{\@Department}{Department of Mathematical Sciences}%
\newcommand{\ISSN}[1]{\renewcommand{\ISSN@}{#1}}%
\newcommand{\ISSN@}{}%
\newcommand{\ISSNno}[1]{\renewcommand{\ISSN@number}{#1}}%
\newcommand{\ISSN@number}{}%
\def\ps@cthtitleCover{%
  \let\@mkboth\@gobbletwo
  \def\@oddhead{\fontsize\@xivpt\@xviipt\selectfont
    \hbox to \textwidth {%
      \vbox to \headheight {\hsize=\textwidth
        %% Top of Logotype line should be 23mm from the top of the page
        \setlength   {\@tempdima} {23truemm}%
        \addtolength {\@tempdima} {-1in}%
        \addtolength {\@tempdima} {-\topmargin}%
        \vskip\@tempdima\relax
        \hbox to \hsize{%
          \ifChalm@GU
          %%TBD: find logo of width 120mm so that no scaling is needed.
          \lower2truemm\hbox{%
            \includegraphics[width=120mm]{LogoCH_GU_ENGsvart.eps}%
            \hfill}%
          \else
          %% Logotype should be 85.5mm from the left paper edge.
          \setlength   {\@tempdima} {85.5truemm}%
          \addtolength {\@tempdima} {-\oddsidemargin}%
          \addtolength {\@tempdima} {-1in}%
          \hskip\@tempdima\relax
          \includegraphics{Logotyp120mm.epsi}%
          \fi
          \hfil
          }%
        \vss
        }%
      \hss
      }%
    }%
  \def\@oddfoot{\fontsize\@xivpt\@xviipt\selectfont
    \hbox to \textwidth {%
      \vbox {\hsize=\textwidth
        \vskip -12mm\relax
        \begin{tabular}{@{}l@{}}
          \textit{\@Department}\\
          \CTH@nameEN\\
          \ifChalm@GU\GU@nameEN\\\fi
          \Cover@City
        \end{tabular}
        \vss}%
      \hss}%
    }%
  \let\@evenhead\@empty
  \let\@evenfoot\@oddfoot}%
\newcommand{\Cover@Page}{%
  %% Choose page style for this page to get logo and address.
  \thispagestyle{cthtitleCover}%
  %% Place a rigid space for the \vfil to push against
  \null
  \vfil
  %% Print cover graphics in a left aligned paragraph
  \noindent\Cover@Graphics\par
  \vfil
  %% Print cover document kind in a left aligned paragraph
  \noindent{\fontsize\@xivpt\@xviipt\selectfont
    \textit{\Cover@DocumentKind}}\par
  \vskip3.5mm\relax
  %% Print title in an unhyphenated left aligned paragraph
  \noindent\nohyphens{\fontsize\@xxvpt\@xxxpt\selectfont
    \textrm{\@title}\par
    }
  \vskip 16mm\relax
  %% Print author in a left aligned paragraph
  \noindent{\fontsize\@xviipt\@xxpt\selectfont
    \textrm{\@author}\par}
  %% Take advantage of the implicit \vfil at bottom of a page.
}%
\newcommand{\CTH@nameEN}{CHALMERS UNIVERSITY OF TECHNOLOGY}%
\newcommand{\GU@nameEN}{GOTHENBURG UNIVERSITY}%
\newcommand{\Cover@City}{G\"oteborg, Sweden \number\year}%
\def\ps@cthtitleTitle{%
  \let\@mkboth\@gobbletwo
  \def\@oddhead{\fontsize\@xviipt\@xxpt\selectfont
    \hbox to \textwidth {%
      \vbox to \headheight {\hsize=\textwidth
        \begin{center}
          \Title@DocumentKind
        \end{center}
        \vss
        }%
      \hss
      }%
    }%
  \def\@oddfoot{\fontsize\@xivpt\@xviipt\selectfont
    \hbox to \textwidth {%
      \hss
      \vbox {\hsize=1.2\textwidth
        \vskip -12mm\relax
        \begin{tabular*}{1.2\textwidth}{@{\extracolsep{\fill}}ccc}
          &\textrm{\@Department}&\\
          &\textrm{\CTHGU@nameEN}&\\
          &\textrm{\Title@PostalEN}&\\
          &\textrm{\Title@City}&
        \end{tabular*}%
        \vss}%
      \hss}%
    \hss}%
  \let\@evenhead\@empty
  \let\@evenfoot\@oddfoot}%
\newcommand{\Title@Page}{%
  \thispagestyle{cthtitleTitle}%
  \null
  \vskip14mm\relax
  %% Document title wihtout hyphenation, centered
  \noindent{\fontsize\@xxpt\@xxvpt\selectfont
  \begin{center}
    \nohyphens{\textbf{\@title}}
  \end{center}\par}%
  \vskip1mm\relax
  %% Document author, centered
  \noindent{\fontsize\@xxpt\@xxvpt\selectfont
  \begin{center}
    \@author
  \end{center}\par}%
  \vfil
  \vfil
  \noindent
  \begin{center}%
    \includegraphics[width=\textwidth]{LogoCH_GU_ENGsvart.eps}%
  \end{center}%
}%
\newcommand{\CTHGU@nameEN}{%
  Chalmers~University~of~Technology%
  \ifChalm@GU ~and~Gothenburg~University\fi}%
\newcommand{\Title@PostalEN}{SE-412\,96~G\"oteborg,~Sweden}%
\newcommand{\Title@City}{G\"oteborg,~\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  ~\number\year}%
\def\ps@cthtitlePrinted{%
  \let\@mkboth\@gobbletwo
  \let\@oddhead\@empty
  \def\@oddfoot{%
    \setlength\arrayrulewidth{1.2\p@}% Thick \hlines in the table
    \begin{tabular*}{\hsize}{@{\extracolsep{\fill}}ccc}
      &\@IfEmpty{\ISSN@number}{}{NO~\ISSN@number}&\\
      &\@IfEmpty{\ISSN@}{}{ISSN~\ISSN@}&\\[0.4ex]
      \hline\\
      &\Printed@printer&\\
      &\Printed@City&
    \end{tabular*}}%
  \let\@evenhead\@empty
  \let\@evenfoot\@oddfoot}%
\newcommand{\Printed@Page}{\null\thispagestyle{cthtitlePrinted}}%
\newcommand{\Printed@printer}{Mathematical Sciences}%
\newcommand{\Printed@City}{G\"oteborg \number\year}%
\newcommand{\@IfEmpty}[3]{%
  \ifx #1\relax \else
  \ifx #1\@empty #2\else
    \ifx #1\long@empty #2\else #3\fi
  \fi\fi}
\newcommand\long@empty{}
\def\@xxxpt{29.86}
\def\@xxxvpt{35.83}
\newlanguage\langwohyphens
\newcommand\nohyphens[1]{{\language\langwohyphens #1}}
\InputIfFileExists{cthtitle.cfg}{}{}
\endinput
%%
%% End of file `cthtitle.sty'.
