summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/beamer-contrib/themes/beamer2thesis/latex/beamerthemeTorinoTh.sty
blob: 878734d3be60fa0aea22d1861a630f91c05c00c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Copyright 2011-2012 by Fiandrino Claudio
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\mode<presentation>

% Options
\DeclareOptionBeamer{language}{\PassOptionsToPackage{language=#1}{beamerinnerthemetorinoth}\def\beamer@torinoth@language{#1}}
\DeclareOptionBeamer{titlepagelogo}{\PassOptionsToPackage{titlepagelogo=#1}{beamerinnerthemetorinoth}}
\DeclareOptionBeamer{bullet}{\PassOptionsToPackage{bullet=#1}{beamerinnerthemetorinoth}}
\DeclareOptionBeamer{pageofpages}{\PassOptionsToPackage{pageofpages=#1}{beamerouterthemetorinoth}}
\DeclareOptionBeamer{titleline}[false]{\PassOptionsToPackage{titleline=#1}{beamerouterthemetorinoth}}
\DeclareOptionBeamer{color}{\PassOptionsToPackage{color=#1}{beamercolorthemetorinoth}}
\DeclareOptionBeamer{secondcandidate}[true]{\PassOptionsToPackage{secondcandidate=#1}{beamerinnerthemetorinoth}}
\DeclareOptionBeamer{secondsupervisor}[true]{\PassOptionsToPackage{secondsupervisor=#1}{beamerinnerthemetorinoth}}
\DeclareOptionBeamer{secondlogo}[true]{\PassOptionsToPackage{secondlogo=#1}{beamerinnerthemetorinoth}}
\DeclareOptionBeamer{thirdlogo}[true]{\PassOptionsToPackage{thirdlogo=#1}{beamerinnerthemetorinoth}}
\DeclareOptionBeamer{assistantsupervisor}[true]{\PassOptionsToPackage{assistantsupervisor=#1}{beamerinnerthemetorinoth}}
\DeclareOptionBeamer{secondassistantsupervisor}[true]{\PassOptionsToPackage{secondassistantsupervisor=#1}{beamerinnerthemetorinoth}}
\DeclareOptionBeamer{notshowauthor}[true]{\PassOptionsToPackage{notshowauthor=#1}{beamerouterthemetorinoth}}
\DeclareOptionBeamer{coding}{\def\beamer@torinoth@coding{#1}}
\ExecuteOptionsBeamer{coding=utf8x}
\ProcessOptionsBeamer

% Packages
\RequirePackage{ifxetex}%
\RequirePackage{pifont}%
\ifxetex
  \RequirePackage{fontspec}%
  \defaultfontfeatures{Mapping=tex-text}%
  \RequirePackage{xunicode}% 
  \RequirePackage{xltxtra}%
  \RequirePackage{metalogo}%
  \RequirePackage{xkeyval}%
  \RequirePackage{polyglossia}%
\else
  \RequirePackage[\beamer@torinoth@coding]{inputenc}%
\fi

% Disable insertshorttitle link
\renewcommand\insertshorttitle[1][]{%
  \beamer@setupshort{#1}%
  \let\thanks=\@gobble%
  \beamer@insertshort{\beamer@shorttitle}%
  }

% Language
\def\beamer@torinoth@subject{}%
\def\beamer@torinoth@italiantext{italian}%
\def\beamer@torinoth@englishtext{english}%
  \ifx\beamer@torinoth@language\beamer@torinoth@italiantext%
    \renewcommand\beamer@torinoth@subject{Presentazione Tesi di Laurea}%
    \ifxetex
      \setmainlanguage{italian}%
    \else
      \RequirePackage[italian]{babel}%
    \fi
  \fi%
  
  \ifx\beamer@torinoth@language\beamer@torinoth@englishtext%
    \renewcommand\beamer@torinoth@subject{Thesis Presentation}%
    \ifxetex
      \setmainlanguage[variant=british]{english}%
    \else
      \RequirePackage[english]{babel}%
    \fi%
  \else%
   \def\setsubject#1{\gdef\@setsubject{#1}}%
   \def\@setsubject{\PackageError{Beamer2Thesis}%
   {\protect\setsubject\space not given. Please insert it}%
   {Example in english: \protect\setsubject{Thesis Presentation}}
   }   
   \renewcommand\beamer@torinoth@subject{\@setsubject}%
    \ifxetex
      \setmainlanguage{\beamer@torinoth@language}%
    \else
      \RequirePackage[\beamer@torinoth@language]{babel}%
    \fi%    
  \fi%

% General settings
\useinnertheme{torinoth}
\useoutertheme{torinoth}
\usecolortheme{torinoth}
\usefonttheme{torinoth}

\setbeamertemplate{navigation symbols}{}

% Environment
\newenvironment{tframe}{
\begin{frame}[t]}{\end{frame}}

% Titleapageframe command
\newcommand{\titlepageframe}{
\begin{frame}[plain]
\titlepage
\end{frame}
}

% Highlight a single word
\newcommand{\highlight}[1]{{\it{\color{alerted text.fg}{#1}}}}
\newcommand{\highlightbf}[1]{{\bf\color{alerted text.fg}{#1}}}

% Define hypersetup
\hypersetup{%
    colorlinks=true,
    hyperindex=true,
    plainpages=false,
    urlcolor=alerted text.fg,
    linkcolor=alerted text.fg,
    pdfinfo={%
        Title={\inserttitle},%
        Author={\insertauthor},%
        Subject={\beamer@torinoth@subject},%
    }
}

% Blocks
\setbeamertemplate{blocks}[rounded][shadow=true]

\mode
<all>