如何将我的大学徽标放在左上角?我不想将徽标放在右侧
example-image-a
我应该改变我的标志大学的方向吗?
\documentclass{beamer}
\usetheme{Berkeley}
\def\insertlogoright{\usebeamertemplate*{logoright}}
\def\logoright{\setbeamertemplate{logoright}}
\makeatletter
\defbeamertemplate*{headline}{mycustom theme}
{%
\begin{beamercolorbox}[wd=\paperwidth]{frametitle}
\ifx\beamer@sidebarside\beamer@lefttext%
\else%
\hfill%
\fi%
\ifdim\beamer@sidebarwidth>0pt%
\usebeamercolor[bg]{logo}%
\vrule width\beamer@sidebarwidth height \beamer@headheight%
\hskip-\beamer@sidebarwidth%
\hbox to \beamer@sidebarwidth{%
\hss%
\vbox to \beamer@headheight{%
\vss\hbox{\color{fg}\insertlogo}\vss%
}%
\hss}%
\hfill%
\hbox to \beamer@sidebarwidth{%
\hss%
\vbox to \beamer@headheight{%
\vss\hbox{\color{fg}\insertlogoright}\vss%
}%
\hss}%
\else%
\vrule width0pt height \beamer@headheight%
\fi%
\end{beamercolorbox}
}
\makeatother
\logo{\includegraphics[width=1.2cm,keepaspectratio]{example-image-a}}
\logoright{\includegraphics[width=1.2cm,keepaspectratio]{example-image-b}}
\title{The Title}
\author{The Author}
\institute{The Institute}
\begin{document}
{
\setbeamertemplate{logo}{}
\setbeamertemplate{logoright}{}
\begin{frame}
\maketitle
\end{frame}
}
\begin{frame}{this}
test
\end{frame}
\end{document}
答案1
如果您使用默认标题而不是自定义标题,则徽标将默认位于左上角。
\documentclass{beamer}
\usetheme{Berkeley}
\logo{\includegraphics[width=1.2cm,keepaspectratio]{example-image-a}}
\title{The Title}
\author{The Author}
\institute{The Institute}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\begin{frame}{this}
test
\end{frame}
\end{document}