5

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.

3

2 Answers 2

6

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

7

The tricky part was getting the right width.

\documentclass{beamer}
\usetheme{Madrid}
\begin{document}
\begin{frame}
 \frametitle{\makebox[\framewidth]{Tabla de contenidos \hfill\includegraphics[height=0.45cm]{example-image}}}
\end{frame}
\end{document}

demo

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .