我想使用一种颜色的 outertheme 信息线。我的样式文件beamerthemeTest.sty
如下所示:
\usetheme{CambridgeUS}
\useinnertheme{rectangles}
\setbeamertemplate{navigation symbols}{}
\setbeamercovered{transparent}
\RequirePackage{pgf}
\definecolor{zhawblue}{HTML}{1166AD}
\setbeamercolor*{Title bar}{fg=white,bg=zhawblue}
\setbeamercolor*{frametitle}{parent=Title bar}
\setbeamercolor*{block title}{bg=zhawblue,fg=white}
\setbeamercolor*{palette primary}{fg=white,bg=zhawblue}
\setbeamercolor*{palette secondary}{fg=white,bg=zhawblue}
\setbeamercolor*{palette tertiary}{bg=zhawblue,fg=white}
\setbeamercolor*{palette quaternary}{fg=white,bg=zhawblue}
\setbeamercolor*{separation line}{bg=zhawblue,fg=zhawblue}
\setbeamercolor*{fine separation line}{bg=zhawblue,fg=zhawblue}
但面板之间有一条小分隔线。我该如何去除它们?
感谢您的提示!谢谢 Reza
答案1
好的,要让它工作我必须用自定义代码footline
(从 outertheme 复制并修改为 ,headline
和)替换,和:frametitle
shadow
split
infolines
\usetheme{CambridgeUS}
\useinnertheme{rectangles}
\setbeamertemplate{navigation symbols}{}
\setbeamercovered{transparent}
\RequirePackage{pgf}
\definecolor{zhawblue}{HTML}{1166AD}
\setbeamercolor*{corporatecolor}{fg=white,bg=zhawblue}
\setbeamercolor*{frametitle}{fg=white,bg=zhawblue}
\setbeamercolor*{block title}{bg=zhawblue,fg=white}
\setbeamercolor*{block body}{bg=octavelightgray,fg=octavegray}
\setbeamercolor*{normal text}{bg=white,fg=octavegray}
\setbeamercolor*{palette primary}{fg=white,bg=zhawblue}
\setbeamercolor*{palette secondary}{fg=white,bg=zhawblue}
\setbeamercolor*{palette tertiary}{bg=zhawblue,fg=white}
\setbeamercolor*{palette quaternary}{fg=white,bg=zhawblue}
\pgfdeclareverticalshading{beamer@topshade}{\paperwidth}{%
color(0pt)=(bg);
color(4pt)=(black!50!bg)
}
\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex]{corporatecolor}
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}
\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}
\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}
\end{beamercolorbox}
}%
\vskip0pt%
}
\setbeamertemplate{headline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex]{corporatecolor}
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,right]{section in head/foot}%
\usebeamerfont{section in head/foot}
\insertsectionhead\hspace*{2ex}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,left]{subsection in head/foot}%
\usebeamerfont{subsection in head/foot}
\hspace*{2ex}\insertsubsectionhead
\end{beamercolorbox}
\end{beamercolorbox}
}%
\vskip0pt%
\vskip-0.2pt
\pgfuseshading{beamer@topshade}
\vskip-2pt
}
\setbeamertemplate{frametitle}
{%
\nointerlineskip%
\vskip-2pt%
\hbox{\leavevmode
\begin{beamercolorbox}[sep=0.3cm,left,wd=\paperwidth]{frametitle}
\usebeamerfont{frametitle}%
\insertframetitle
\end{beamercolorbox}
}%
\nointerlineskip
\vskip-0.2pt
\hbox to\textwidth{\hskip-\Gm@lmargin\pgfuseshading{beamer@topshade}\hskip-\Gm@rmargin}
\vskip-2pt
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north east,xshift=-2pt,yshift=0pt] at (current page.north east) {
\includegraphics[height=1cm]{images/zhaw_neg.pdf}};
\end{tikzpicture}
\vspace*{-0.6cm}
}
结果如下: