我使用以下命令在右侧设置导航栏:
\useoutertheme[right,width = 3cm]{sidebar}
现在看起来像这样:
第一个问题:
我如何改变标题“标题”的颜色?
在手册中我只找到了setbeamercolor{section in sidebar}{...}
但找不到标题的名称。title in sidebar
没有用。
第二个问题:
是否可以将各部分 (testsection,hallo) 的对齐方式改为居中,并省略子部分,或者在侧边栏左侧画一条垂直线?
编辑:最小工作示例:
%%% For normal presentations
%\documentclass{beamer}
%%%
%%% For handouts with lots of extra notes
\documentclass[handout]{beamer}
\usepackage{pgfpages}
\title{The Title}
\author{The Author}
%\usetheme{Copenhagen}
\useoutertheme[right,width = 3cm]{sidebar}
\begin{document}
\section{testsection}
\begin{frame}
Here's some content, with no notes added.
\end{frame}
\section{hallo}
\begin{frame}
Here's some content, with notes added.
\end{frame}
\section{asdf}
\end{document}
答案1
要更改标题的颜色:
\setbeamercolor{title in sidebar}{fg=red}
该选项
hideallsubsections
将隐藏子部分要使侧边栏内容居中,您可以添加
center
侧边栏格式
\documentclass{beamer}
\title{The Title}
\author{The Author}
\useoutertheme[right,width = 3cm,hideallsubsections]{sidebar}
\setbeamercolor{title in sidebar}{fg=red}
\makeatletter
\def\beamer@sidebarformat#1#2#3{%
\begin{beamercolorbox}[wd=\beamer@sidebarwidth,leftskip=#1,rightskip=1ex plus1fil,vmode,center]{#2}
\vbox{}%
#3\par%
\vbox{}%
\vskip-1.5ex%
\end{beamercolorbox}
}
\makeatother
\begin{document}
\section{testsection}
\subsection{subsection name}
\begin{frame}
Here's some content, with no notes added.
\end{frame}
\section{hallo}
\begin{frame}
Here's some content, with notes added.
\end{frame}
\end{document}