Beamer 상단 라인의 탐색 원 색상 및 음영 제어

Beamer 상단 라인의 탐색 원 색상 및 음영 제어

저는 및 를 사용하여 Beamer에서 프리젠테이션을 준비하고 \useoutertheme{miniframes}있으며 \useinnertheme{circles}기본 색상 테마를 수정한 버전을 만들고 있습니다.

상단에 프랑크푸르트 같은 네비게이션 바를 두고 싶은데 배경색을 설정하는 대신 상단 바의 배경을 제공하는 이미지를 넣었습니다.

내가 원하는 것은 다음과 같이 현재 섹션 제목과 하위 섹션 점을 나머지 섹션과 비교하여 강조 표시하는 것입니다.

음영이 정확하지만 배경색이 있음

...이것은 "머리/발 섹션"에 대한 배경색을 선언할 때만 작동한다는 점을 제외하면 그렇습니다. 해당 정의를 설정하면 {bg=}활성 섹션과 원이 음영 처리됩니다.더 어둡다나머지는 내가 원하는 것과 반대입니다.

bg는 정확하지만 이제 음영이 잘못되었습니다.

fg완전히 흰색으로 설정하면모든 것흰색이 되고 비활성 영역에 음영이 표시되지 않습니다. 내가 원하는 것은 두 번째 이미지의 배경으로 첫 번째 이미지의 음영입니다.

어떻게 이를 달성할 수 있나요?


편집 : 최소한의 작업 예

다음은 최소한의 작업 예입니다. 작동하려면 배경 이미지가 필요합니다.이 배경 이미지The Internetz(TM)에서.

최소한의 작업 예제에 대한 코드는 다음과 같습니다. 에는 3가지 다른 옵션이 있습니다 \setbeamercolor{section in head/foot}.옵션 1음영이 없는 전체 흰색 탐색으로 올바른 배경을 생성합니다.옵션 2배경은 정확하지만 음영 처리가 잘못되었습니다(어두운 배경 이미지에서 강조된 부분이 더 어둡습니다).옵션 3올바른 음영을 제공하지만 이미지를 덮는 단색 배경색을 설정합니다.

내가 원하는 것은 옵션 1과 2의 배경 이미지이지만 옵션 3의 탐색 항목 음영입니다.

\documentclass[compress]{beamer}
\useoutertheme[footline=authortitle]{miniframes}
\usebackgroundtemplate{\includegraphics[height=\paperheight]{baggrund.jpg}}
\setbeamercolor{structure}{fg=white}
%\setbeamercolor{section in head/foot}{parent=structure}%, bg=black} %opt.1
\setbeamercolor{section in head/foot}{parent=structure,fg=white!70!black} %opt.2
%\setbeamercolor{section in head/foot}{parent=structure, bg=black} %opt.3
\setbeamercolor{normal text}{fg=white!80!blue}
\title{the title}
\author{John Doe}
\begin{document}

\section{S1}

\subsection{SS11}
\begin{frame}{Foo}
    Some text
\end{frame}
\begin{frame}{Bar}
    Some text
\end{frame}

\subsection{SS12}    
\begin{frame}{Baz}
    Some text
\end{frame}
\begin{frame}{Qux}
    Some text
\end{frame}

\section{S2}
\subsection{SS21}    
\begin{frame}{Buqz}
    Some text
\end{frame}

\subsection{SS22}
\begin{frame}{Bao}
    Some text
\end{frame}
\end{document}

답변1

헤더의 배경색을 변경하지 않고 미니 프레임의 색상에 영향을 주려면 비머 색상을 사용할 수 있습니다. mini frames기본적으로 이는 에서 색상을 가져오므 section in head/foot로 이 색상을 변경하면 미니 프레임에도 영향을 줍니다.

\setbeamercolor{mini frame}{fg=white,bg=black}

그러나 이는 문제의 절반만 해결합니다. 미니 프레임 자체에는 올바른 색상을 제공하지만 섹션 이름 색상은 다음에 의해 제어되므로 여전히 잘못되었습니다 section name in head/foot.

원하는 대로 강조/음영 처리된 미니 프레임이 포함된 헤드라인, 섹션 이름은 여전히 ​​회색임

이 문제를 해결하려면 섹션 이름에 헤더 색상 대신 미니 프레임 색상을 사용하도록 내부 비머 명령을 패치할 수 있습니다.

\usepackage{etoolbox}
\patchcmd{\sectionentry}{\usebeamercolor[fg]{section in head/foot}}{\usebeamercolor[fg]{mini frame}}{}{}

이를 통해 원하는 결과를 얻을 수 있습니다.

미니 프레임과 섹션 이름이 원하는 대로 강조/음영 처리된 헤드라인

\documentclass[compress]{beamer}
\useoutertheme[footline=authortitle]{miniframes}
\usebackgroundtemplate{\includegraphics[height=\paperheight]{baggrund.jpg}}
\setbeamercolor{structure}{fg=white}
\setbeamercolor{normal text}{fg=white!80!blue}

\setbeamercolor{mini frame}{fg=white,bg=black}
\usepackage{etoolbox}
\patchcmd{\sectionentry}{\usebeamercolor[fg]{section in head/foot}}{\usebeamercolor[fg]{mini frame}}{}{}

\title{the title}
\author{John Doe}
\begin{document}

\section{S1}

\subsection{SS11}
\begin{frame}{Foo}
    Some text
\end{frame}
\begin{frame}{Bar}
    Some text
\end{frame}

\subsection{SS12}    
\begin{frame}{Baz}
    Some text
\end{frame}
\begin{frame}{Qux}
    Some text
\end{frame}

\section{S2}
\subsection{SS21}    
\begin{frame}{Buqz}
    Some text
\end{frame}

\subsection{SS22}
\begin{frame}{Bao}
    Some text
\end{frame}
\end{document}

관련 정보