我正在尝试创建一个大学演示文稿,但在第一张幻灯片上正确格式化大学徽标时遇到了一些麻烦。
我正在使用流行的 Overleaf 模板这里。
这张幻灯片的直接代码是:
%----------------------------------------------------------------------------------------
% TITLE PAGE
%----------------------------------------------------------------------------------------
\begin{figure}[htp]
\centering
\includegraphics[width=4cm]{COBlogo.jpg}
\end{figure}
\title[Short title]{Main Topic } % The short title appears at the bottom of every slide, the full title is only on the title page
\author{John Smith} % Your name
\institute[UCLA] % Your institution as it will appear on the bottom of every slide, may be shorthand to save space
{
University of California \\ % Your institution for the title page
\medskip
\textit{[email protected]} % Your email address
}
\date{\today} % Date, can be changed to a custom date
\begin{document}
\begin{frame}
\titlepage % Print the title page as the first slide
\end{frame}
\begin{frame}
\frametitle{Overview} % Table of contents slide, comment this block out to remove it
\tableofcontents % Throughout your presentation, if you choose to use \section{} and \subsection{} commands, these will automatically be printed on this slide as an overview of your presentation
\end{frame}
但是,当我添加图形代码(如代码顶部所示)时,我得到了以下结果:
我希望大学徽标位于“主要主题”框的正下方。我尝试将添加图形代码复制并粘贴到其他位置(即名称后面的代码下方等),但没有成功。
对于我需要使用什么代码才能正确格式化,您有什么想法吗?如果您能提供任何想法、建议或示例链接,我将不胜感激。
谢谢。
答案1
我没有徽标,因此使用了一个虚拟空白——在替换时删除实际代码的第一行
标题页的投影仪模板可以按照\setbeamertemplate
此处所述进行更改 -封面标志位置
线路
\centering{\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic}\par\vskip1em
特别将徽标放置在标题下方——可以借助命令改变分隔\vskip2em
方式
结果
\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]{COBlogo.jpg}} %
adjust width/ height
\setbeamertemplate{title page}
{
\vbox{}
\begingroup
\centering
\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}%
\vskip2em%<-------------------------spacing
\centering{\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic}\par\vskip1em
\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}