如何用 beamer 定制摘要?

如何用 beamer 定制摘要?

我的问题:如何自定义摘要/目录以便将章节放在右侧而将小节放在左侧?

预期结果接近下图

左侧为 section,右侧为 framtitle

此外,我想使用动画项目化来获得阴影部分。

目前,为了做到这一点,我这样做:

\def\singleletter#1{\rotatebox[origin=B]{90}{#1}}
\makeatletter
\def\parseletters#1{\@tfor \@tempa := #1 \do {\kern2pt\singleletter{\@tempa}}}
\makeatother
\def\verticaltext#1{\rotatebox[origin=c]{-90}{\parseletters{#1}}}

\definecolor{LightGray}{gray}{0.95}

\begin{frame}{Summary}
\setlength\arrayrulewidth{2pt}
\begin{table}[]
    \begin{tabularx}{\textwidth}{l|l}
        \multirow{4}{*}{\colorbox{LightGray}{\verticaltext{section 1}}}  & subsection 1 \\
                                                                         & subsection 2 \\
                                                                         & subsection 3 \\
                                                                         & subsection 4
    \end{tabularx}
\end{table}
\end{frame}

有 MWE 可用这里

答案1

基于手动创建基本投影仪目录以下可以作为一些起点:

\documentclass[table]{beamer}

\usepackage{tabularx}
%\usepackage{graphicx}
%\usepackage{xcolor}
\usepackage{tikz}
\usepackage{multirow}

\definecolor{LightGray}{gray}{0.95}

\setbeamercolor{subsection in toc}{fg=black}

% total number of sections %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{totcount}
\newcounter{totalsection}
\regtotcounter{totalsection}
\AtBeginDocument{%
  \pretocmd{\section}{\refstepcounter{totalsection}}{}{}%
}%

% number of subsections per section %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{xcntperchap}
\RegisterCounters{section}{subsection}
\newcounter{totalsubsection}
\setcounter{totalsubsection}{0}

% creating automatic label %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% based on https://tex.stackexchange.com/a/386557/36296
\AtBeginSection[]{\label{sec:\thesection}}
\AtBeginSubsection[]{\label{subsec:\thesection:\thesubsection}}
\newcounter{currentsub}
\newcounter{totsection}

% custom toc
\newcommand{\mytoc}{%
    \begingroup%
        \usebeamerfont{section in toc}%
      \usebeamercolor[fg]{section in toc}%
    \setcounter{totsection}{\number\totvalue{totalsection}}%
    \foreach \i in {1,...,\thetotsection}{%
        \begin{minipage}{1cm}%
                \rotatebox{90}{\underline{\colorbox{LightGray}{\hyperlink{sec:\thesection}{\nameref{sec:\i}}}}}
        \end{minipage}%
            \setcounter{currentsub}{\ObtainTrackedValueExp[\i]{section}{subsection}}%
      \setcounter{currentsub}{\ObtainTrackedValueExp[\i]{section}{subsection}}% 
        \begin{minipage}{7cm}%
        \usebeamerfont{subsection in toc}%
        \usebeamercolor[fg]{subsection in toc}%
        \ifnum\thecurrentsub>0%
            \foreach \j in {1,...,\thecurrentsub}{%
                \hyperlink{subsec:\i:\j}{\nameref{subsec:\i:\j}}%
                \par%
            }%
        \fi%
        \end{minipage}           
      \vfill
    }% loop over i
    \endgroup
}

\title{Some Title}

\begin{document}

\begin{frame}
    \mytoc
\end{frame}

\section{Section 1}
\subsection{Subsection 1a}
\frame{}
\subsection{Subsection 1b}
\frame{}
\subsection{Subsection 1c}
\frame{}

\section{Section 2}
\subsection{Subsection 2a}
\frame{}
\subsection{Subsection 2b}
\frame{}
\subsection{Subsection 2c}
\frame{}

\end{document}

在此处输入图片描述

相关内容