\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{uniudlucidi}[2006/07/14 Redefines maketitle for University of Udine Thesis transparencies presentation; needs graphics files polloPallido and pollo; written by Gianluca Gorni]

\RequirePackage{seminar}
\RequirePackage{ifthen}
\RequirePackage{graphicx}
\RequirePackage{color}
\RequirePackage{hyperref}

\hypersetup{pdfpagemode=UseOutlines,
bookmarksopen,
bookmarksopenlevel=2,
pdftitle=Lucidi di presentazione della tesi,
pdfauthor=Tesista,
pdfkeywords=LaTeX lucidi presentazione tesi laurea,
pdfpagelayout=TwoColumnLeft}

\newcommand{\@facolta}{\uppercase{Scienze MM, FF e NN}}
\newcommand{\@corsodilaurea}{?}
\newcommand{\@corsodilaureatriennale}{?}
\newcommand{\@corsodilaureaspecialistica}{?}
\newcommand{\@triennaleOspecialistica}{?}
\newcommand{\@titolo}{Senza Titolo}
\newcommand{\@annoaccademico}{?}
\newcommand{\@relatore}{?}
\newcommand{\@correlatore}{?}
\newcommand{\@laureando}{?}
\newcommand{\@laureanda}{?}
\newcommand{\@autore}{}
\newcommand{\@laureandoOlaureanda}{?}
\newcommand{\@dedica}{?}

\newcommand{\facolta}[1]{%
  \renewcommand{\@facolta}{\uppercase{#1}}}
\newcommand{\corsodilaurea}[1]{%
  \renewcommand{\@corsodilaurea}{#1}%
  \renewcommand{\@triennaleOspecialistica}{}}
\newcommand{\corsodilaureatriennale}[1]{%
  \renewcommand{\@corsodilaurea}{#1}%
  \renewcommand{\@triennaleOspecialistica}{Triennale }}
\newcommand{\corsodilaureaspecialistica}[1]{%
  \renewcommand{\@corsodilaurea}{#1}%
  \renewcommand{\@triennaleOspecialistica}{Specialistica }}
\newcommand{\titolo}[1]{%
  \renewcommand{\@titolo}{\uppercase{#1}}}
\newcommand{\annoaccademico}[1]{%
  \renewcommand{\@annoaccademico}{#1}}
\newcommand{\relatore}[2][Prof.]{%
  \renewcommand{\@relatore}{#1 \uppercase{#2}}}
\newcommand{\correlatore}[2][Prof.]{%
  \renewcommand{\@correlatore}{#1 \uppercase{#2}}}
\newcommand{\laureando}[1]{%
  \renewcommand{\@laureando}{\uppercase{#1}}%
  \renewcommand{\@autore}{\uppercase{#1}}%
  \renewcommand{\@laureandoOlaureanda}{Laureando}}
\newcommand{\laureanda}[1]{%
  \renewcommand{\@laureanda}{\uppercase{#1}}%
  \renewcommand{\@autore}{\uppercase{#1}}%
  \renewcommand{\@laureandoOlaureanda}{Laureanda}}
\newcommand{\dedica}[1]{%
  \renewcommand{\@dedica}{#1}}
\newcommand{\data}[1]{\date{#1}}

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %                                   %
    %  Formattazione dell'intestazione  %
    %  della tesi                       %
    %                                   %
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definecolor{ocra}{rgb}{.45,.24,.1}

\newcommand{\@coloreTitolo}{blue}
\newcommand{\@coloreAutori}{black}
\newcommand{\@coloreRestoIntestazione}{ocra}
\newcommand{\coloreTitolo}[1]%
  {\renewcommand{\@coloreTitolo}{#1}}
\newcommand{\coloreAutori}[1]%
  {\renewcommand{\@coloreAutori}{#1}}
\newcommand{\coloreRestoIntestazione}[1]%
  {\renewcommand{\@coloreRestoIntestazione}{#1}}

\renewcommand\maketitle{\centerslidesfalse
  \begin{titlepage}\begin{slide*}
  \pdfbookmark[1]{Intestazione}{Intestazione}
  \begin{sffamily}
  \begin{center}
    \vbox to0pt{%
    \vbox to\textheight{\vfil
    \includegraphics[width=\textwidth]{polloPallido}%
    \vfil}\vss}
  \end{center}
  \color{\@coloreRestoIntestazione}
  \begin{center}
  \uppercase{Universit\`a degli Studi di Udine}\\
  \uppercase{Facolt\`a di \@facolta}\\
  \bigskip\vfill
  \begin{large} Tesi di Laurea \@triennaleOspecialistica
         in\\ \@corsodilaurea
  \end{large}\\
  \bigskip\vfill
  \begin{huge}\color{\@coloreTitolo}
   {\renewcommand{\\}{\cr}
   \halign{\hbox to\textwidth{\strut\hfil##\hfil}\cr
    \@titolo\cr}}
    \end{huge}
  %
  \bigskip\vfill\vfill\vfill
  \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}l}
    Relatore:&\@laureandoOlaureanda:\\
     \color{\@coloreAutori}%
     \vtop{\halign{\strut\hfil##\hfil\cr
       \@relatore\cr}}&%
     \color{\@coloreAutori}%
       \vtop{\halign{\strut\hfil##\hfil\cr
       \@autore\cr}}%
    \ifthenelse{\equal{\@correlatore}{?}}{}%
    {\\ Correlatore:&\\ \color{\@coloreAutori}%
      \@correlatore&\\}
  \end{tabular*}
  \vfill
  \@date\\
  \end{center}
\end{sffamily}\flushbottom
\end{slide*}
\ifthenelse{\equal{\@dedica}{?}}{}{%
\ifthenelse{\equal{\@dedica}{}}{}{
\begin{slide*}
  \pdfbookmark[1]{Dedica}{Dedica}
  \null\vfil
  \begin{Large}
  \begin{flushright}
    \@dedica
  \end{flushright}
  \end{Large}
  \vfil\vfil\end{slide*}}}
\end{titlepage}\centerslidestrue}

%%%%%%%% FINALE

\newcommand{\lucidofinale}{\centerslidestrue
\begin{slide*}
\begin{center}
  {\Huge\bfseries\textcolor{blue}{Fine}}\\
  \bigskip\bigskip
  \includegraphics[width=2cm]{pollo}
\end{center}
\end{slide*}}

\AtEndDocument{\lucidofinale}

\endinput