[Tex/LaTex] Beamer, adding logo to frame title

alignbeamer

I'm trying to add a logo to a frametitle of a specific page but I don't know how to align it.

This is my code (Madrid theme):

  \frametitle{Tabla de contenidos \includegraphics[height=0.45cm,right]{UTDT1.jpg}}

And this is how it looks like:

But instead of looking like two lines, I need the text to be aligned with the logo. How can I do that?

Thanks in advance.

Best Answer

It is not only "looking like two lines", but your code indeed produces two lines. To prevent this, you can manually specify how far the image should be pushed to the right.

\documentclass{beamer}

\usetheme{Madrid}
\usepackage[export]{adjustbox} 

\begin{document}

\begin{frame}
  \frametitle{Tabla de contenidos \includegraphics[height=0.45cm,right=7.8cm]{example-image}}
    abc
\end{frame} 

\end{document}

enter image description here