tuhh_presentation.cls 3.78 KB
Newer Older
Leonard Fisser's avatar
Leonard Fisser committed
1
\ProvidesClass{tuhh_presentation}
2
% See also the wiki page https://collaborating.tuhh.de/e-4/tuhh_latex_presentation/-/wikis/tuhh_presentation-Class
Leonard Fisser's avatar
Leonard Fisser committed
3

4
% First option pass to base class (for options not declared by derived class)
Leonard Fisser's avatar
Leonard Fisser committed
5 6 7
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}}
\ProcessOptions\relax

8
\LoadClass{beamer}
Leonard Fisser's avatar
Leonard Fisser committed
9
\usetheme{tuhh}
Leonard Fisser's avatar
Leonard Fisser committed
10
\setbeamertemplate{caption}[numbered]
Leonard Fisser's avatar
Leonard Fisser committed
11 12 13 14 15 16

\usepackage{.poppins_font/poppins}
\pdfmapfile{+.poppins_font/Poppins.map}

\usepackage[datesep=.,style=ddmmyy]{datetime2}

17 18
\AtBeginDocument{\usebeamerfont{normal text}}

19

20 21 22 23
%
% Getter and Setter Commands for Inserting Metadata
%

24 25 26 27 28
\def\university{\@dblarg\beamer@university}
\long\def\beamer@university[#1]#2{%
  \def\insertuniversity{\def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}#2}%
}

29 30 31 32 33 34 35 36 37 38
\def\street{\@dblarg\beamer@street}
\long\def\beamer@street[#1]#2{%
  \def\insertstreet{\def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}#2}%
}

\def\city{\@dblarg\beamer@city}
\long\def\beamer@city[#1]#2{%
  \def\insertcity{\def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}#2}%
}

39 40 41 42
\def\telephonenumber{\@dblarg\beamer@telephonenumber}
\long\def\beamer@telephonenumber[#1]#2{%
  \def\inserttelephonenumber{\def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}#2}%
}
43

44 45 46 47 48 49 50 51 52 53
\def\email{\@dblarg\beamer@email}
\long\def\beamer@email[#1]#2{%
  \def\insertemail{\def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}#2}%
}

\def\website{\@dblarg\beamer@website}
\long\def\beamer@website[#1]#2{%
  \def\insertwebsite{\def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}#2}%
}

54 55 56 57
\def\closingstatement{\@dblarg\beamer@closingstatement}
\long\def\beamer@closingstatement[#1]#2{%
  \def\insertclosingstatement{\def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}#2}%
}
58

59
% Redefine \includegraphics
60 61 62 63 64 65
\LetLtxMacro\latexincludegraphics\includegraphics
\renewcommand{\includegraphics}[2][]{%
  \textcolor{black}%
  {\latexincludegraphics[#1]{#2}}%
}

66
%
67
% Defaults
68 69
%

70
\university{Hamburg University of Technology (TUHH)}
71
\closingstatement{Thank You very much}
72 73
\street{Am Schwarzenberg-Campus 1}
\city{21073 Hamburg}
74
\website{www.tuhh.de}
Leonard Fisser's avatar
Leonard Fisser committed
75
\telephonenumber{+49 40 42878-3330}
76
\institute{Corresponding Author's Institute}
Leonard Fisser's avatar
Leonard Fisser committed
77 78 79
\email{corresponding.author@tuhh.de}
\author[Corresponding Author]{First Author, Second Author}

80 81 82 83 84

\DeclareOption{german}{%
  \closingstatement{Vielen Dank}%
  \university{Technische Universität Hamburg (TUHH)}%
  \settuhhwordmark{.theme_imgs/TUHH_logo-wortmarke_de_rgb.pdf}%
85 86
  \renewcommand{\figurename}{Abbildung}%
  \renewcommand{\tablename}{Tabelle}%
87 88
}

89 90 91 92 93 94 95 96
%
% Institute Branding 
%

% None
\DeclareOption{institute=none}{%
}

97
% Example
Leonard Fisser's avatar
Leonard Fisser committed
98
\DeclareOption{institute=test}{%
99 100 101 102 103
  \@ifclasswith{tuhh_presentation}{german}{
    \institute{Institutsname auf Deutsch}
  }{
    \institute{Institute Name in English}
  }
104 105 106
  \institutebranded{.theme_imgs/institute_logo_titlepage.pdf}{.theme_imgs/institute_logo_content.pdf}
}

107 108 109 110 111 112 113
% Institute of Communication Networks (E-4)
\DeclareOption{institute=e4}{%
  \@ifclasswith{tuhh_presentation}{german}{
    \institute{Institut für Kommunikationsnetze}
  }{
    \institute{Institute of Communication Networks}
  }
114 115 116
  \institutebranded{.theme_imgs/e4_logo_titlepage.pdf}{.theme_imgs/e4_logo_content.pdf}
}

Fabian Nuraddin Alexander Gabel's avatar
Fabian Nuraddin Alexander Gabel committed
117 118 119 120 121 122 123 124 125 126
% Institute of Mathematics (E-10)
\DeclareOption{institute=e10}{%
  \@ifclasswith{tuhh_presentation}{german}{
    \institute{Institut für Mathematik}
  }{
    \institute{Institute of Mathematics}
  }
  \institutebranded{.theme_imgs/e10_logo_titlepage.pdf}{.theme_imgs/e10_logo_content.pdf}
}

Patrick Göttsch's avatar
Patrick Göttsch committed
127 128 129 130 131 132 133 134 135
% Institute of Control Systems (E-14)
\DeclareOption{institute=e14}{%
  \@ifclasswith{tuhh_presentation}{german}{
    \institute{Institut für Regelungstechnik}
  }{
    \institute{Institute of Control Systems}
  }
  \institutebranded{.theme_imgs/e14_logo.pdf}{.theme_imgs/e14_logo.pdf}
}
Fabian Nuraddin Alexander Gabel's avatar
Fabian Nuraddin Alexander Gabel committed
136

137
% Second option pass to derived class
Fabian Nuraddin Alexander Gabel's avatar
Fabian Nuraddin Alexander Gabel committed
138
\ProcessOptions\relax