我是 latex beamer 演示的新手。我尝试插入一个横跨整个右侧的徽标,如下所示。请帮我编写一个代码,以便得到类似这样的效果。
答案1
我修改了headline
模板split theme
。您可以通过以下方式设置自定义标题图像
\newcommand\headerimage{<path to image>}
梅威瑟:
\documentclass{beamer}
\usepackage{mwe}
\newcommand\headerimage{example-image-a}
\usetheme{Copenhagen}
\makeatletter
\setbeamertemplate{headline}
{%
\leavevmode%
\@tempdimb=2.4375ex%
\ifnum\beamer@subsectionmax<\beamer@sectionmax%
\multiply\@tempdimb by\beamer@sectionmax%
\else%
\multiply\@tempdimb by\beamer@subsectionmax%
\fi%
\ifdim\@tempdimb>0pt%
\advance\@tempdimb by 1.825ex%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{section in head/foot}%
\vbox to\@tempdimb{\vfil\insertsectionnavigation{.5\paperwidth}\vfil}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{subsection in head/foot}%
\includegraphics[width=.5\paperwidth,height=\@tempdimb]{\headerimage}
\end{beamercolorbox}%
\fi%
}
\makeatother
\begin{document}
\section{Introduction}
\frame{\frametitle{\secname}}
\section{Background Information}
\frame{\frametitle{\secname}}
\section{The Important Things}
\frame{\frametitle{\secname}}
\section{Analysis of the Work}
\frame{\frametitle{\secname}}
\section{Conclusion}
\frame{\frametitle{\secname}}
\end{document}