Beamer-標題頁-圖片

Beamer-標題頁-圖片

我希望能夠在 Beamer 標題頁的標題之前添加兩張圖片,如下所示:

在此輸入影像描述

我使用了這個命令\titlegraphic{\includegraphics[height=4cm]{Picture}},但我沒有達到目標

\documentclass{beamer}
\titlegraphic{\includegraphics[height=4cm]{picture1}}
\titlegraphic{\includegraphics[height=4cm]{picture2}}
\title{TITLE}
\subtitle{\textbf{Subtitle}}
\author{Author}
\institute{University }

\setbeamercolor{title}{bg=orange,fg=white}


\begin{document}

\maketitle


\end{document}

答案1

一個快速的單行解決方案是使用以下內容:

\addtobeamertemplate{title page}{\includegraphics[scale=.05]{lion} \hfill \includegraphics[scale=.05]{lion}}{}

這樣你就會有這樣的東西:

\documentclass{beamer}

\addtobeamertemplate{title page}{\includegraphics[scale=.05]{lion} \hfill \includegraphics[scale=.05]{lion}}{}

\title{TITLE}
\subtitle{subtitle}
\author{Author}
\institute{University}

\setbeamercolor{title}{bg=orange,fg=white}

\begin{document}
\maketitle
\end{document}

在此輸入影像描述

如果您需要更多無法透過addtobeamertemplate巨集獲得的自訂功能,則應該建立自訂title page範本。該default模板可以在 中找到,beamerinnerthemedefault.sty並且經過請求的修改後將如下所示:

\makeatletter
\setbeamertemplate{title page}
{
  \includegraphics[scale=.05]{lion} \hfill \includegraphics[scale=.05]{lion} % new code
  \vbox{}
  \vfill
  \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}%
    \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}\vskip0.5em
  \endgroup
  \vfill
}
\makeatother

透過適當的更改,您可以添加垂直空間或重新定位圖片或任何您喜歡的內容。

答案2

我也常常需要這樣做。我通常不使用 ,而是\titlegraphic使用以下方法:

\begin{frame}
  \begin{columns}
    \column{0.5\textwidth}
    \flushleft
    \includegraphics{leftpicture}
    \column{0.5\textwidth}
    \flushright
    \includegraphics{rightpicture}
  \end{columns}
  \titlepage
\end{frame}

甚至

\begin{frame}
  \hbox to \textwidth{
    \includegraphics{leftpicture}
    \hfill
    \includegraphics{rightpicture}
  }
  \titlepage
\end{frame}

相關內容