\documentclass[xcolor=dvipsnames]{beamer}
\definecolor{myblue}{rgb}{0.00,0.00,0.50}
\setbeamercolor{title}{bg=myblue!80!white}
\setbeamerfont{frametitle}{series=\mdseries}
\usecolortheme[named=blue]{structure}
\usefonttheme[onlymath]{serif} % rendre l'écriture math plus beau (no necessary samcarter)
%%%%%%%%%%%%%%%%%%%%%%%%%\usepackage%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----
\usepackage{pifont} %bouni
%-----bclogo--------------
%\usepackage{soul} %suligne dans Bclogo
%\setul{}{1.5pt}
\usepackage[tikz]{bclogo}
%\colorlet{bctitle}{Maroon}
%\renewcommand\bcStyleTitre[1]{\vskip-0.8em\bfseries\color{bctitle}\ul{#1}\vskip-0.7em}
%-----
%-----
\usepackage{fancybox} %pour faire l'encadrement
\newcommand{\cadre}[1]{
\setlength{\fboxsep}{7pt}
\begin{center}
\shadowbox{#1}
\end{center}}
%--------------------
%----------pabox----------
\usepackage[most]{tcolorbox}
\newtcolorbox{mybox}[2][]{%
colback=bg,
colframe=blue!75!black,
fonttitle=\bfseries,
coltitle=blue!75!black,
colbacktitle=bg,
enhanced,
attach boxed title to top left={yshift=-1.2mm, xshift=2mm},
title=#2,
#1}
%--------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%------------------------\AtBeginSubsection[]----------------------
\AtBeginSubsection[]{
\begin{frame}<beamer>[noframenumbering,plain]{Outline}
\transsplitverticalout
\tableofcontents[currentsection,currentsubsection]
\end{frame}
}
\usetheme{Madrid}
%\usetheme[secheader]{Madrid}
%%%------begin Warsaw----------------------------------
%\usetheme{Warsaw}
%\setbeamertemplate{headline}{} % supprimer le headline
%------
%-----------------------------footline-----------------------------
\setbeamertemplate{footline}{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.22\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.71\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
% \hspace*{3em}
% \insertframenumber{} / \inserttotalframenumber\hspace*{1ex}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.07\paperwidth,ht=2.25ex,dp=1ex,center]{page number in head/foot}%
% \usebeamerfont{title in head/foot}\insertshorttitle\hspace*{3em}
\insertframenumber{} / \inserttotalframenumber
\end{beamercolorbox}%
}%
\vskip0pt%
}
\setbeamercolor{author in head/foot}{bg=black}
\setbeamercolor{title in head/foot}{bg=blue}
\setbeamercolor{page number in head/foot}{bg=gray,fg=black}
%%%%%%%%%%%%%%%%%%%Title and author%%%%%%%%%%%%%%%%%
\title[Title of the talk]{Title of the talk}
\author[Author(University of ..)]{Author}
%%------------------%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[noframenumbering,plain]
\maketitle{}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{one}
\subsection{one}
\begin{frame}{The operator norm}
\end{frame}
\subsection{two}
\subsection{tree}
\section{two}
\section{three}
\end{document}
我想在头部和底部使用颜色
myblue
。还希望幻灯片的编号像这样Author(University of ..)
。
答案1
在以下缩短的 MWE 中,我习惯\setbeamercolor{page number in head/foot}{bg=black,fg=white}
在黑色背景上获取白色页码(请与\setbeamercolor{author in head/foot}{bg=black}
作者的设置进行比较)。为了将标题的背景颜色改为myblue
,我将 改为 并\setbeamercolor{title in head/foot}
添加了:{bg=blue}
{bg=myblue}
\setbeamercolor{frametitle}{bg=myblue}
\documentclass[xcolor=dvipsnames]{beamer}
\definecolor{myblue}{rgb}{0.00,0.00,0.50}
\setbeamercolor{title}{bg=myblue!80!white}
\setbeamerfont{frametitle}{series=\mdseries}
\usecolortheme[named=blue]{structure}
\usefonttheme[onlymath]{serif}
\usetheme{Madrid}
\setbeamertemplate{footline}{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.22\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.71\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
% \hspace*{3em}
% \insertframenumber{} / \inserttotalframenumber\hspace*{1ex}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.07\paperwidth,ht=2.25ex,dp=1ex,center]{page number in head/foot}%
% \usebeamerfont{title in head/foot}\insertshorttitle\hspace*{3em}
\insertframenumber{} / \inserttotalframenumber
\end{beamercolorbox}%
}%
\vskip0pt%
}
\setbeamercolor{frametitle}{bg=myblue}
\setbeamercolor{author in head/foot}{bg=black}
\setbeamercolor{title in head/foot}{bg=myblue}
\setbeamercolor{page number in head/foot}{bg=black,fg=white}
\title[Title of the talk]{Title of the talk}
\author[Author(University of ..)]{Author}
\begin{document}
\begin{frame}{The operator norm}
\end{frame}
\end{document}