在 beamer 中使用主题 Warsaw 时\useoutertheme[subsection=false]{smoothbars}
,我发现框架标题和标题下部之间出现了令人讨厌的重叠
我的代码基本上
\documentclass[cosmer,green,compress,9pt]{beamer}
\mode<presentation>{}
\usetheme{Warsaw}
\useoutertheme[subsection=false]{smoothbars}
\usefonttheme{serif}
\begin{document}
% Stuff
\end{document}
你知道这里的问题出在哪里吗?
答案1
可以通过更改阴影范围来修复此问题。我已从中复制了阴影命令beamerouterthemesmoothbars.sty
并对其进行了修改以减少重叠。更改已标记。
\documentclass[cosmer,green,compress,9pt]{beamer}
\mode<presentation>{}
\usetheme{Warsaw}
\useoutertheme[subsection=false]{smoothbars}
\usefonttheme{serif}
\makeatletter
\AtBeginDocument{
% copied from beamerouterthemesmoothbars.sty
\ifbeamer@sb@subsection
\else
% option "subsection" is set to false
{
\usebeamerfont*{headline} % to set length of "ex" unit correctly
\pgfdeclareverticalshading{beamer@aboveframetitle}{\the\paperwidth}{%
color(0ex)=(frametitle.bg);%
%color(1ex)=(frametitle.bg);% % original
%color(2ex)=(section in head/foot.bg) % original
color(1ex)=(section in head/foot.bg) % modified
}
}
\fi
}
\makeatother
\begin{document}
\section{s1}
\frame{\frametitle{title}content}
\subsection{ss1}
\frame{\frametitle{title}content}
\section{s2}
\frame{\frametitle{title}content}
\subsection{ss2}
\frame{\frametitle{title}content}
\frame{\frametitle{title}content}
\end{document}