beamer
我正在使用主题制作演示文稿Madrid
。我想在标题页的顶部中央添加机构徽标。最有效的方法是什么?
我已经按照以下方式完成:
\documentclass[aspectratio=43]{beamer}
%------------------------------------
\mode<presentation>{
\usetheme{Madrid}
}
\setbeamercolor{section in head/foot}{fg=white,bg=black} % https://tex.stackexchange.com/a/326553/114006
\makeatletter
\setbeamertemplate{headline}{%
\begin{beamercolorbox}[ht=2.25ex,dp=3.75ex]{section in head/foot}
\insertnavigation{\paperwidth}
\end{beamercolorbox}%
}%
\makeatother
%------------------------------------
\title{Presentation Title}
\titlegraphic{\includegraphics[width=1cm]{example-image}}
\author{Presenter Name}
\date{August, 2021}
\logo{\includegraphics[height=0.5cm,keepaspectratio]{example-image}}
\begin{document}
{
\setbeamercolor{page number in head/foot}{fg=date in head/foot.bg} % https://tex.stackexchange.com/a/412733/114006
\begin{frame}[noframenumbering, plain]
\titlepage
\end{frame}
}
\section{Section 1}
\begin{frame}
\frametitle{Section One}
Sed iaculis dapibus gravida.
\end{frame}
\setbeamercolor{page number in head/foot}{fg=date in head/foot.bg}
% \bulletoff\section*{}
\begin{frame}[noframenumbering]
\Huge\centerline{Thank You.}
\huge\centerline{Any Question?}
\end{frame}
\end{document}
除了logo问题,希望大家能给些建议,优化一下整体模板代码,哪些地方可以改进?
答案1
最简单的方法是在之前添加您的徽标\titelpage
:
\documentclass[aspectratio=43]{beamer}
%------------------------------------
\mode<presentation>{
\usetheme{Madrid}
}
\setbeamercolor{section in head/foot}{fg=white,bg=black} % https://tex.stackexchange.com/a/326553/114006
\makeatletter
\setbeamertemplate{headline}{%
\begin{beamercolorbox}[ht=2.25ex,dp=3.75ex]{section in head/foot}
\insertnavigation{\paperwidth}
\end{beamercolorbox}%
}%
\makeatother
%------------------------------------
\title{Presentation Title}
\titlegraphic{\includegraphics[width=1cm]{example-image}}
\author{Presenter Name}
\date{August, 2021}
\logo{\includegraphics[height=0.5cm,keepaspectratio]{example-image}}
\begin{document}
{
\setbeamercolor{page number in head/foot}{fg=date in head/foot.bg} % https://tex.stackexchange.com/a/412733/114006
\begin{frame}[noframenumbering, plain]
\centering
\includegraphics[width=3cm]{example-image-duck}
\titlepage
\end{frame}
}
\end{document}