如何在单独的 A4 pdf 中获取投影仪演示文稿的目录?

如何在单独的 A4 pdf 中获取投影仪演示文稿的目录?

我正在为一场讲座准备长焦投影仪演示文稿。

我想在单独的 A4 格式 pdf 文件中创建整个演示文稿的目录,列出各节、章节以及每帧的标题。

将所有带有注释的幻灯片的打印件添加到此单独的 PDF 中也很有用,每页大约有 3 张幻灯片。

你知道该如何做吗?

PS 我使用的主题是“Sapienza Presentation”(https://www.overleaf.com/latex/templates/sapienza-presentation/yyksmrskffhk

编辑:以下代码可用于测试。章节环境声明和主题模板使用的所有图像可在 overleaf 模板链接中找到。作为输出,我期望目录类似于以下内容:

Sapienza Beamer 演示主题

  • 第一部分
    • 第一章
      • 幻灯片 1
      • 幻灯片 2
      • 幻灯片 3
    • B章
      • 幻灯片 4
      • 幻灯片 5
  • 第二部分
    • 第三章
      • 幻灯片 6
      • 幻灯片 7

然后打印所有幻灯片并附上相应的注释。

\documentclass{beamer}
\usepackage{amsfonts,amsmath,oldgerm}
\usetheme{sintef}

\newcommand{\testcolor}[1]{\colorbox{#1}{\textcolor{#1}{test}}~\texttt{#1}}

\usefonttheme[onlymath]{serif}

\titlebackground*{assets/background}

\newcommand{\hrefcol}[2]{\textcolor{cyan}{\href{#1}{#2}}}

\title{Sapienza Beamer Presentation Theme}
\subtitle{Using \LaTeX\ to prepare slides}
\course{Master's Degree in Computer Science}
\author{\href{mailto:[email protected]}{Andrea Gasparini}}
\IDnumber{1234567}
\date{Academic Year 2021/2022}

\setbeameroption{show notes on second screen}
\setbeamertemplate{note page}[default] % See Beamer User Guide pag.197

\begin{document}
\maketitle

\section{First Section}
    \begin{chapter}[assets/background_negative]{}{Chapter A}
    \end{chapter}
        \begin{frame}{Slide 1}
            \note[item]{Note to Slide 1}
        \end{frame}
        \begin{frame}{Slide 2}
            \note[item]{Note to Slide 2}
        \end{frame}
        \begin{frame}{Slide 3}  
            \note[item]{Note to Slide 3}
        \end{frame}

    \begin{chapter}[assets/background_negative]{}{Chapter B}
    \end{chapter}
        \begin{frame}{Slide 4}
        \end{frame}
        \begin{frame}{Slide 5}  
        \end{frame}

\section{Second Section}
    \begin{chapter}[assets/background_negative]{}{Chapter C}
    \end{chapter}
        \begin{frame}{Slide 6}   
        \end{frame}
        \begin{frame}{Slide 7}
        \end{frame}
\end{document}

答案1

将框架标题添加到目录中

这已经解决了https://tex.stackexchange.com/a/17233/36296

您可能只想进行一些调整以隐藏Chapter A主题生成的框架。以下是一些肮脏的黑客行为:

\documentclass{beamer}
\usepackage{amsfonts,amsmath,oldgerm}
\usetheme{sintef}

\setbeameroption{show notes on second screen}

\newcommand{\testcolor}[1]{\colorbox{#1}{\textcolor{#1}{test}}~\texttt{#1}}

\usefonttheme[onlymath]{serif}

\titlebackground*{assets/background}

\newcommand{\hrefcol}[2]{\textcolor{cyan}{\href{#1}{#2}}}

\title{Sapienza Beamer Presentation Theme}
\subtitle{Using \LaTeX\ to prepare slides}
\course{Master's Degree in Computer Science}
\author{\href{mailto:[email protected]}{Andrea Gasparini}}
\IDnumber{1234567}
\date{Academic Year 2021/2022}

\usepackage{bookmark}
\usepackage{etoolbox}

\newtoggle{hidetitles}
\togglefalse{hidetitles}

\makeatletter
% save the current definition of \beamer@@frametitle
\let\nobookmarkbeamer@@frametitle\beamer@@frametitle
% then patch it to do the bookmarks and/or TOC entries
\apptocmd{\beamer@@frametitle}{%
  % keep this to add the frame title to the TOC at the "subsection level"
  \iftoggle{hidetitles}{}{
  \addtocontents{toc}{\protect\beamer@subsectionintoc{\the\c@section}{0}{~~~~#1}{\the\c@page}{\the\c@part}%
        {\the\beamer@tocsectionnumber}}%
  }
  % keep this line to add a bookmark that shows up in the PDF TOC at the subsection level
  \bookmark[page=\the\c@page,level=3]{#1}%
  }%
  {\message{** patching of \string\beamer@@frametitle succeeded **}}%
  {\errmessage{** patching of \string\beamer@@frametitle failed **}}%

\pretocmd{\beamer@checknoslide}{%
  % ensure the bookmark is not created if the slide is filtered out
  \let\beamer@@frametitle\nobookmarkbeamer@@frametitle
  }%
  {\message{** patching of \string\beamer@checknoslide succeeded **}}%
  {\errmessage{** patching of \string\beamer@checknoslide failed **}}%


\renewenvironment{chapter}[3][]{% Args: image (optional), color, frame title
  \begingroup
  \addtocontents{toc}{\protect\beamer@subsectionintoc{\the\c@section}{0}{#3}{\the\c@page}{\the\c@part}%
          {\the\beamer@tocsectionnumber}}%
  \themecolor{main}
  \setbeamertemplate{footline}{}
  \ifstrempty{#2}{
    \setbeamercolor{frametitle}{fg=white}
    \setbeamercolor{normal text}{fg=white,bg=maincolor}
  }{
    \setbeamercolor{frametitle}{fg=white}
    \setbeamercolor{normal text}{fg=white,bg=#2}
  }
  \ifstrempty{#1}{}{\setbeamertemplate{background}{\TikzSplitSlide{#1}}}
  \setbeamertemplate{frametitle}{%
    \vspace*{8ex}
    \begin{beamercolorbox}[wd=0.45\textwidth]{frametitle}
      \usebeamerfont{frametitle}\insertframetitle\\
      \usebeamerfont{framesubtitle}\insertframesubtitle
    \end{beamercolorbox}
  }
  \toggletrue{hidetitles}
  \begin{frame}{#3}
  \hspace*{0.05\textwidth}%
  \minipage{0.35\textwidth}%
  \usebeamercolor[fg]{normal text}%
}{%
  \endminipage
  \end{frame}
  \endgroup
}

% Define sectioning and table of contents
\AtBeginSection[]
{
    \begingroup
    \toggletrue{hidetitles}
    \themecolor{main}
    \begin{frame}{Table of Contents}
        \tableofcontents[currentsection]
    \end{frame}
    \endgroup
}

\makeatother


\begin{document}
\maketitle

\begin{frame}
\tableofcontents
\end{frame}

\section{First Section}
    \begin{chapter}[assets/background_negative]{}{Chapter A}
    \end{chapter}
        \begin{frame}{Slide 1}
        \end{frame}
        \begin{frame}{Slide 2} 
        \end{frame}
        \begin{frame}{Slide 3}  
        \end{frame}

    \begin{chapter}[assets/background_negative]{}{Chapter B}
    \end{chapter}
        \begin{frame}{Slide 4}
        \end{frame}
        \begin{frame}{Slide 5}  
        \end{frame}

\section{Second Section}
    \begin{chapter}[assets/background_negative]{}{Chapter C}
    \end{chapter}
        \begin{frame}{Slide 6}   
        \end{frame}
        \begin{frame}{Slide 7}
        \end{frame}
\end{document}

生成带有文档和幻灯片概览的 A4 文档

使用一个新的 .tex 文档并在下面的代码中替换document演示文稿的名称和14幻灯片数量。

\documentclass[t]{beamer}

\geometry{a4paper}

\usepackage{pgffor}
\usepackage{pdfpages}

\makeatletter
\newcommand{\mytoc}{%
  \def\beamer@toc@cs{show}%
  \def\beamer@toc@os{show}%
  \def\beamer@toc@css{show}%
  \def\beamer@toc@oss{show}%
  \def\beamer@toc@ooss{show}%
  \def\beamer@toc@csss{show}%
  \def\beamer@toc@osss{show}%
  \def\beamer@toc@oosss{show}%
  \def\beamer@toc@ooosss{show}%
  \beamer@showpartnumber=\c@part%
  \beamer@pausesectionsfalse%
  \beamer@pausesubsectionsfalse%
  \def\beamer@tocsections{<*>}%
  \setkeys{beamertoc}{firstsection=1}%
  {\makeatletter%
    \pause[0]%
    \@input{document.toc}%
    }%
  \vfill
}
\makeatother

\begin{document}

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

\includepdf[page=1-,nup=1x3]{document}

\end{document}

在此处输入图片描述 在此处输入图片描述

相关内容