Beamer 背景和文本

Beamer 背景和文本

我提供了下面显示的输出的最小示例:

\documentclass [compress]{beamer}
\newcommand\Fontvi{\fontsize{6}{7.2}\selectfont}
\usepackage{remreset}
\usepackage{textpos}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage[export]{adjustbox}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{animate}

\usetheme{Warsaw}
\definecolor{ForestGreen}{RGB}{60, 140, 60}
\setbeamercolor{palette primary}{fg=white,bg=ForestGreen}
\beamersetuncovermixins{\opaqueness<1>{35}}{\opaqueness<2->{50}}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{headline}{%
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex]{palette primary}%
\insertsectionnavigationhorizontal{\paperwidth}{}{\hskip0pt plus1filll}
\end{beamercolorbox}%
}
}

\setbeamertemplate{footline}[page number]
\setbeamercovered{invisible}
\setbeamertemplate{navigation symbols}{}
\useoutertheme[footline=empty,subsection=false]{miniframes}

\begin{document}
\title{Multisource data analysis}  
\author{Author name} 
\institute{Biochemistry}
\date{\today} 
\begin{frame}[plain]
\titlepage
\end{frame}
\section{Motivation} 

\begin{frame} \frametitle {biofuel production}
\begin{figure}
\includegraphics[scale=0.30]{/home/Documents/mot1.png} 
\end{figure}
\end{frame}
\end{document}

在此处输入图片描述

我想要做的是将下面的徽标添加为整个纸张宽度的标题幻灯片放映机脚注

在此处输入图片描述

并且我在文档开始之前定义了以下内容:

\pgfdeclareimage[width=\paperwidth]{mybackground}{/home/Documents/ta.jpg}

\setbeamertemplate{title page}{

   \begin{picture}(0,0)

        \put(-30,-163){%
           \pgfuseimage{mybackground}
        }

        \put(0,-110.7){%

            \begin{minipage}[b][50mm][t]{200mm}

                \usebeamertemplate {title}{\inserttitle\par}
                \usebeamercolor{author}{\insertauthor\par}
                \usebeamercolor{institute}{\insertinstitute\par}
                \usebeamercolor{date}{\insertdate\par}
            \end{minipage}
        }

        \end{picture}

   }

最后得到了这个

在此处输入图片描述

但问题是我丢失了为标题定义的绿色框。我希望它类似于第一张图片,只是在底部添加了徽标。此外,对于第二张幻灯片,我无法将标题中的蓝色框更改为绿色。我希望所有幻灯片标题都有类似的森林绿色框。

答案1

最简单的方法是将图片作为幻灯片的背景添加,然后在标题幻灯片之后清除它:

\setbeamertemplate{background}{%
\put(0,-265){%
           \pgfuseimage{mybackground}
}
}

完整代码如下:

\documentclass [compress]{beamer}
\newcommand\Fontvi{\fontsize{6}{7.2}\selectfont}
\usepackage{remreset}
\usepackage{textpos}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage[export]{adjustbox}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{animate}

\usetheme{Warsaw}
\definecolor{ForestGreen}{RGB}{60, 140, 60}
\setbeamercolor{palette primary}{fg=white,bg=ForestGreen}
\beamersetuncovermixins{\opaqueness<1>{35}}{\opaqueness<2->{50}}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{headline}{%
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex]{palette primary}%
\insertsectionnavigationhorizontal{\paperwidth}{}{\hskip0pt plus1filll}
\end{beamercolorbox}%
}
}

\setbeamertemplate{footline}[page number]
\setbeamercovered{invisible}
\setbeamertemplate{navigation symbols}{}
\useoutertheme[footline=empty,subsection=false]{miniframes}

 %%-------------------------------------
 %% here declare the background
\pgfdeclareimage[width=\paperwidth]{mybackground}{alaska.jpg}
\setbeamertemplate{background}{%
\put(0,-265){%
           \pgfuseimage{mybackground}
}
}
%%-------------------------------------
\begin{document}
\title{Multisource data analysis}
\author{Author name}
\institute{Biochemistry}
\date{\today}
\begin{frame}[plain]
\titlepage
\end{frame}
%%-------------------------------------
\setbeamertemplate{background}{}      %% clear background after title slide
%%-------------------------------------
\section{Motivation}
\begin{frame} 
\frametitle {biofuel production}
\begin{figure}
\includegraphics[scale=0.30]{example-image-a}
\end{figure}
\end{frame}
\end{document}

在此处输入图片描述

相关内容