From ae7de6a5194241c4f284dcb79422e325b2f3e8ca Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 4 Feb 2020 22:16:50 +0000
Subject: jslectureplanner (4feb20)

git-svn-id: svn://tug.org/texlive/trunk@53672 c570f23f-e606-0410-a88d-b1316a301751
---
 .../latex/jslectureplanner/jslectureplanner.sty    | 43 +++++++++++++++-------
 1 file changed, 30 insertions(+), 13 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty')

diff --git a/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty b/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty
index dcbe0ce6049..3f589c15dc4 100644
--- a/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty
+++ b/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty
@@ -23,8 +23,8 @@
 %%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\def\filedate{2019/02/06}
-\def\fileversion{1.8}
+\def\filedate{2020/02/04}
+\def\fileversion{1.9}
 \def\filename{jslectureplanner.sty}
 
 \NeedsTeXFormat{LaTeX2e}
@@ -1039,13 +1039,15 @@
 }
 
 % Automatic Offset after n sessions
-\newcommand*\SetAutoOffset[2]{%
-    \setcounter{autooffsettrigger}{#1}
-    \setcounter{autooffset}{#2}
+\newcommand*{\SetAutoOffset}[3][1]{%
+    \setcounter{autooffsetcounter}{#1}
+    \setcounter{autooffsettrigger}{#2}
+    \setcounter{autooffset}{#3}
 }
 
 % 3) Definition of thematic blocks
 %
+\newtoggle{inblock}
 \newcommand*\StartBlock[1]{%
   \stepcounter{blocks}%
   \protected@eappto\programlist{\noexpand\item[{\noexpand\bfseries\Roman{blocks}}.]%
@@ -1057,6 +1059,7 @@
   \protected@xappto\programblocklistbeamer{\noexpand\item[{\Roman{blocks}}.] #1}%
   \csxdef{@currentblock}{#1}%
   \csxdef{@currentblockno}{\Roman{blocks}}%
+  \global\toggletrue{inblock}%
 }
 
 \newcommand*\EndBlock{%
@@ -1064,6 +1067,7 @@
   \gappto\programlistbeamer{\end{description}}
   \csxdef{@currentblock}{}%
   \csxdef{@currentblockno}{}%
+  \global\togglefalse{inblock}%
 }
 
 \newcommand*\NewBlock[1]{%
@@ -1071,23 +1075,36 @@
   \StartBlock{#1}
 }
 
+\newcommand*\@PauseBlock{%
+  \gappto\programlist{\end{labeling}}
+  \gappto\programlistbeamer{\end{description}}
+}
+
+\newcommand*\@ResumeBlock{%
+  % the \item here is necessary since this is nested immediately into another list
+  \gappto\programlist{\item \begin{labeling}{\lecprogramlistindent}}%
+  \gappto\programlistbeamer{\item \begin{description}[\lecprogramlistindent]}
+}
+
 \newenvironment{SessionBlock}[1]{\StartBlock{#1}}{\EndBlock}
 
 % 4) Beamer-specific features
 %
 % Beamer frame breaks
 \newcommand*\SetBeamerFrameBreak{%
+  \iftoggle{inblock}{\@PauseBlock}{}%
   \stepcounter{fbreaks}
-  \@ifundefined{programlistbeamerii}{%
+  \ifdefined\programlistbeamerii
+     \ifdefined\programlistbeameriii
+        \global\let\programlistbeameriv\programlistbeamer
+     \else
+       \global\let\programlistbeameriii\programlistbeamer
+     \fi
+  \else%
     \global\let\programlistbeamerii\programlistbeamer
-  }{%
-    \@ifundefined{programlistbeameriii}{%
-      \global\let\programlistbeameriii\programlistbeamer
-    }{%
-      \global\let\programlistbeameriv\programlistbeamer
-    }
-  }
+  \fi
   \global\let\programlistbeamer\empty
+  \iftoggle{inblock}{\@ResumeBlock}{}%
 }
 
 % Beamer program hook
-- 
cgit v1.2.3

