Guest User

http://tex.stackexchange.com/a/51181/3323

a guest
Apr 9th, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 1.29 KB | None | 0 0
  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. \NewDocumentCommand{\sectionwithhook}{ s o m }
  19. {
  20.  \IfBooleanTF {#1}
  21.  {
  22.    \originalsection*{#3}
  23.  }
  24.  {
  25.    \IfNoValueTF {#2} { \originalsection{#3} } { \originalsection[#2]{#3} }
  26.    \beamer@atbeginsection
  27.  }
  28. }
  29. \renewcommand<>{\section}{\alt#1{\sectionwithhook}{\beamer@secgobble}}
  30. \makeatother
  31. \mode<all>
  32.  
  33. \AtBeginSection[]
  34. {
  35.    \begin{frame}<article:0>
  36.        \begin{center}
  37.            \structure{\Huge \insertsection}
  38.        \end{center}
  39.    \end{frame}
  40. }
  41.  
  42. \begin{document}
  43.  
  44.    \begin{frame}
  45.        \tableofcontents
  46.    \end{frame}
  47.  
  48.    \section{Section 1}
  49.  
  50.        \begin{frame}
  51.            \frametitle{Frame A}
  52.  
  53.            Frame A
  54.        \end{frame}
  55.  
  56.    \section{Section 2}
  57.     %\section*{Section Star}
  58.  
  59.         \begin{frame}
  60.            \frametitle{Frame B}
  61.  
  62.            Frame B
  63.        \end{frame}
  64.  
  65. \end{document}
Add Comment
Please, Sign In to add comment