%% Titelei für Dissertationen/Habilitationen bei der
%% Mathematisch-Naturwissenschaftlichen Fakultät
%% der Eberhard Karls Universität Tübingen.
%%
%% Without hyphens: grammatically wrong, but the university wants it so...
%%
%% Copyright (C) 2010--2023 Davide Campagnari
%%
%% This work may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
%% version 2008 or later.
%%
%% This work has the LPPL maintenance status `author-maintained'.
%%
%% The Current Maintainer of this work is Davide Campagnari
%%    <d.campagnari (at) uni-tuebingen.de>
%%
%% Derived by the tuhhtitle.sty file:
%% Titelei für die Technische Universität Hamburg-Harburg
%% Copyright (C) Markus Kohm, 2007
%%
%% Redefines the \maketitle command to produce university-approved
%% title page. Description and example are at the end of this file.
%%
%% This work consists of the file tuetitle.sty only.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tuetitle}[2023-11-11 v0.1]

\newcommand*{\print@committee}{\@firstofone}
\newcommand*{\phd@or@habil}{\@firstoftwo}
\newcommand*{\If@FrakTF}{\@secondoftwo}
\DeclareOption{internal}{}
\DeclareOption{external}{\let\print@committee\@gobble}
\DeclareOption{dissertation}{}
\DeclareOption{diss}{}
\DeclareOption{habilitation}{\let\print@committee\@gobble\let\phd@or@habil\@secondoftwo}
\DeclareOption{habil}{\let\print@committee\@gobble\let\phd@or@habil\@secondoftwo}
\DeclareOption{fraktur}{\let\If@FrakTF\@firstoftwo}
\ProcessOptions\relax

\If@FrakTF{\RequirePackage{yfonts}}{}

\newcommand*{\@birthplace}{%
   \PackageError{tuetitle}{\string\birthplace\space missing}{%
                           You have to use \string\birthplace\space to set up the author's birthplace.}%
}
\newcommand*{\birthplace}[1]{\gdef\@birthplace{#1}}

\newcommand*{\@submissionyear}{%
   \@arabic{\year}%
   \PackageWarningNoLine{tuetitle}{\string\submissionyear\space missing, current year assumed}%
}
\newcommand*{\submissionyear}[1]{\gdef\@submissionyear{#1}}

\newcommand*{\@dean}{%
   \PackageError{tuetitle}{\string\dean\space missing}
                          {You have to use \string\dean\space to set up the faculty's dean.}%
}
\newcommand*{\@@dean}{Dekan}
\newcommand*{\dean}[2][Dekan]{\gdef\@@dean{#1}\gdef\@dean{#2}}

\newcommand*{\@examdate}{\@date}
\newcommand*{\dateoforalexamination}[1]{\gdef\@examdate{#1}}

\newcommand*{\expert@nr}{0}
\newcommand*{\expert@list}{}
\newcommand*{\expert}[2][]{%
   \bgroup
   \def\@tempa{#1}%
   \def\@tempb{m}%
   \ifx\@tempa\@tempb
      \def\@tempc{Berichterstatter}%
   \else
      \def\@tempb{w}%
      \ifx\@tempa\@tempb
         \def\@tempc{Berichterstatterin}%
      \else
         \def\@tempc{Berichterstatter/in}%
      \fi
   \fi
   \xdef\expert@nr{\the\numexpr\expert@nr+1\relax}%
   \xdef\expert@list{\unexpanded\expandafter{\expert@list\\}\expert@nr.~\@tempc&#2}%
   \egroup
}
% for compatibility of older files:
\newcommand*{\experts}[1]{%
   \def\@tempa##1\and{\ifx##1\@nil\else\expert{##1}\expandafter\@tempa\fi}%
   \@tempa#1\and\@nil\and
}

\renewcommand*{\maketitle}{%
   \begin{titlepage}
   \centering
   \If@FrakTF{\frakfamily}{}%
   \vskip\z@\@plus.5fill\relax
   {\fontsize\@xxpt{28}\If@FrakTF\selectfont\bfseries\ignorespaces\@title\unskip}%
   \vskip\z@\@plus2fill\relax
   {\fontsize\@xivpt{18}\If@FrakTF\selectfont\scshape\phd@or@habil{Dissertation}{Habilitationsschrift}}%
   \vskip\z@\@plus1fill\relax
   \fontsize\@xiipt\@xxpt\selectfont
   \phd@or@habil{% code for PhD thesis
      der\If@FrakTF{ Hochl"oblichen}{} Mathematisch-Naturwissenschaftlichen Fa\If@FrakTF{c}{k}ult\"{a}t\\
      der Eberhard\If@FrakTF{-}{ }Karls\If@FrakTF{:-}{ }Universit\"{a}t\If@FrakTF{ zu}{} T\"{u}bingen\\
      zur Erlangung \If@FrakTF{des: Grades: eines:}{des Grades eines}\\
      \If@FrakTF{Doctors:}{Doktors} der Naturwissenschaften\\
      (Dr.\ rer.\ nat.)
   }{}%
   \vskip\z@\@plus2fill\relax
   vorgelegt von\\
   {\fontsize\@xivpt\z@\If@FrakTF\selectfont\scshape\strut\ignorespaces\@author}\\
   aus \@birthplace
   \vskip\z@\@plus2fill\relax
   T\"{u}bingen\\
   \@submissionyear
   \clearpage\normalsize
   \print@committee{%
      \thispagestyle{empty}\raggedright\null\vfill
      Gedruckt mit Genehmigung der Mathematisch-Naturwissenschaftlichen Fa\If@FrakTF{c}{k}ult\"at der
      Eberhard Karls\If@FrakTF{:}{} Universit\"at T\"ubingen.\vskip3\bigskipamount
      \noindent
      \begin{tabular}{@{}ll}
      Tag der m\"{u}ndlichen Qualifikation: \qquad & \@examdate \\[2ex]
      \@@dean: & \@dean \\[-2ex]
      \expert@list
      \end{tabular}
      \clearpage
   }
   \end{titlepage}
   \global\let\maketitle\relax
}

\endinput

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

USAGE

The possible package options are
- dissertation,diss (DEFAULT): for a PhD thesis
- habilitation, habil: for a Habilitation
- internal (DEFAULT): combined with the `dissertation' option creates the second page (DEFAULT)
- external: only title page (useful for producing *only* the title page)
- fraktur: joke option: makes the title page in Fraktur...

EXAMPLE

\documentclass{ ... }
\usepackage{tuetitle}
\author{Dorothy Gale}
\birthplace{Somewhere over the Rainbow}
\title{My Journey to Oz:\\ Fluidodynamics\strut \\ of\strut \\ Reality-Shifting Tornados\strut}
\submissionyear{1939}
\dean[Dekanin]{Prof.~Dr.~Dr.~h.c.~mult.~Almira Gulch}% without optional parameter default "Dekan" (male)
\dateoforalexamination{31st February 1939}
\expert[w]{Glinda the Good Witch of the North} % --> Berichterstatterin
\expert[m]{Scare Crow}                         % --> Berichterstatter
\expert{Tin Man}                               % --> Berichterstatter/in
\expert[m]{Cowardly Lion}
% old syntax, still supported:
%\experts{Glinda the Good Witch of the North\and Scare Crow\and Tin Man\and Cowardly Lion}

\begin{document}
\maketitle

The rest of your thesis here.

\end{document}
