Как настроить выделенный раздел боковой панели

Как настроить выделенный раздел боковой панели

Я готовлю презентацию на следующую тему:

\useoutertheme[height=0pt,width=3cm,left]{sidebar}
\usecolortheme{dove,sidebartab}

Я хотел бы изменить цвет шрифта выделенного раздела/подраздела, а также сделать его жирным:

\documentclass{beamer}

\useoutertheme[height=0pt,width=3cm,left]{sidebar}
\usecolortheme{dove,sidebartab}

\setbeamercolor{section in sidebar}{fg=white, bg=black}
\setbeamerfont{section in sidebar}{series=\bfseries}

\begin{document}

\section{Section 1}

\section{Subsection 1.1}

\begin{frame}
    abc
\end{frame} 

\section{Subsection 1.2}

\section{Section 2}

\section{Subsection 2.1}

\section{Subsection 2.2}

\begin{frame}
    abc
\end{frame} 

\end{document}

К сожалению, жирным шрифтом \setbeamerfont{section in sidebar}{series=\bfseries}выделяет все разделы/подразделы, а не только выделенные.

введите описание изображения здесь

решение1

Вы хотите изменить\setbeamercolor{section in sidebar}{fg=blue, bg=red}

\documentclass{beamer}

\useoutertheme[height=0pt,width=3cm,left]{sidebar}
\usecolortheme{dove,sidebartab}

\setbeamercolor{section in sidebar}{fg=blue, bg=red}



\begin{document}

\section{test}

\begin{frame}
    abc
\end{frame} 

\section{testtest}

\begin{frame}
    abc
\end{frame} 

\end{document}

введите описание изображения здесь


Чтобы изменить шрифт обратно на обычный, можно сделать следующее:

\documentclass{beamer}

\useoutertheme[height=0pt,width=3cm,left]{sidebar}
\usecolortheme{dove,sidebartab}

%Colours
\setbeamercolor{section in sidebar}{fg=blue, bg=red}

% Fonts
\setbeamerfont{section in sidebar}{series=\bfseries}
\setbeamerfont{section in sidebar shaded}{series=\normalfont}

\makeatletter
\setbeamertemplate{section in sidebar shaded}
{%
  \vbox{%
    \vskip1ex%
    \beamer@sidebarformat{3pt}{section in sidebar shaded}{\usebeamerfont{section in sidebar shaded}\insertsectionhead}%
  }%
}
\makeatother

\begin{document}

\section{Section 1}

\begin{frame}
    abc
\end{frame} 


\section{Subsection 1.1}

\begin{frame}
    abc
\end{frame} 

\section{Subsection 1.2}

\section{Section 2}

\section{Subsection 2.1}

\section{Subsection 2.2}

\begin{frame}
    abc
\end{frame} 

\end{document}

введите описание изображения здесь

Связанный контент