我正在使用Metropolis Beamer Template
https://it.overleaf.com/latex/templates/metropolis-beamer-theme/qzyvdhrntfmr。
我怎样才能在标题页的右侧添加一些其他词语,例如主管和副主管?
我尝试编辑该beamerinnerthememetropolis.sty
文件,但我不完全理解该代码的工作原理。
答案1
您必须调整垂直空间、字体大小等,但您可以从以下位置开始:
\documentclass{beamer}
\usetheme{metropolis}
\setbeamertemplate{title page}{
\begin{minipage}[b][\paperheight]{\textwidth}
\ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title graphic}\fi
\vfill%
\ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi
\ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi
\usebeamertemplate*{title separator}
\begin{minipage}[t]{.5\textwidth}
\ifx\beamer@shortauthor\@empty\else\usebeamertemplate*{author}\fi
\ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi
\ifx\insertinstitute\@empty\else\usebeamertemplate*{institute}\fi
\end{minipage}
\begin{minipage}[t]{.5\textwidth}
\vspace*{2em}
{\tiny Super Visor: Super Visor's name%
\par}
\vspace*{1em}
{\tiny Co supervisor: Co supervisor's name%
\par}
\end{minipage}
\vfill
\vspace*{1mm}
\end{minipage}
}
\title{Metropolis}
\subtitle{A modern beamer theme}
\author{Matthias Vogelgesang}
\institute{Center for modern beamer themes}
\date{}
\begin{document}
\maketitle
\end{document}
答案2
如果我正确理解了你的问题,我评论中的答案可以帮助我们。\includegraphics
根据minipage
该答案中的环境进行更改,提取以下代码。
\documentclass{beamer}
\usetheme[numbering=none,block=fill]{metropolis}
%\setbeamerfont{frametitle}{size=\normalsize,series=\normalfont\bfseries}
\setbeamerfont{frametitle}{size=\Huge,series=\normalfont\bfseries}
\setbeamerfont{page number in head/foot}{size=\normalsize,series=\normalfont\bfseries}
\setbeamercolor{footline}{fg=black!2, bg=mDarkTeal}
\setbeamertemplate{frame footer}{My footline}
\makeatletter
\setlength{\metropolis@frametitle@padding}{0.7ex}% <- default 2.2 ex
\setbeamertemplate{footline}{%
\begin{beamercolorbox}[wd=\textwidth, sep=0.7ex]{footline}% <- default 3ex
\usebeamerfont{page number in head/foot}%
\usebeamertemplate*{frame footer}
\hfill%
\usebeamertemplate*{frame numbering}
\end{beamercolorbox}%
}
\setbeamertemplate{frametitle}{%
\nointerlineskip%
\begin{beamercolorbox}[%
wd=\paperwidth,%
sep=0pt,%
leftskip=\metropolis@frametitle@padding,%
rightskip=\metropolis@frametitle@padding,%
]{frametitle}%
\metropolis@frametitlestrut@start%
\insertframetitle%
\nolinebreak%
\metropolis@frametitlestrut@end%
\hfill
\begin{minipage}[t]{0.3\textwidth}
\small Prof.Dr. Nikola Tesla
\small Prof.Dr. John Doe
\end{minipage}
\end{beamercolorbox}%
}
\makeatother
\begin{document}
\begin{frame}{My frame title}
\begin{block}{Some itemize}
\begin{itemize}
\item \alert{Item 1}
\item Item 2
\end{itemize}
\end{block}
\begin{block}{Some maths}
\[\sum_{n=1}^{\infty}\frac{1}{n^2}=\frac{\pi^2}{6}=\zeta(2)\]
\end{block}
\end{frame}
\end{document}