1

On my slides, I include a logo as follows:

\addtobeamertemplate{frametitle}{}{%
    \begin{textblock*}{100mm}(9.55cm, -0.50cm){
            \includegraphics[height=1.5cm]{example-image}}
    \end{textblock*}
}

This has worked very well for me so far. However, on some slides it is necessary to reposition the logo. This question asks on how to remove the logo on some slides and keep it on others, but is there a possibility readjust the logo on some slides?

Here's an MWE:

\documentclass[10pt, aspectratio=43]{beamer}
\usepackage{textpos}

\addtobeamertemplate{frametitle}{}{% \begin{textblock}{100mm}(9.55cm, -0.50cm){ \includegraphics[height=1.5cm]{example-image}} \end{textblock} } \begin{document} % Use grouping to adjust the logo on some slides. { % \setbeamertemplate{frametitle}{} \addtobeamertemplate{frametitle}{}{% \begin{textblock}{100mm}(9.55cm, -1.05cm){ \includegraphics[height=1.5cm]{example-image}} \end{textblock} } \begin{frame} \frametitle{Test Slide 1} Test \end{frame} }

\begin{frame}
    \frametitle{Test Slide 2}
    Test 
\end{frame}

\end{document}

Unfortunately, this leads to two logos on the first slide. And if I comment out

\setbeamertemplate{frametitle}{}

then there is no frametitle and no logo at all.

Can anybody help? Thanks.

Hermi
  • 234

1 Answers1

1

You can specify the y position of the textblock as a macro, and then redefine that macro:

\documentclass[10pt, aspectratio=43]{beamer}
\usepackage{textpos}
\def\ypos{-0.50cm}
\addtobeamertemplate{frametitle}{}{%
    \begin{textblock*}{100mm}(9.55cm, \ypos){
            \includegraphics[height=1.5cm]{example-image}}
    \end{textblock*}
}
\begin{document}
    % Use grouping to adjust the logo on some slides. 
    {
    \def\ypos{-1.05cm}
    \begin{frame}
        \frametitle{Test Slide 1}
        Test
    \end{frame}
    }
\begin{frame}
    \frametitle{Test Slide 2}
    Test 
\end{frame}

\end{document}

Result:

enter image description here

Marijn
  • 37,699