我从以下代码中借用了这个答案(由@Gonzalo 提供)回答了我之前的问题,现在我想将突出显示的子小节显示为节和小节。任何帮助都将不胜感激。提前感谢您的帮助。
\documentclass[unknownkeysallowed, compress]{beamer}
%\documentclass[compress]{beamer}
\usetheme{Warsaw}
\usepackage{multicol}
\colorlet{mycolor}{orange!80!black}% change this color to suit your needs
\title[Intro]{Introduction}
\author{The Author}
\AtBeginSection[]{
\setbeamercolor{section in toc shaded}{use=structure,fg=structure.fg}
\setbeamercolor{section in toc}{fg=mycolor}
\setbeamercolor{subsection in toc shaded}{fg=black}
\setbeamercolor{subsection in toc}{fg=mycolor}
\setbeamercolor{subsubsection in toc shaded}{fg=black}
\setbeamercolor{subsubsection in toc}{fg=mycolor}
\frame<beamer>{\begin{multicols}{2}
\frametitle{Outline}
\setcounter{tocdepth}{3}
\tableofcontents[currentsection]
\end{multicols}
}
}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\section[Tool]{Tool}
\begin{frame}
Test2
\end{frame}
\section[Tools]{Automation and Scripting}
\subsection{Overview}
\subsubsection{Rscript}
\begin{frame}
Test
\end{frame}
\section*{References}
\begin{frame}
Ref
\end{frame}
\end{document}
已编辑
在新章节的开头,我想突出显示当前章节、其子章节和其子子章节。但是其他章节、子章节和子子章节应该变暗。谢谢
答案1
您可以通过设置键来更改目录中子小节的显示方式subsubsectionstyle
;例如:
subsubsectionstyle={show/show/show/show}
第一部分给出了当前小节的样式;第二部分给出了当前小节中其他小节的样式;第三部分规范控制当前节中其他小节中小节的外观;最后一部分给出了其他节中其他小节中小节的样式。
对于更新的问题中所需的规范,您可以使用
\tableofcontents[
sectionstyle=show/shaded,
subsectionstyle=show/show/shaded,
subsubsectionstyle=show/show/show/shaded
]
完整示例:
\documentclass[unknownkeysallowed, compress]{beamer}
%\documentclass[compress]{beamer}
\usetheme{Warsaw}
\usepackage{multicol}
\colorlet{mycolor}{orange!80!black}% change this color to suit your needs
\title[Intro]{Introduction}
\author{The Author}
\AtBeginSection[]{
\setbeamercolor{section in toc shaded}{use=structure,fg=structure.fg}
\setbeamercolor{section in toc}{fg=mycolor}
\setbeamercolor{subsection in toc shaded}{fg=black}
\setbeamercolor{subsection in toc}{fg=mycolor}
\setbeamercolor{subsubsection in toc shaded}{fg=black}
\setbeamercolor{subsubsection in toc}{fg=mycolor}
\frame<beamer>{\begin{multicols}{2}
\frametitle{Outline}
\setcounter{tocdepth}{3}
\tableofcontents[
sectionstyle=show/shaded,
subsectionstyle=show/show/shaded,
subsubsectionstyle=show/show/show/shaded
]
\end{multicols}
}
}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\section[Tool]{Tool}
\begin{frame}
Test2
\end{frame}
\section[Tools]{Automation and Scripting}
\subsection{Overview}
\subsubsection{Rscript}
\begin{frame}
Test
\end{frame}
\section*{References}
\begin{frame}
Ref
\end{frame}
\end{document}
第一部分开头的部分目录:
第二部分开头的部分目录: