[Tex/LaTex] Logo position of title page

beamertitles

I working on the presentation slides. I want to put my university logo on right top corner of only title page.

I am using theme Madrid.

\titlegraphic{\includegraphics[width=2cm]{UA}\hspace*{8.75cm}~% 

This command works, but the logo is below the \title, \author, \institute.

\logo{\includegraphics[height=1.8cm]{UA}\vspace{195pt}} 

this command also works, but the logo shows on all pages, which is not I want.

Best Answer

One possibility is to redefine the template title page so to insert the \titlegraphic before the \title:

\setbeamertemplate{title page}
{
  \vbox{}
  \begingroup
    \centering
    {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}\vskip1em
    \begin{beamercolorbox}[sep=8pt,center]{title}
      \usebeamerfont{title}\inserttitle\par%
      \ifx\insertsubtitle\@empty%
      \else%
        \vskip0.25em%
        {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
      \fi%
    \end{beamercolorbox}%
    \vskip1em\par
    \begin{beamercolorbox}[sep=8pt,center]{author}
      \usebeamerfont{author}\insertauthor
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=8pt,center]{institute}
      \usebeamerfont{institute}\insertinstitute
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=8pt,center]{date}
      \usebeamerfont{date}\insertdate
    \end{beamercolorbox}
  \endgroup
  \vfill
}

MWE:

\PassOptionsToPackage{demo}{graphicx} % remove this line in your document
\documentclass{beamer}
\usetheme{Madrid}

\title{A title}
\author{Me}
\institute{My Institute}
\titlegraphic{\raggedright\includegraphics[width=2cm,height=1cm]{UA}} % remove height

\setbeamertemplate{title page}
{
  \vbox{}
  \begingroup
    \centering
    {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}\vskip1em
    \begin{beamercolorbox}[sep=8pt,center]{title}
      \usebeamerfont{title}\inserttitle\par%
      \ifx\insertsubtitle\@empty%
      \else%
        \vskip0.25em%
        {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
      \fi%
    \end{beamercolorbox}%
    \vskip1em\par
    \begin{beamercolorbox}[sep=8pt,center]{author}
      \usebeamerfont{author}\insertauthor
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=8pt,center]{institute}
      \usebeamerfont{institute}\insertinstitute
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=8pt,center]{date}
      \usebeamerfont{date}\insertdate
    \end{beamercolorbox}
  \endgroup
  \vfill
}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\begin{frame}
Some Text
\end{frame}

\end{document}

Output:

enter image description here