View difference between Paste ID: k0MdqC0p and wDM2jiTS
SHOW: | | - or go back to the newest paste.
1
\documentclass{scrartcl}
2
\usepackage{beamerarticle}
3
%\documentclass{beamer}
4
5
\usepackage[utf8]{inputenc}
6
7
\setbeamertemplate{footline}[frame number]
8
9
\mode<article>{
10
    \renewcommand{\frametitle}[1]{\subsubsection*{#1 [Slide \insertframenumber]}}
11
    \def\insertsection{}
12
}
13
14
\mode<article>
15
\usepackage{xparse}
16
\makeatletter
17
\expandafter\let\expandafter\originalsection\expandafter=\csname @orig\string\section\endcsname
18-
\RenewDocumentCommand{\section}{ d<> s o m }
18+
\RenewDocumentCommand{\section}{ D<>{} s o m }
19
{
20
  \alt<#1>
21
  {
22
    \IfBooleanTF {#2}
23
    {
24
      \originalsection*{#4}
25
      %\beamer@atbeginsections % breaks because section* is also used e.g. in the TOC
26
    }
27
    {
28
      \IfNoValueTF {#3} { \originalsection{#4} } { \originalsection[#3]{#4} }
29
      \beamer@atbeginsection
30
    }
31
  }
32
  {
33
    \beamer@secgobble
34
  }
35
}
36
\makeatother
37
\mode<all>
38
39
\AtBeginSection[]
40
{
41
    \begin{frame}<article:0>
42
        \begin{center}
43
            \structure{\Huge \insertsection}
44
        \end{center}
45
    \end{frame}
46
}
47
48
\begin{document}
49
50
    \begin{frame}
51
        \tableofcontents
52
    \end{frame}
53
54
    \section{Section 1}
55
56
        \begin{frame}
57
            \frametitle{Frame A}
58
59
            Frame A
60
        \end{frame}
61
62
    \section{Section 2}
63
    %\section*{Section Star}
64
65
        \begin{frame}
66
            \frametitle{Frame B}
67
68
            Frame B
69
        \end{frame}
70
71
\end{document}