我在 Beamer 中使用 Metropolis 主题,需要在每个部分添加不同的图像。当然,我也想保持进度条原样。我正在使用此代码,但不幸的是,它不起作用。
\documentclass[10pt]{beamer}
\usetheme[progressbar=frametitle]{metropolis}
\usepgfplotslibrary{dateplot}
\usepackage{xspace}
\newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace}
\usepackage{xcolor}
\usepackage{graphicx,array}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage[utf8]{inputenc}
\usepackage{transparent}
\definecolor{darkmidnightblue}{rgb}{0.0, 0.2, 0.4}
\begin{document}
\maketitle
\begin{frame}{\textbf{1st frame example}} %several frames (slides) like this one
In this lecture we will:
\begin{itemize}
\item Introduce...
\item Define ...
\item Explore ...
\end{itemize}
\end{frame}
%section 1 with image 1 I also need the image to be transparent
\section{\textcolor{darkmidnightblue}{\textbf{Measuring Inequality}}}
\transparent{0.4}\includegraphics[height=2cm]{section_1_image.png}
\begin{frame}{\textbf{2nd frame example}} %several frames (slides) like this one
In this lecture we will:
\begin{itemize}
\item a
\item b
\item c
\end{itemize}
\end{frame}
%section 2 with image 2 I also need the image to be transparent
\section{\textcolor{darkmidnightblue}{\textbf{Measuring Poverty}}}
\transparent{0.4}\includegraphics[height=2cm]{section_2_image.png}
\begin{frame}{\textbf{3rd frame example}} %several frames (slides) like this one
In this lecture we will:
\begin{itemize}
\item d
\item e
\item f
\end{itemize}
\end{frame}
%section 3 with image 3 I also need the image to be transparent
\section{\textcolor{darkmidnightblue}{\textbf{the summary}}}
\transparent{0.4}\includegraphics[height=2cm]{section_2_image.png}
\begin{frame}{\textbf{summary}}{}
Today, we have:
\begin{itemize}
\item Introduced...
\item Defined ...
\item Explored ...
\end{itemize}
\end{frame}
\end{document}
你能帮忙吗?谢谢
答案1
看看以下解决方案是否是您想要的:
\documentclass[10pt]{beamer}
\usetheme[progressbar=frametitle]{metropolis}
%\usepackage[utf8]{inputenc}
% graphicx and xcolor are load by beamer
\usepackage{pgfplots}% it loads tikz too
\usepgfplotslibrary{dateplot}
\usepackage{xspace}
\newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace}
\usepackage{array}
\usepackage{transparent}
\definecolor{darkmidnightblue}{rgb}{0.0, 0.2, 0.4}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\begin{frame}
\section{\textcolor{darkmidnightblue}{\textbf{Measuring Inequality}}}
\transparent{0.4}\includegraphics[height=2cm]{example-image-duck}%{section_1_image.png}
\end{frame}
\begin{frame}{\textbf{1st frame example}} %several frames (slides) like this one
In this lecture we will:
\begin{itemize}
\item Introduce...
\item Define ...
\item Explore ...
\end{itemize}
\end{frame}
\begin{frame}{\textbf{2nd frame example}} %several frames (slides) like this one
In this lecture we will:
\begin{itemize}
\item a
\item b
\item c
\end{itemize}
\end{frame}
\begin{frame}
\section{\textcolor{darkmidnightblue}{\textbf{Measuring Poverty}}}
\transparent{0.4}\includegraphics[height=2cm]{example-image-duck}%{section_2_image.png}
\end{frame}
\begin{frame}{\textbf{3rd frame example}} %several frames (slides) like this one
In this lecture we will:
\begin{itemize}
\item d
\item e
\item f
\end{itemize}
\end{frame}
\begin{frame}
\section{\textcolor{darkmidnightblue}{\textbf{the summary}}}
\transparent{0.4}\includegraphics[height=2cm]{example-image-duck}%{section_2_image.png}
\end{frame}
\begin{frame}{\textbf{summary}}{}
Today, we have:
\begin{itemize}
\item Introduced...
\item Defined ...
\item Explored ...
\end{itemize}
\end{frame}
\end{document}