Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added command to add institute logo to beamer header #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion beamerthemetudo.sty
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
\setbeamersize{text margin left=15pt, text margin right=15pt}
\usefonttheme{professionalfonts}

% Adds an institute logo to the header
\newcommand*\theinstitutelogo{}
\newcommand*\institutelogo[1]{\renewcommand\theinstitutelogo{#1}}

% If xelatex or lualatex, use fontspec to set fonts
\newif\if@fontspec\@fontspecfalse
Expand Down Expand Up @@ -80,7 +83,11 @@
leftskip=1em,
rightskip=\beamer@rightmargin,
]{headline}%
\usebeamerfont{institute in head/foot}\hfill\insertshortinstitute[respectlinebreaks]
\ifx\theinstitutelogo\empty
\usebeamerfont{institute in head/foot}\hfill\insertshortinstitute[respectlinebreaks]
\else%
\hfill\theinstitutelogo
\fi%
\end{beamercolorbox}%
\vskip2ex%
\ifnum\insertframenumber=1%
Expand Down
2 changes: 2 additions & 0 deletions example.tex
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
\institute[Kurzform Lehrstuhl]{Names des Lehrstuhls \\ Name der Fakultät}
\titlegraphic{\includegraphics[width=0.7\textwidth]{images/tudo-title-2.jpg}}

%% Add your institute logo to the header instead of short form of the institute name, e.g.
%\institutelogo{\includegraphics[height=\headerheight]{<path_to_institute_logo>}}

\begin{document}

Expand Down