私は以下のコード(大まかに)を使用して、ビーマー見出し。見出しの内容は を使用して設定しますoutertheme
tree
。シェーディング方法は、 のシェーディング方法にほぼ基づいていますSingapore
。問題は、スライドの一番上に明るい緑の線があるのに、一番上まで濃い緑にしたいということです。
\PassOptionsToPackage{rgb}{xcolor}
\documentclass{beamer}
\definecolor{acol}{rgb}{.5,1,.5}
\definecolor{bcol}{rgb}{.1,.6,.2}
\colorlet{bcol1}{bcol!25!black}
\setbeamercolor{title in head/foot}{fg=acol,bg=}
\setbeamercolor{section in head/foot}{fg=acol,bg=}
\setbeamercolor{subsection in head/foot}{fg=acol,bg=}
\setbeamercolor{upper separation line head}{bg=bcol1}
\setbeamercolor{lower separation line head}{bg=bcol1}
\makeatletter
\useoutertheme{tree}
\pgfdeclarehorizontalshading{beamer@headfade}{\dimexpr5.4375ex+3pt}
{%
color(0cm)=(bcol1);
color(\paperwidth)=(acol)%
}
\addtoheadtemplate{\vskip 3pt\pgfuseshading{beamer@headfade}\vskip\dimexpr -3pt-10.875ex}{}
\makeatother
\begin{document}
\title{Title}
\section{A Section}
\subsection{A Subsection}
\begin{frame}{A Frame}{A Subframe}
Some text
\end{frame}
\end{document}
おそらくどこかで計算を間違えたか、間違った値を使用したのでしょうが、何かをプッシュするたびに、何かが押し戻され、どうも正しくできないようです。(おそらく、いつものように のbeamer
コードの迷路に魅了されているからでしょう。)
ヒントがあればぜひ教えてください!
答え1
提供された MWE でエラーが発生します。次の行に、\dimexpr
垂直モードでは使用できないと記載されています。
\pgfdeclarehorizontalshading{beamer@headfade}{\dimexpr5.4375ex+3pt}
削除したところ、問題なく動作しました (上部に線はありません)。
\pgfdeclarehorizontalshading{beamer@headfade}{5.4375ex+3pt}
\PassOptionsToPackage{rgb}{xcolor}
\documentclass{beamer}
\definecolor{acol}{rgb}{.5,1,.5}
\definecolor{bcol}{rgb}{.1,.6,.2}
\colorlet{bcol1}{bcol!25!black}
\setbeamercolor{title in head/foot}{fg=acol,bg=}
\setbeamercolor{section in head/foot}{fg=acol,bg=}
\setbeamercolor{subsection in head/foot}{fg=acol,bg=}
\setbeamercolor{upper separation line head}{bg=bcol1}
\setbeamercolor{lower separation line head}{bg=bcol1}
\makeatletter
\useoutertheme{tree}
\pgfdeclarehorizontalshading{beamer@headfade}{5.4375ex+3pt}
{%
color(0cm)=(bcol1);
color(\paperwidth)=(acol)%
}
\addtoheadtemplate{\vskip 3pt\pgfuseshading{beamer@headfade}\vskip\dimexpr -3pt-10.875ex}{}
\makeatother
\begin{document}
\title{Title}
\section{A Section}
\subsection{A Subsection}
\begin{frame}{A Frame}{A Subframe}
Some text
\end{frame}
\end{document}