我正在尝试修改Beamer
模板以便同时拥有:1)圆角框 2)框周围的阴影 3)块标题和块主体之间的定义线(无阴影)(如 innertheme 默认设置)
前两点很容易(\useinnertheme[shadow=true]{rounded}
),有人知道如何解决第三个问题吗?
谢谢
答案1
像这样吗?
\documentclass{beamer}
\usecolortheme{rose}
\setbeamertemplate{blocks}[rounded][shadow=true]
% Disable shading between block title and block content
\makeatletter
\pgfdeclareverticalshading[lower.bg,upper.bg]{bmb@transition}{200cm}{color(0pt)=(lower.bg); color(4pt)=(lower.bg); color(4pt)=(upper.bg)}
\makeatother
\begin{document}
\begin{frame}
\begin{block}{Title without shading}
Block stuff, and shadow is still shaded!
\end{block}
\end{frame}
\end{document}
答案2
尝试这个:
\addtobeamertemplate{block begin}{}{%
{\usebeamercolor[fg]{block title}{\rule{\textwidth}{0.4pt}}}
}