diff --git a/README.md b/README.md index 3ed320a..6c752b9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ # HBRS beamer template + +You can add a third party logo by using the command `\thirdpartylogo{path/to/your/image}`. + Heavily adapted from [Masaryk University beamper template](https://www.overleaf.com/latex/templates/fibeamer-for-the-faculty-of-arts-at-the-masaryk-university-in-brno/rbtxqwnjyndf). diff --git a/hbrs-example.pdf b/hbrs-example.pdf index e3136dd..aae54c6 100644 Binary files a/hbrs-example.pdf and b/hbrs-example.pdf differ diff --git a/hbrs-example.tex b/hbrs-example.tex index 86e8f1d..ccd4304 100644 --- a/hbrs-example.tex +++ b/hbrs-example.tex @@ -28,6 +28,9 @@ \date{\today} \subject{Test beamer} +% \thirdpartylogo{path/to/your/image} + + \begin{document} { \begin{frame} diff --git a/theme/beamerouterthemehbrs.sty b/theme/beamerouterthemehbrs.sty index cbeac0f..46da619 100644 --- a/theme/beamerouterthemehbrs.sty +++ b/theme/beamerouterthemehbrs.sty @@ -17,14 +17,33 @@ \defbeamertemplate*{title page}{hbrs}{% \setcounter{framenumber}{0} %Set title frame counter to 0 - \begin{tikzpicture} - \node[anchor=south west,yshift=\extrapadding, xshift=\extrapadding] at (current page.south west){ - \includegraphics[height=1cm]{theme/images/Logo-HBRS-cyan.png} - }; - \node[anchor=south east,yshift=\extrapadding, xshift=-10\extrapadding] at (current page.south east){ - \includegraphics[height=1cm]{theme/images/b-it.pdf} - }; - \end{tikzpicture} + + \ifx\@thirdpartylogo\@empty + \begin{tikzpicture} + \node[anchor=south west,yshift=\extrapadding, xshift=\extrapadding] at (current page.south west){ + \includegraphics[height=1cm]{theme/images/Logo-HBRS-cyan.png} + }; + \node[anchor=south east,yshift=\extrapadding, xshift=-10\extrapadding] at (current page.south east){ + \includegraphics[height=1cm]{theme/images/b-it.pdf} + }; + \end{tikzpicture} + \else + + \begin{tikzpicture} + \node[anchor=south west,yshift=\extrapadding, xshift=\extrapadding] at (current page.south west){ + \includegraphics[height=.7cm]{theme/images/Logo-HBRS-cyan.png} + }; + \node[anchor=south east,yshift=\extrapadding, xshift=-10\extrapadding] at (current page.south east){ + \includegraphics[height=.7cm]{theme/images/b-it.pdf} + }; + \node[anchor=south east,yshift=\extrapadding, xshift=-30\extrapadding] at (current page.south east){ + \includegraphics[height=.7cm]{\@thirdpartylogo} + }; + \end{tikzpicture} + + \fi% + + % Input the title \usebeamerfont{title}% @@ -95,6 +114,18 @@ \includegraphics[height=0.45cm]{theme/images/b-it.pdf} }; + \ifx\@thirdpartylogo\@empty + \relax + \else + % If you have added a third party logo, you might need to adjust its position + % change the xshift value to something that suits your needs + \node[anchor=south west,yshift=\extrapadding, xshift=32\extrapadding] at (current page.south west){ + \includegraphics[height=0.45cm]{\@thirdpartylogo} + }; + \fi% + + + \node[anchor=south east, yshift=\extrapadding, xshift=-\extrapadding] at (current page.south east) { \usebeamerfont{title in head/foot}\insertshorttitle~ - \usebeamerfont{author in head/foot}\textbf{\insertshortauthor}\hspace*{2em} @@ -102,6 +133,10 @@ \usebeamerfont{framenumber}% \insertframenumber/\inserttotalframenumber }; + + + + \end{tikzpicture} \fi }{} diff --git a/theme/beamerthemehbrs.sty b/theme/beamerthemehbrs.sty index 2882062..f406f75 100644 --- a/theme/beamerthemehbrs.sty +++ b/theme/beamerthemehbrs.sty @@ -10,6 +10,8 @@ \usepackage{theme/beamerouterthemehbrs} \usepackage{theme/beamercolorthemehbrs} +\newcommand{\thirdpartylogo}[1]{\def\@thirdpartylogo{#1}} +\thirdpartylogo{} \mode