summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-03-07 03:01:25 +0000
committerNorbert Preining <norbert@preining.info>2024-03-07 03:01:25 +0000
commitdc177b2cd4ed993d65860adc66d256969c1bb6ad (patch)
tree1a00cd47175882c0f48969af3b0204c842c1e584 /macros/latex
parente500c9e5fc807971a29d8544e9e2fad59f670fb5 (diff)
CTAN sync 202403070301
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/jslectureplanner/README3
-rw-r--r--macros/latex/contrib/jslectureplanner/cologne.lps2
-rw-r--r--macros/latex/contrib/jslectureplanner/english.lps2
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/English/lecturebib-english.pdfbin85100 -> 88425 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/English/lecturehandout-english.pdfbin57920 -> 60454 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/English/lecturepresentation-english.pdfbin84600 -> 88567 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/English/lectureprogram-english.pdfbin56906 -> 59439 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/English/lecturescript-english.pdfbin34578 -> 36156 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/English/membertable-blank-english.pdfbin28442 -> 30020 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/English/membertable-filled-english.pdfbin28449 -> 30032 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/English/presencetable-blank-english.pdfbin27971 -> 29552 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/English/presencetable-filled-english.pdfbin26749 -> 28328 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/English/presentation-list-english.pdfbin25685 -> 27267 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/German/lecturebib.pdfbin85483 -> 88808 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/German/lecturehandout.pdfbin59144 -> 61681 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/German/lecturepresentation.pdfbin84982 -> 88958 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/German/lectureprogram.pdfbin57898 -> 60430 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/German/lecturescript.pdfbin34769 -> 36385 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/German/membertable-blank.pdfbin28386 -> 29974 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/German/membertable-filled.pdfbin28506 -> 30087 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/German/presencetable-blank.pdfbin27891 -> 29465 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/German/presencetable-filled.pdfbin26778 -> 28357 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/examples/German/presentation-list.pdfbin26863 -> 28442 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/german-default.lps2
-rw-r--r--macros/latex/contrib/jslectureplanner/jslectureplanner.pdfbin480426 -> 491334 bytes
-rw-r--r--macros/latex/contrib/jslectureplanner/jslectureplanner.sty618
-rw-r--r--macros/latex/contrib/jslectureplanner/jslectureplanner.tex9
-rw-r--r--macros/latex/contrib/jslectureplanner/jsmembertable.sty47
-rw-r--r--macros/latex/contrib/useclass/README.md35
-rw-r--r--macros/latex/contrib/useclass/useclass.dtx279
-rw-r--r--macros/latex/contrib/useclass/useclass.ins16
-rw-r--r--macros/latex/contrib/useclass/useclass.pdfbin490171 -> 539822 bytes
32 files changed, 694 insertions, 319 deletions
diff --git a/macros/latex/contrib/jslectureplanner/README b/macros/latex/contrib/jslectureplanner/README
index e5dae559d2..a24d5fe3db 100644
--- a/macros/latex/contrib/jslectureplanner/README
+++ b/macros/latex/contrib/jslectureplanner/README
@@ -68,6 +68,9 @@ instructions; also have a look at the example files.
== CHANGES ==
+* V. 1.13 (2024-03-06): - use legacy keyvals rather than xkeyval.
+ - fix row spacing in prestables.
+
* V. 1.12 (2020-12-08): - Correctly parse staryear/endyear.
* V. 1.11 (2020-05-11): - Allow for customization of program and presentation lists.
diff --git a/macros/latex/contrib/jslectureplanner/cologne.lps b/macros/latex/contrib/jslectureplanner/cologne.lps
index da7d17534d..85ed5b31e0 100644
--- a/macros/latex/contrib/jslectureplanner/cologne.lps
+++ b/macros/latex/contrib/jslectureplanner/cologne.lps
@@ -23,6 +23,8 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Version: 1.13 -- 2024/03/06
+
% Additional lecture types
\DefLecType{evl}{EVL}{Einf\"uhrungsvorlesung}{Vorlesung}% introductory lecture
\DefLecType{es}{ES}{Einf\"uhrungsseminar}{Sitzung}% undergraduate seminar
diff --git a/macros/latex/contrib/jslectureplanner/english.lps b/macros/latex/contrib/jslectureplanner/english.lps
index 0a203dc187..dec42983db 100644
--- a/macros/latex/contrib/jslectureplanner/english.lps
+++ b/macros/latex/contrib/jslectureplanner/english.lps
@@ -27,6 +27,8 @@
% English localization of the default strings used by the jslectureplanner package
%
+% Version: 1.13 -- 2024/03/06
+
% Lecture types
\DefLecType{vl}{LEC}{Lecture}{Lecture}% lecture
\DefLecType{ps}{USE}{Undergraduate Seminar}{Session}% undergraduate seminar
diff --git a/macros/latex/contrib/jslectureplanner/examples/English/lecturebib-english.pdf b/macros/latex/contrib/jslectureplanner/examples/English/lecturebib-english.pdf
index 7fe67e794f..542db275c6 100644
--- a/macros/latex/contrib/jslectureplanner/examples/English/lecturebib-english.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/English/lecturebib-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/English/lecturehandout-english.pdf b/macros/latex/contrib/jslectureplanner/examples/English/lecturehandout-english.pdf
index 24941bb9b1..ed1396e8f9 100644
--- a/macros/latex/contrib/jslectureplanner/examples/English/lecturehandout-english.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/English/lecturehandout-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/English/lecturepresentation-english.pdf b/macros/latex/contrib/jslectureplanner/examples/English/lecturepresentation-english.pdf
index 4f8220e8e5..3d8ad8e82c 100644
--- a/macros/latex/contrib/jslectureplanner/examples/English/lecturepresentation-english.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/English/lecturepresentation-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/English/lectureprogram-english.pdf b/macros/latex/contrib/jslectureplanner/examples/English/lectureprogram-english.pdf
index 0b8f229180..cfde124a7c 100644
--- a/macros/latex/contrib/jslectureplanner/examples/English/lectureprogram-english.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/English/lectureprogram-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/English/lecturescript-english.pdf b/macros/latex/contrib/jslectureplanner/examples/English/lecturescript-english.pdf
index b756c85705..0db3688a31 100644
--- a/macros/latex/contrib/jslectureplanner/examples/English/lecturescript-english.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/English/lecturescript-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/English/membertable-blank-english.pdf b/macros/latex/contrib/jslectureplanner/examples/English/membertable-blank-english.pdf
index 30b972c602..316be924fd 100644
--- a/macros/latex/contrib/jslectureplanner/examples/English/membertable-blank-english.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/English/membertable-blank-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/English/membertable-filled-english.pdf b/macros/latex/contrib/jslectureplanner/examples/English/membertable-filled-english.pdf
index c844df95f2..ba58765a8c 100644
--- a/macros/latex/contrib/jslectureplanner/examples/English/membertable-filled-english.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/English/membertable-filled-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/English/presencetable-blank-english.pdf b/macros/latex/contrib/jslectureplanner/examples/English/presencetable-blank-english.pdf
index fbfee149f8..ec218f51d1 100644
--- a/macros/latex/contrib/jslectureplanner/examples/English/presencetable-blank-english.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/English/presencetable-blank-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/English/presencetable-filled-english.pdf b/macros/latex/contrib/jslectureplanner/examples/English/presencetable-filled-english.pdf
index 4e81e8d909..1eba2fe001 100644
--- a/macros/latex/contrib/jslectureplanner/examples/English/presencetable-filled-english.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/English/presencetable-filled-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/English/presentation-list-english.pdf b/macros/latex/contrib/jslectureplanner/examples/English/presentation-list-english.pdf
index 883a071f06..272778c922 100644
--- a/macros/latex/contrib/jslectureplanner/examples/English/presentation-list-english.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/English/presentation-list-english.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/German/lecturebib.pdf b/macros/latex/contrib/jslectureplanner/examples/German/lecturebib.pdf
index dc7be35d41..8f277aa353 100644
--- a/macros/latex/contrib/jslectureplanner/examples/German/lecturebib.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/German/lecturebib.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/German/lecturehandout.pdf b/macros/latex/contrib/jslectureplanner/examples/German/lecturehandout.pdf
index 3bd76674b0..70ea93b44d 100644
--- a/macros/latex/contrib/jslectureplanner/examples/German/lecturehandout.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/German/lecturehandout.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/German/lecturepresentation.pdf b/macros/latex/contrib/jslectureplanner/examples/German/lecturepresentation.pdf
index 4e02a240b8..34e7841a84 100644
--- a/macros/latex/contrib/jslectureplanner/examples/German/lecturepresentation.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/German/lecturepresentation.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/German/lectureprogram.pdf b/macros/latex/contrib/jslectureplanner/examples/German/lectureprogram.pdf
index 58cf55305f..75a8534186 100644
--- a/macros/latex/contrib/jslectureplanner/examples/German/lectureprogram.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/German/lectureprogram.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/German/lecturescript.pdf b/macros/latex/contrib/jslectureplanner/examples/German/lecturescript.pdf
index 1f535cb2f1..5848194443 100644
--- a/macros/latex/contrib/jslectureplanner/examples/German/lecturescript.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/German/lecturescript.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/German/membertable-blank.pdf b/macros/latex/contrib/jslectureplanner/examples/German/membertable-blank.pdf
index 67df001b4c..e4f0515450 100644
--- a/macros/latex/contrib/jslectureplanner/examples/German/membertable-blank.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/German/membertable-blank.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/German/membertable-filled.pdf b/macros/latex/contrib/jslectureplanner/examples/German/membertable-filled.pdf
index db9feda975..ad19e5f637 100644
--- a/macros/latex/contrib/jslectureplanner/examples/German/membertable-filled.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/German/membertable-filled.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/German/presencetable-blank.pdf b/macros/latex/contrib/jslectureplanner/examples/German/presencetable-blank.pdf
index b846ca5779..1471d7d34a 100644
--- a/macros/latex/contrib/jslectureplanner/examples/German/presencetable-blank.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/German/presencetable-blank.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/German/presencetable-filled.pdf b/macros/latex/contrib/jslectureplanner/examples/German/presencetable-filled.pdf
index 0cd64cb49a..76cc3e3b94 100644
--- a/macros/latex/contrib/jslectureplanner/examples/German/presencetable-filled.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/German/presencetable-filled.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/examples/German/presentation-list.pdf b/macros/latex/contrib/jslectureplanner/examples/German/presentation-list.pdf
index 62f446fa15..873fa0f91f 100644
--- a/macros/latex/contrib/jslectureplanner/examples/German/presentation-list.pdf
+++ b/macros/latex/contrib/jslectureplanner/examples/German/presentation-list.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/german-default.lps b/macros/latex/contrib/jslectureplanner/german-default.lps
index 1ce08f9303..b09edaf673 100644
--- a/macros/latex/contrib/jslectureplanner/german-default.lps
+++ b/macros/latex/contrib/jslectureplanner/german-default.lps
@@ -27,6 +27,8 @@
% Default strings (German) used by the jslectureplanner package
%
+% Version: 1.13 -- 2024/03/06
+
% Lecture types
\DefLecType{vl}{VL}{Vorlesung}{Vorlesung}% lecture
\DefLecType{ps}{PS}{Proseminar}{Sitzung}% undergraduate seminar
diff --git a/macros/latex/contrib/jslectureplanner/jslectureplanner.pdf b/macros/latex/contrib/jslectureplanner/jslectureplanner.pdf
index 971a3b29bc..64b68382aa 100644
--- a/macros/latex/contrib/jslectureplanner/jslectureplanner.pdf
+++ b/macros/latex/contrib/jslectureplanner/jslectureplanner.pdf
Binary files differ
diff --git a/macros/latex/contrib/jslectureplanner/jslectureplanner.sty b/macros/latex/contrib/jslectureplanner/jslectureplanner.sty
index 31bbfd3530..270f9b48cb 100644
--- a/macros/latex/contrib/jslectureplanner/jslectureplanner.sty
+++ b/macros/latex/contrib/jslectureplanner/jslectureplanner.sty
@@ -23,8 +23,8 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\filedate{2020/12/08}
-\def\fileversion{1.12}
+\def\filedate{2024/03/06}
+\def\fileversion{1.13}
\def\filename{jslectureplanner.sty}
\NeedsTeXFormat{LaTeX2e}
@@ -36,7 +36,6 @@
% REQUIRED PACKAGES
%
\RequirePackage{etoolbox}
-\RequirePackage{xkeyval}
\RequirePackage[calc,useregional]{datetime2}
\RequirePackage{calc}
\RequirePackage{ifthen}
@@ -218,95 +217,112 @@
%
% PACKAGE OPTIONS
%
-\define@key{lec}{lectype}{%
- \js@AtEndPreambleIfInPreamble{%
- \ifcsundef{lectype@#1}{%
- \PackageError{jslectureplanner}{Lecture type '#1' is not defined!}{%
- Please consult the package manual for instructions how to define it}
- }{}
- \def\lectype{\csuse{lectype@#1}}%
- \def\lectypeverb{\csuse{lectypeverb@#1}}%
- \def\lectypesession{\csuse{lectypesession@#1}}%
- }%
-}
-\DeclareOptionX{type}{\setkeys{lec}{lectype=#1}}
-
-\define@key{lec}{lecsem}{%
- \js@AtEndPreambleIfInPreamble{%
- \ifcsundef{lecsemshort@#1}{%
- \PackageError{jslectureplanner}{Semester type '#1' is not defined!}{%
- Please consult the package manual for instructions how to define it}
- }{}
- \def\lecsemshort{\csuse{lecsemshort@#1}}%
- \def\lecsemverb{\csuse{lecsemverb@#1}}%
- \def\@nextsem{\csuse{lecsemnext@#1}}%
- \def\lecnsemshort{\csuse{lecsemshort@\@nextsem}}%
- \def\lecnsemverb{\csuse{lecsemverb@\@nextsem}}%
- \def\lecnsemny{\csuse{lecsemnextny@#1}}%
- }%
-}
-\DeclareOptionX{semester}{\setkeys{lec}{lecsem=#1}}
-\define@key{lec}{title}{\def\lectitle{#1}%
+\DeclareKeys[lec]
+{
+ % type=<type>
+ type.code = {
+ \js@AtEndPreambleIfInPreamble{%
+ \ifcsundef{lectype@#1}{%
+ \PackageError{jslectureplanner}{Lecture type '#1' is not defined!}{%
+ Please consult the package manual for instructions how to define it}
+ }{}
+ \def\lectype{\csuse{lectype@#1}}%
+ \def\lectypeverb{\csuse{lectypeverb@#1}}%
+ \def\lectypesession{\csuse{lectypesession@#1}}%
+ }%
+ },
+ % semester=<type>
+ semester.code = {
+ \js@AtEndPreambleIfInPreamble{%
+ \ifcsundef{lecsemshort@#1}{%
+ \PackageError{jslectureplanner}{Semester type '#1' is not defined!}{%
+ Please consult the package manual for instructions how to define it}
+ }{}
+ \def\lecsemshort{\csuse{lecsemshort@#1}}%
+ \def\lecsemverb{\csuse{lecsemverb@#1}}%
+ \def\@nextsem{\csuse{lecsemnext@#1}}%
+ \def\lecnsemshort{\csuse{lecsemshort@\@nextsem}}%
+ \def\lecnsemverb{\csuse{lecsemverb@\@nextsem}}%
+ \def\lecnsemny{\csuse{lecsemnextny@#1}}%
+ }%
+ },
+ % title=<title>
+ title.code = {
+ \def\lectitle{#1}%
\ifx\lecshorttitle\empty%
\def\lecshorttitle{#1}%
\global\togglefalse{uniquelecshorttitle}%
- \fi}
-\define@key{lec}{titlesep}{\def\lectitlesep{#1}}
-\define@key{lec}{subtitle}{\def\lecsubtitle{#1}}
-\define@key{lec}{shorttitle}{%
- \def\lecshorttitle{#1}%
- \global\toggletrue{uniquelecshorttitle}}
-\define@key{lec}{year}{\def\lecyear{#1}}
-\define@key{lec}{endyear}{\def\lecendyear{#1}}
-\define@key{lec}{uni}{\def\lecuniversity{#1}}
-\define@key{lec}{institute}{\def\lecinstitute{#1}}
-\define@key{lec}{platform}{\def\lecplatform{#1}}
-\define@key{lec}{officehours}{\def\officehours{#1}}
-\define@key{lec}{officenumber}{\def\officenumber{#1}}
-\define@key{lec}{room}{\def\lecroom{#1}}
-\define@key{lec}{startdate}{\def\lecstartdate{#1}}
-\define@key{lec}{starttime}{\def\@lecstarttime{#1}\def\lecstarttime{\DTMtime{#1}}}
-\define@key{lec}{duration}{\def\lecduration{#1}}
-\define@key{lec}{instructor}{\def\lecinstructor{#1}%
- \ifx\lecshortinstructor\empty\def\lecshortinstructor{#1}\fi}
-\define@key{lec}{shortinstructor}{%
+ \fi
+ },
+ % titlesep=<sep>
+ titlesep.store = \lectitlesep,
+ % subtitle=<sep>
+ subtitle.store = \lecsubtitle,
+ % shorttitle=<title>
+ shorttitle.code = {
+ \def\lecshorttitle{#1}
+ \global\toggletrue{uniquelecshorttitle}
+ },
+ % year=<year>
+ year.store = \lecyear,
+ % endyear=<year>
+ endyear.store = \lecendyear,
+ % uni=<university>
+ uni.store = \lecuniversity,
+ % institute=<institute>
+ institute.store = \lecinstitute,
+ % platform=<platform>
+ platform.store = \lecplatform,
+ % officehours=<officehours>
+ officehours.store = \lecofficehours,
+ % officenumber=<officenumber>
+ officenumber.store = \lecofficenumber,
+ % room=<room>
+ room.store = \lecroom,
+ % startdate=<startdate>
+ startdate.store = \lecstartdate,
+ % starttime=<starttime>
+ starttime.code = {
+ \def\@lecstarttime{#1}
+ \def\lecstarttime{\DTMtime{#1}}
+ },
+ % duration=<duration>
+ duration.store = \lecduration,
+ % instructor=<instructor>
+ instructor.code = {
+ \def\lecinstructor{#1}%
+ \ifx\lecshortinstructor\empty
+ \def\lecshortinstructor{#1}
+ \fi
+ },
+ % shortinstructor=<shortinstructor>
+ shortinstructor.code = {
\def\lecshortinstructor{#1}%
- \global\toggletrue{uniquelecshortinstructor}}
-\define@key{lec}{style}{\AtEndOfPackage{\input{#1.lps}}}
-\define@key{lec}{interval}{%
+ \global\toggletrue{uniquelecshortinstructor}
+ },
+ % style=<style>
+ style.code = {
+ \AtEndOfPackage{\input{#1.lps}}
+ },
+ % interval=<interval>
+ interval.code = {
% test if the input is a number
% courtesy of egreg at http://tex.stackexchange.com/a/50131
\if\relax\detokenize\expandafter{\romannumeral-0#1}\relax
\setcounter{lecinterval}{#1}%
\else
\PackageError{jslectureplanner}{%
- Value of 'interval' option must be a number\MessageBreak
- ('#1' was given instead)}{}%
+ Value of 'interval' option must be a number\MessageBreak
+ ('#1' was given instead)}{}%
\fi
+ },
+ % sestitlesep=<sestitlesep>
+ sestitlesep.store = \sestitlesep
}
-\define@key{lec}{sestitlesep}{\def\sestitlesep{#1}}
-
-\DeclareOptionX{title}{\setkeys{lec}{title={#1}}}
-\DeclareOptionX{titlesep}{\setkeys{lec}{titlesep={#1}}}
-\DeclareOptionX{subtitle}{\setkeys{lec}{subtitle={#1}}}
-\DeclareOptionX{shorttitle}{\setkeys{lec}{shorttitle={#1}}}
-\DeclareOptionX{year}{\setkeys{lec}{year=#1}}
-\DeclareOptionX{uni}{\setkeys{lec}{uni={#1}}}
-\DeclareOptionX{institute}{\setkeys{lec}{institute={#1}}}
-\DeclareOptionX{startdate}{\setkeys{lec}{startdate=#1}}
-\DeclareOptionX{starttime}{\setkeys{lec}{starttime=#1}}
-\DeclareOptionX{instructor}{\setkeys{lec}{instructor={#1}}}
-\DeclareOptionX{shortinstructor}{\setkeys{lec}{shortinstructor={#1}}}
-\DeclareOptionX{platform}{\setkeys{lec}{platform={#1}}}
-\DeclareOptionX{officehours}{\setkeys{lec}{officehours={#1}}}
-\DeclareOptionX{officenumber}{\setkeys{lec}{officenumber={#1}}}
-\DeclareOptionX{room}{\setkeys{lec}{room={#1}}}
-\DeclareOptionX{style}{\setkeys{lec}{style=#1}}
-\DeclareOptionX{interval}{\setkeys{lec}{interval=#1}}
-\DeclareOptionX{sestitlesep}{\setkeys{lec}{sestitlesep=#1}}
-
-\ProcessOptionsX
+
+% Process package options
+\ProcessKeyOptions[lec]
%
% End Options
@@ -323,39 +339,39 @@
\NewDocumentCommand \LecYear { m m }
{
% #1: semester/term
- \setkeys{lec}{lecsem=#1}
+ \SetKeys[lec]{semester=#1}
% split #2 at / if available (startyear/endyear)
\seq_set_split:Nnn \seq_jslp_lec_year { / } { #2 }
\seq_pop_left:NNT \seq_jslp_lec_year \tl_jslp_start_year
{
- \setkeys{lec}{year=\tl_jslp_start_year}
+ \SetKeys[lec]{year=\tl_jslp_start_year}
}
\seq_get_right:NNT \seq_jslp_lec_year \tl_jslp_end_year
{
- \setkeys{lec}{endyear=\tl_jslp_end_year}
+ \SetKeys[lec]{endyear=\tl_jslp_end_year}
}
}
\ExplSyntaxOff
-\newcommand*{\LecType}[1]{\setkeys{lec}{lectype=#1}}
-\newcommand*{\LecTitle}[2][]{\setkeys{lec}{shorttitle={#2},#1,title={#2}}}
-\newcommand*{\LecTitleSep}[1]{\setkeys{lec}{titlesep={#1}}}
-\newcommand*{\LecSubTitle}[1]{\setkeys{lec}{subtitle={#1}}}
-\newcommand*{\LecUni}[1]{\setkeys{lec}{uni={#1}}}
-\newcommand*{\LecInstitute}[1]{\setkeys{lec}{institute={#1}}}
-\newcommand*{\LecRoom}[1]{\setkeys{lec}{room={#1}}}
-\newcommand*{\LecStartDate}[1]{\setkeys{lec}{startdate=#1}}
-\newcommand*{\LecStartTime}[1]{\setkeys{lec}{starttime=#1}}
-\newcommand*{\LecDuration}[1]{\setkeys{lec}{duration=#1}}
+\newcommand*{\LecType}[1]{\SetKeys[lec]{type=#1}}
+\newcommand*{\LecTitle}[2][]{\SetKeys[lec]{shorttitle={#2},#1,title={#2}}}
+\newcommand*{\LecTitleSep}[1]{\SetKeys[lec]{titlesep={#1}}}
+\newcommand*{\LecSubTitle}[1]{\SetKeys[lec]{subtitle={#1}}}
+\newcommand*{\LecUni}[1]{\SetKeys[lec]{uni={#1}}}
+\newcommand*{\LecInstitute}[1]{\SetKeys[lec]{institute={#1}}}
+\newcommand*{\LecRoom}[1]{\SetKeys[lec]{room={#1}}}
+\newcommand*{\LecStartDate}[1]{\SetKeys[lec]{startdate=#1}}
+\newcommand*{\LecStartTime}[1]{\SetKeys[lec]{starttime=#1}}
+\newcommand*{\LecDuration}[1]{\SetKeys[lec]{duration=#1}}
\newcommand*{\LecInstructor}[2][\empty]{%
\ifx#1\empty
- \setkeys{lec}{instructor={#2}}%
+ \SetKeys[lec]{instructor={#2}}%
\else
- \setkeys{lec}{instructor={#2},shortinstructor={#1}}%
+ \SetKeys[lec]{instructor={#2},shortinstructor={#1}}%
\fi
}
-\newcommand*{\LecInterval}[1]{\setkeys{lec}{interval=#1}}
-\newcommand*{\SessionTitleSep}[1]{\setkeys{lec}{sestitlesep=#1}}
+\newcommand*{\LecInterval}[1]{\SetKeys[lec]{interval=#1}}
+\newcommand*{\SessionTitleSep}[1]{\SetKeys[lec]{sestitlesep=#1}}
%
@@ -497,16 +513,21 @@
% 2.) Term types
%
-\define@key{semtype}{next}{\csdef{@ltn}{#1}}
-\define@boolkey{semtype}{nextny}[true]{}
+\newif\if@jslp@semtype@nextny\@jslp@semtype@nextnyfalse
+\DeclareKeys[semtype]
+{
+ next.store = \@ltn,
+ nextny.if = @jslp@semtype@nextny
+}
+
\newcommand*\DefSemType[4][\empty]{%
\csdef{@ltn}{}
\csdef{lecsemshort@#2}{#3}
\csdef{lecsemverb@#2}{#4}
\ifx\empty#1\else%
- \setkeys{semtype}{nextny=false}%
- \setkeys{semtype}{#1}%
- \ifKV@semtype@nextny
+ \SetKeys[semtype]{nextny=false}%
+ \SetKeys[semtype]{#1}%
+ \if@jslp@semtype@nextny
\csdef{lecsemnextny@#2}{y}
\else
\csdef{lecsemnextny@#2}{n}
@@ -650,80 +671,115 @@
%
% Beamer program generation
-\define@key{beamerprogram}{title}{\csdef{@bptitle}{#1}}
-\define@key{beamerprogram}{options}{\csdef{@bpopts}{#1}}
-\define@key{beamerprogram}{listoptions}{\csdef{@bplistopts}{#1}}
-\define@key{beamerprogram}{overlayarg}{\csdef{@bpolarg}{#1}}
-\define@key{beamerprogram}{overlayarg2}{\csdef{@bpolargii}{#1}}
-\define@key{beamerprogram}{overlayarg3}{\csdef{@bpolargiii}{#1}}
-\define@key{beamerprogram}{overlayarg4}{\csdef{@bpolargiv}{#1}}
-\define@boolkey{beamerprogram}{alerted}[true]{}
-\define@boolkey{beamerprogram}{blocksonly}[true]{}
-\define@boolkey{beamerprogram}{uncover}[true]{}
+\newif\if@jslp@beamerprogram@alerted\@jslp@beamerprogram@alertedfalse
+\newif\if@jslp@beamerprogram@blocksonly\@jslp@beamerprogram@blocksonlyfalse
+\newif\if@jslp@beamerprogram@uncover\@jslp@beamerprogram@uncoverfalse
+
+\DeclareKeys[beamerprogram]
+{
+ % title=<title>
+ title.store = \@bptitle,
+ % options = <options>
+ options.store = \@bpopts,
+ % listoptions = <options>
+ listoptions.store = \@bplistopts,
+ % overlayarg = <arg>
+ overlayarg.store = \@bpolarg,
+ % overlayarg2 = <arg>
+ overlayarg2.store = \@bpolargii,
+ % overlayarg3 = <arg>
+ overlayarg3.store = \@bpolargiii,
+ % overlayarg4 = <arg>
+ overlayarg4.store = \@bpolargiv,
+ % overlayarg = <true|false> [not functional!]
+ alerted.if = @jslp@beamerprogram@alerted,
+ % blocksonly = <true|false>
+ blocksonly.if = @jslp@beamerprogram@blocksonly,
+ % uncover = <true|false>
+ uncover.if = @jslp@beamerprogram@uncover
+}
% Overlay specifications for uncover programs
\newcommand*\beameruncoverspec{\beamerdefaultoverlayspecification{<+(1)->}}
\newcommand*\beameruncoverffslidesspec{\beamerdefaultoverlayspecification{<+(-1)->}}
\newcommand*\beameruncoverblocksonlyspec{\beamerdefaultoverlayspecification{<+->}}
+\newcommand*\beameralertspec{}
\newcommand*\makebeamerprogram[1][]{%
\csdef{@bptitle}{\lecprogram}
\def\btitleapp{}
\numdef\pframes{\thefbreaks + 1}
- \setkeys{beamerprogram}{alerted=false}
- \setkeys{beamerprogram}{blocksonly=false}
- \setkeys{beamerprogram}{uncover=false}
- \setkeys{beamerprogram}{#1}
+ \SetKeys[beamerprogram]{alerted=false}
+ \SetKeys[beamerprogram]{blocksonly=false}
+ \SetKeys[beamerprogram]{uncover=false}
+ \SetKeys[beamerprogram]{#1}
\def\bpdescbeg{\begin{BeamerProgramList}}
- \ifKV@beamerprogram@alerted
+ \providebool{alerted}
+ \if@jslp@beamerprogram@alerted
+ \booltrue{alerted}
+ \else
+ \boolfalse{alerted}
\fi
\providebool{uncoveredlist}
- \ifKV@beamerprogram@uncover
+ \if@jslp@beamerprogram@uncover
\booltrue{uncoveredlist}
\else
\boolfalse{uncoveredlist}
\fi
- \ifKV@beamerprogram@blocksonly
- \ifcsdef{@bpolarg}{%
- \ifcsdef{@bpopts}{%
- \begingroup\edef\tempa{\endgroup\noexpand%
- \begin{frame}<\csuse{@bpolarg}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ \if@jslp@beamerprogram@blocksonly
+ \ifbool{alerted}{%
+ \ifbool{uncoveredlist}%
+ {\renewcommand*\beameruncoverblocksonlyspec{\beamerdefaultoverlayspecification{<+-| alert@+>}}}%
+ {\renewcommand*\beameralertspec{\beamerdefaultoverlayspecification{<alert@+>}}}%
+ }{}
+ \ifcsvoid{@bpolarg}{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}<\csuse{@bpolarg}>[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
- }%
- }{%
- \ifcsdef{@bpopts}{%
\begingroup\edef\tempa{\endgroup\noexpand%
\begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ }%
+ }{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}<\csuse{@bpolarg}>[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
+ \begingroup\edef\tempa{\endgroup\noexpand%
+ \begin{frame}<\csuse{@bpolarg}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
}%
}%
- \ifbool{uncoveredlist}{\beameruncoverblocksonlyspec}{}
+ \ifbool{uncoveredlist}{\beameruncoverblocksonlyspec}{\beameralertspec}
\begin{BeamerProgramList}
\ifcsempty{programblocklistbeamer}{\BeamerProgramBlockBlocksOnlyItem{}{}}{\programblocklistbeamer}
\end{BeamerProgramList}
\end{frame}
- \else% not \ifKV@beamerprogram@blocksonly
+ \else% not \if@jslp@beamerprogram@blocksonly
+ \ifbool{alerted}{%
+ \ifbool{uncoveredlist}%
+ {%
+ \renewcommand*\beameruncoverspec{\beamerdefaultoverlayspecification{<+(1)-| alert@+(1)>}}
+ \renewcommand*\beameruncoverffslidesspec{\beamerdefaultoverlayspecification{<+(-1)-| alert@+(-1)>}}
+ }%
+ {\renewcommand*\beameralertspec{\beamerdefaultoverlayspecification{<alert@+(1)>}}}%
+ }{}
% All but last slide(s) are generated in what follows
\@ifundefined{programlistbeamerii}{}{%
\def\btitleapp{\ (1/\pframes)}
- \ifcsdef{@bpolarg}{%
- \ifcsdef{@bpopts}{%
- \begingroup\edef\tempa{\endgroup\noexpand%
- \begin{frame}<\csuse{@bpolarg}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ \ifcsvoid{@bpolarg}{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}<\csuse{@bpolarg}>[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
- }%
- }{%
- \ifcsdef{@bpopts}{%
\begingroup\edef\tempa{\endgroup\noexpand%
\begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ }%
+ }{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}<\csuse{@bpolarg}>[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
+ \begingroup\edef\tempa{\endgroup\noexpand%
+ \begin{frame}<\csuse{@bpolarg}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
}%
- }%
- \ifbool{uncoveredlist}{\beameruncoverspec}{}
+ }%
+ \ifbool{uncoveredlist}{\beameruncoverspec}{\beameralertspec}
\begin{BeamerProgramList}
\programlistbeamerii
\end{BeamerProgramList}
@@ -731,22 +787,22 @@
}
\@ifundefined{programlistbeameriii}{}{%
\def\btitleapp{\ (2/\pframes)}
- \ifcsdef{@bpolargii}{%
- \ifcsdef{@bpopts}{%
- \begingroup\edef\tempa{\endgroup\noexpand%
- \begin{frame}<\csuse{@bpolargii}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ \ifcsvoid{@bpolargii}{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}[label=beamerprogram2]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}<\csuse{@bpolargii}>[label=beamerprogram2]{\csuse{@bptitle}\btitleapp}
- }%
- }{%
- \ifcsdef{@bpopts}{%
\begingroup\edef\tempa{\endgroup\noexpand%
\begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ }%
+ }{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}<\csuse{@bpolargii}>[label=beamerprogram2]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}[label=beamerprogram2]{\csuse{@bptitle}\btitleapp}
+ \begingroup\edef\tempa{\endgroup\noexpand%
+ \begin{frame}<\csuse{@bpolargii}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
}%
- }%
- \ifbool{uncoveredlist}{\beameruncoverffslidesspec}{}
+ }%
+ \ifbool{uncoveredlist}{\beameruncoverffslidesspec}{\beameralertspec}
\begin{BeamerProgramList}
\programlistbeameriii
\end{BeamerProgramList}
@@ -754,22 +810,22 @@
}
\@ifundefined{programlistbeameriv}{}{%
\def\btitleapp{\ (3/\pframes)}
- \ifcsdef{@bpolargiii}{%
- \ifcsdef{@bpopts}{%
- \begingroup\edef\tempa{\endgroup\noexpand%
- \begin{frame}<\csuse{@bpolargiii}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ \ifcsvoid{@bpolargiii}{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}[label=beamerprogram3]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}<\csuse{@bpolargiii}>[label=beamerprogram3]{\csuse{@bptitle}\btitleapp}
- }%
- }{%
- \ifcsdef{@bpopts}{%
\begingroup\edef\tempa{\endgroup\noexpand%
\begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ }%
+ }{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}<\csuse{@bpolargiii}>[label=beamerprogram3]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}[label=beamerprogram3]{\csuse{@bptitle}\btitleapp}
+ \begingroup\edef\tempa{\endgroup\noexpand%
+ \begin{frame}<\csuse{@bpolargiii}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
}%
- }%
- \ifbool{uncoveredlist}{\beameruncoverffslidesspec}{}
+ }%
+ \ifbool{uncoveredlist}{\beameruncoverffslidesspec}{\beameralertspec}
\begin{BeamerProgramList}
\programlistbeameriv
\end{BeamerProgramList}
@@ -778,80 +834,80 @@
% The last slide is generated separately:
\ifnumgreater{\thefbreaks}{0}{\def\btitleapp{\ (\pframes/\pframes)}}{}
\@ifundefined{programlistbeamerii}{%
- \ifcsdef{@bpolarg}{%
- \ifcsdef{@bpopts}{%
- \begingroup\edef\tempa{\endgroup\noexpand%
- \begin{frame}<\csuse{@bpolarg}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
- }{%
- \begin{frame}<\csuse{@bpolarg}>[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
- }%
- }{%
- \ifcsdef{@bpopts}{%
+ \ifcsvoid{@bpolarg}{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
+ }{%
\begingroup\edef\tempa{\endgroup\noexpand%
\begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ }%
+ }{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}<\csuse{@bpolarg}>[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
- }%
+ \begingroup\edef\tempa{\endgroup\noexpand%
+ \begin{frame}<\csuse{@bpolarg}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ }%
}%
}{%
\@ifundefined{programlistbeameriii}{%
- \ifcsdef{@bpolargii}{%
- \ifcsdef{@bpopts}{%
- \begingroup\edef\tempa{\endgroup\noexpand%
- \begin{frame}<\csuse{@bpolargii}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ \ifcsvoid{@bpolargii}{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}[label=beamerprogram2]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}<\csuse{@bpolargii}>[label=beamerprogram2]{\csuse{@bptitle}\btitleapp}
- }%
- }{%
- \ifcsdef{@bpopts}{%
\begingroup\edef\tempa{\endgroup\noexpand%
\begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ }%
+ }{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}<\csuse{@bpolargii}>[label=beamerprogram2]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}[label=beamerprogram2]{\csuse{@bptitle}\btitleapp}
+ \begingroup\edef\tempa{\endgroup\noexpand%
+ \begin{frame}<\csuse{@bpolargii}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
}%
}%
}{%
\@ifundefined{programlistbeameriv}{%
- \ifcsdef{@bpolargiii}{%
- \ifcsdef{@bpopts}{%
- \begingroup\edef\tempa{\endgroup\noexpand%
- \begin{frame}<\csuse{@bpolargiii}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ \ifcsvoid{@bpolargiii}{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}[label=beamerprogram3]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}<\csuse{@bpolargiii}>[label=beamerprogram3]{\csuse{@bptitle}\btitleapp}
- }%
- }{%
- \ifcsdef{@bpopts}{%
\begingroup\edef\tempa{\endgroup\noexpand%
\begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ }%
+ }{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}<\csuse{@bpolargiii}>[label=beamerprogram3]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}[label=beamerprogram3]{\csuse{@bptitle}\btitleapp}
+ \begingroup\edef\tempa{\endgroup\noexpand%
+ \begin{frame}<\csuse{@bpolargiii}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
}%
}%
}{%
- \ifcsdef{@bpolargiv}{%
- \ifcsdef{@bpopts}{%
- \begingroup\edef\tempa{\endgroup\noexpand%
- \begin{frame}<\csuse{@bpolargiv}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ \ifcsvoid{@bpolargiv}{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}[label=beamerprogram4]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}<\csuse{@bpolargiv}>[label=beamerprogram4]{\csuse{@bptitle}\btitleapp}
- }%
- }{%
- \ifcsdef{@bpopts}{%
\begingroup\edef\tempa{\endgroup\noexpand%
\begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ }%
+ }{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}<\csuse{@bpolargiv}>[label=beamerprogram4]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}[label=beamerprogram4]{\csuse{@bptitle}\btitleapp}
+ \begingroup\edef\tempa{\endgroup\noexpand%
+ \begin{frame}<\csuse{@bpolargiv}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
}%
}%
}%
}%
}%
- \ifbool{uncoveredlist}{\beameruncoverffslidesspec}{}
+ \ifbool{uncoveredlist}{\beameruncoverffslidesspec}{\beameralertspec}
\begin{BeamerProgramList}
\programlistbeamer
\end{BeamerProgramList}
\end{frame}
- \fi%\else\ifKV@beamerprogram@blocksonly
+ \fi%\else\if@jslp@beamerprogram@blocksonly
}
@@ -860,46 +916,55 @@
\csdef{@bptitle}{\lecprogram}
\def\btitleapp{}
\numdef\pframes{\thefbreaks + 1}
- \setkeys{beamerprogram}{alerted=false}
- \setkeys{beamerprogram}{blocksonly=false}
- \setkeys{beamerprogram}{uncover=false}
- \setkeys{beamerprogram}{#1}
+ \SetKeys[beamerprogram]{alerted=false}
+ \SetKeys[beamerprogram]{blocksonly=false}
+ \SetKeys[beamerprogram]{uncover=false}
+ \SetKeys[beamerprogram]{#1}
\def\bpdescbeg{\begin{BeamerProgramList}}
- \ifKV@beamerprogram@alerted
+ \providebool{alerted}
+ \if@jslp@beamerprogram@alerted
+ \booltrue{alerted}
+ \else
+ \boolfalse{alerted}
\fi
\providebool{uncoveredlist}
- \ifKV@beamerprogram@uncover
+ \if@jslp@beamerprogram@uncover
\booltrue{uncoveredlist}
\else
\boolfalse{uncoveredlist}
\fi
- \ifKV@beamerprogram@blocksonly
- \else% not \ifKV@beamerprogram@blocksonly
+ \if@jslp@beamerprogram@blocksonly
+ \else% not \if@jslp@beamerprogram@blocksonly
+ \ifbool{alerted}{%
+ \ifbool{uncoveredlist}%
+ {\renewcommand*\beameruncoverspec{\beamerdefaultoverlayspecification{<+(1)-| alert@+(1)>}}}%
+ {\renewcommand*\beameralertspec{\beamerdefaultoverlayspecification{<alert@+(1)>}}}%
+ }{}
% All but last slide(s) are generated in what follows
\ifcsempty{programlistbeamerexam}{}{%
\def\btitleapp{}
- \ifcsdef{@bpolarg}{%
- \ifcsdef{@bpopts}{%
- \begingroup\edef\tempa{\endgroup\noexpand%
- \begin{frame}<\csuse{@bpolarg}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ \ifcsvoid{@bpolarg}{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}<\csuse{@bpolarg}>[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
- }%
- }{%
- \ifcsdef{@bpopts}{%
\begingroup\edef\tempa{\endgroup\noexpand%
\begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
+ }%
+ }{%
+ \ifcsvoid{@bpopts}{%
+ \begin{frame}<\csuse{@bpolarg}>[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
}{%
- \begin{frame}[label=beamerprogram]{\csuse{@bptitle}\btitleapp}
+ \begingroup\edef\tempa{\endgroup\noexpand%
+ \begin{frame}<\csuse{@bpolarg}>[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa
}%
- }%
- \ifbool{uncoveredlist}{\beameruncoverspec}{}
+ }%
+ \ifbool{uncoveredlist}{\beameruncoverspec}{\beameralertspec}
\begin{BeamerProgramListExam}
\programlistbeamerexam
\end{BeamerProgramListExam}
\end{frame}
}%
- \fi%\else\ifKV@beamerprogram@blocksonly
+ \fi%\else\if@jslp@beamerprogram@blocksonly
}
@@ -935,24 +1000,63 @@
% 1) Session definition
%
\newtoggle{shortinstrdef}
-\define@key{session}{titlesep}{\csdef{@sestitlesep}{{#1}}}
-\define@key{session}{subtitle}{\csdef{@sessubtitle}{{#1}}}
-\define@key{session}{shorttitle}{\csdef{@sesshorttitle}{{#1}}\csdef{@usesshorttitle}{{#1}}}
-\define@key{session}{bibsec}{\csdef{@sesbibsec}{#1}}
-\define@key{session}{room}{\csdef{@sesroom}{{#1}}}
-\define@key{session}{starttime}{\csdef{@sesrtime}{#1}\csdef{@sestime}{\DTMtime{#1}}}
-\define@key{session}{duration}{\csdef{@sesduration}{#1}}
-\define@key{session}{instructor}{%
- \csdef{@sesinstructor}{{#1}}\csdef{@usesinstructor}{{#1}}%
- \iftoggle{shortinstrdef}{}{\csdef{@sesshortinstructor}{{#1}}\csdef{@usesshortinstructor}{{#1}}}}
-\define@key{session}{shortinstructor}{%
- \csdef{@sesshortinstructor}{{#1}}\csdef{@usesshortinstructor}{{#1}}\toggletrue{shortinstrdef}}
-\define@key{session}{presstudents}{\csdef{@sespresstudents}{{#1}}}
-\define@boolkey{session}{cancel}[true]{}
-\define@boolkey{session}{draft}[true]{}
-\define@key{session}{topicnumber}{\setcounter{sestopic}{#1-1}}
-\define@key{session}{extradate}{\csdef{@xsesdate}{#1}}
-\define@boolkey{session}{exam}[true]{}
+\newif\if@jslp@session@cancel\@jslp@session@cancelfalse
+\newif\if@jslp@session@draft\@jslp@session@draftfalse
+\newif\if@jslp@session@exam\@jslp@session@examfalse
+
+\DeclareKeys[session]
+{
+ % titlesep = <sep>
+ titlesep.code = { \csdef{@sestitlesep}{{#1}} },
+ % subtitle = <title>
+ subtitle.code = { \csdef{@sessubtitle}{{#1}} },
+ % shorttitle = <title>
+ shorttitle.code = {
+ \csdef{@sesshorttitle}{{#1}}
+ \csdef{@usesshorttitle}{{#1}}
+ },
+ % bibsec = <keyword>
+ bibsec.store = \@sesbibsec,
+ % room = <room>
+ room.code = { \csdef{@sesroom}{{#1}} },
+ % starttime = <starttime>
+ starttime.code = {
+ \csdef{@sesrtime}{#1}
+ \csdef{@sestime}{\DTMtime{#1}}
+ },
+ % duration = <duration>
+ duration.store = \@sesduration,
+ % instructor = <instructor>
+ instructor.code = {
+ \csdef{@sesinstructor}{{#1}}
+ \csdef{@usesinstructor}{{#1}}
+ \iftoggle{shortinstrdef}{}{%
+ \csdef{@sesshortinstructor}{{#1}}
+ \csdef{@usesshortinstructor}{{#1}}%
+ }
+ },
+ % shortinstructor = <instructor>
+ shortinstructor.code = {
+ \csdef{@sesshortinstructor}{{#1}}
+ \csdef{@usesshortinstructor}{{#1}}
+ \toggletrue{shortinstrdef}
+ },
+ % presstudents = <instructor>
+ presstudents.code = { \csdef{@sespresstudents}{{#1}} },
+ % cancel = <true|false>
+ cancel.if = @jslp@session@cancel,
+ % draft = <true|false>
+ draft.if = @jslp@session@draft,
+ % exam = <true|false>
+ exam.if = @jslp@session@exam,
+ % topicnumber = <true|false>
+ topicnumber.code = {
+ \setcounter{sestopic}{#1-1}
+ },
+ % extradate = <date>
+ extradate.store = \@xsesdate
+}
+
%
\newcommand*\NewSession[2][]{%
\stepcounter{sesunit}
@@ -974,10 +1078,10 @@
\csdef{@usesshortinstructor}{}
\csdef{@sespresstudents}{}
\csdef{@xsesdate}{}
- \setkeys{session}{cancel=false}
- \setkeys{session}{draft=false}
- \setkeys{session}{exam=false}
- \setkeys{session}{#1}
+ \SetKeys[session]{cancel=false}
+ \SetKeys[session]{draft=false}
+ \SetKeys[session]{exam=false}
+ \SetKeys[session]{#1}
\csdef{@sestitle}{#2}
% only calculate the date if it is not fixed via extradate.
\ifcsempty{@xsesdate}{%
@@ -1022,12 +1126,12 @@
\protected@csxdef{sespresstudents\thesnum}{\csuse{@sespresstudents}}
\protected@csxdef{sesblock\thesnum}{\csuse{@currentblock}}
\protected@csxdef{sesblockno\thesnum}{\csuse{@currentblockno}}
- \ifKV@session@cancel
+ \if@jslp@session@cancel
\stepcounter{cancellations}
\protected@eappto\programlist{\noexpand\ProgramListCancelItem{\csuse{sesshortdate\thesnum}}{\csuse{sestitle\thesnum}}{\csuse{@sestitlesep}}{\csuse{@sessubtitle}}}
\protected@eappto\programlistbeamer{\noexpand\BeamerProgramListCancelItem{\csuse{sesshortdate\thesnum}}{\csuse{sestitle\thesnum}}{\csuse{@sestitlesep}}{\csuse{@sessubtitle}}}
\else
- \ifKV@session@exam
+ \if@jslp@session@exam
\stepcounter{exams}
\protected@csxdef{examsesno\theexams}{\thesnum}
\protected@eappto\programlistexam{\noexpand\ProgramListExamItem{\csuse{sesshortdate\thesnum}}{\csuse{sestitle\thesnum}}{\csuse{@sestitlesep}}{\csuse{@sessubtitle}}}
@@ -1039,7 +1143,7 @@
}%
\else
\stepcounter{sestopic}
- \ifKV@session@draft
+ \if@jslp@session@draft
\ifcsempty{@sestitle}{\protected@csxdef{sestitle\thesnum}{\sestopic}}{}
\fi
\protected@eappto\programlist{\noexpand\ProgramListItem{\csuse{sesshortdate\thesnum}}{\csuse{sestitle\thesnum}}{\csuse{@sestitlesep}}{\csuse{@sessubtitle}}}
@@ -1075,16 +1179,24 @@
}
% Set break of multiple interval units
-\define@key{break}{units}{\csdef{@breakunits}{#1}}
-\define@key{break}{span}{\csdef{@breakspan}{#1}}
-\define@key{break}{weeks}{%
- \PackageWarning{jslectureplanner}{\protect\SetBreaks\space option 'weeks' is deprecated. Use 'units' instead.}%
- \setkeys{break}{units=#1}%
+\DeclareKeys[break]
+{
+ % units = <int>
+ units.store = \@breakunits,
+ % span = <int>
+ span.store = \@breakspan,
+ % weeks = <int> (deprecated!)
+ weeks.code = {
+ \PackageWarning{jslectureplanner}{%
+ \protect\SetBreaks\space option 'weeks' is deprecated. Use 'units' instead.}%
+ \SetKeys[break]{units=#1}%
+ }
}
+
\newcommand*\SetBreaks[2][units=1]{%
\csdef{@breakunits}{}
\csdef{@breakspan}{}
- \setkeys{break}{#1}
+ \SetKeys[break]{#1}
\setcounter{breakunits}{\csuse{@breakunits}}
\setcounter{sesunit}{\thesesunit+\thebreakunits}
\setcounter{cancellations}{\thecancellations+\thebreakunits}
diff --git a/macros/latex/contrib/jslectureplanner/jslectureplanner.tex b/macros/latex/contrib/jslectureplanner/jslectureplanner.tex
index ecadf4b79a..d2d9d4837f 100644
--- a/macros/latex/contrib/jslectureplanner/jslectureplanner.tex
+++ b/macros/latex/contrib/jslectureplanner/jslectureplanner.tex
@@ -87,7 +87,7 @@ colorlinks=false
\author{Jürgen Spitzmüller%
\thanks{Please report issues via \protect\url{https://github.com/jspitz/jslectureplanner}.}}
-\date{Version 1.12, 2020/12/08}
+\date{Version 1.13, 2024/03/06}
\maketitle
@@ -151,7 +151,6 @@ The following packages are required and loaded by \jslp:
\item \textsf{datetime2}
\item \textsf{etoolbox}
\item \textsf{ifthen}
- \item \textsf{xkeyval}
\item \textsf{xparse}
\end{itemize}
\pagebreak
@@ -1239,7 +1238,6 @@ The following packages are required and loaded by \jsmt:
\item \textsf{calc}
\item \textsf{longtable}
\item \textsf{hhline}
- \item \textsf{xkeyval}
\end{itemize}
\jsmt\ can be used independently of
\jslp\ to some degree. The latter package is only required for specific
@@ -1439,6 +1437,11 @@ the \jslp\ style files. Thanks, Dominik.
\section{Release History}
\begin{itemize}
+\item 2024/03/06 (v. 1.13):
+\begin{itemize}
+ \item Use legacy keyvals rather than \textsf{xkeyval}.
+ \item Fix row spacing in prestables.
+\end{itemize}
\item 2020/12/08 (v. 1.12):
\begin{itemize}
\item Correctly parse staryear/endyear.
diff --git a/macros/latex/contrib/jslectureplanner/jsmembertable.sty b/macros/latex/contrib/jslectureplanner/jsmembertable.sty
index a371a492a5..0c8c1ee2bb 100644
--- a/macros/latex/contrib/jslectureplanner/jsmembertable.sty
+++ b/macros/latex/contrib/jslectureplanner/jsmembertable.sty
@@ -24,8 +24,8 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\filedate{2020/12/08}
-\def\fileversion{1.12}
+\def\filedate{2024/03/06}
+\def\fileversion{1.13}
\def\filename{jsmembertable.sty}
\NeedsTeXFormat{LaTeX2e}
@@ -41,32 +41,35 @@
\RequirePackage{array}
\RequirePackage{longtable}
\RequirePackage{hhline}
-\RequirePackage{xkeyval}
%
% PACKAGE OPTIONS
%
-\newif\if@datatool\@datatoolfalse
-\def\jsmt@datafile{}
-\define@key{mem}{datafile}{%
- \def\jsmt@datafile{#1.csv}
- \@datatooltrue
-}
-\DeclareOptionX{datafile}{\setkeys{mem}{datafile=#1}}
+\newif\if@jsmt@datatool\@jsmt@datatoolfalse
\def\jsmt@datakeys{pname,sname,mid,email}
-\define@key{mem}{datakeys}{%
- \def\jsmt@datakeys{#1}
+
+\DeclareKeys[jsmt]
+{
+ % datafile=filename
+ datafile.code = {
+ \def\jsmt@datafile{#1.csv}
+ \@jsmt@datatooltrue
+ },
+ datafile.usage = load,
+ % datakeys={<keyorder>}
+ datakeys.store = \jsmt@datakeys,
+ datakeys.usage = load
}
-\DeclareOptionX{datakeys}{\setkeys{mem}{datakeys={#1}}}
-\ProcessOptionsX
+
+\ProcessKeyOptions[jsmt]
%
% OPT-IN PACKAGES
%
% Load datatool if necessary
-\if@datatool
+\if@jsmt@datatool
\RequirePackage{datatool}
\DTLloadrawdb[noheader,keys={\jsmt@datakeys}]{data}{\jsmt@datafile}
\dtlsort{sname,pname}{data}{\dtlicompare}
@@ -197,7 +200,7 @@
& \jsemailheader\tabularnewline
\hhline{-===}
\endhead
- \if@datatool
+ \if@jsmt@datatool
\DTLforeach*{data}{%
\jsmt@firstname=pname,\jsmt@surname=sname,\jsmt@mid=mid,\jsmt@email=email}{%
\DTLiffirstrow{}{\tabularnewline\hline}%
@@ -649,11 +652,12 @@
\hline
\hline
\endhead
- \if@datatool%
+ \strut
+ \if@jsmt@datatool%
\DTLforeach*{data}{%
\jsmt@firstname=pname,\jsmt@surname=sname}{%
\DTLiffirstrow{}{\tabularnewline\hline}%
- \bodyrowone{\jsmt@surname, \jsmt@firstname}%
+ \bodyrowone{\jsmt@surname, \jsmt@firstname}\strut%
}%
\tabularnewline\hline
\fi%
@@ -677,18 +681,19 @@
\resettabtoks
\loop\ifnum\thetabrow<\themembers\relax
\stepcounter{tabrow}
- \addtabtoks{\bodyrowtwo{}\tabularnewline\hline}%
+ \addtabtoks{\bodyrowtwo{}\tabularnewline\hline}\strut%
\repeat
\ltstarttwo
\headerptwo
\hline
\hline
\endhead
- \if@datatool
+ \strut
+ \if@jsmt@datatool
\DTLforeach*{data}{%
\jsmt@firstname=pname,\jsmt@surname=sname}{%
\DTLiffirstrow{}{\tabularnewline\hline}%
- \bodyrowtwo{\jsmt@surname, \jsmt@firstname}%
+ \bodyrowtwo{\jsmt@surname, \jsmt@firstname}\strut%
}%
\tabularnewline\hline
\fi%
diff --git a/macros/latex/contrib/useclass/README.md b/macros/latex/contrib/useclass/README.md
index baabb9b6e7..d3bd24274d 100644
--- a/macros/latex/contrib/useclass/README.md
+++ b/macros/latex/contrib/useclass/README.md
@@ -1,7 +1,32 @@
-# The `useclass.sty` Package: Use Classes as Packages
+# The `useclass.sty` Package: Load Classes as Packages
## Introduction
-`useclass` is a package that enables the usage of classes as packages. It was originally designed for the `l3doc` class, which is employed for documenting LaTeX code with numerous useful features. However, employing the `l3doc` class as a package is not convenient when using the developing class as the style for the document. Therefore, this package provides a simple interface for utilizing classes as packages.
+`useclass` is a package that enables the usage of classes as packages.
+It was originally designed for the `l3doc` class, which is employed for documenting LaTeX code with numerous useful features.
+However, employing the `l3doc` class as a package is not convenient when using the developing class as the style for the document.
+Therefore, this package provides a simple interface for utilizing classes as packages.
+The latest documentation is available [here](https://github.com/huangyxi/useclass/releases/latest/download/useclass.pdf).
+
+
+## Installation
+
+The following methods are available for installing and updating the package.
+Choose the method that best suits your needs.
+
+Since this package is derived from the `.dtx` file, the easiest way to install or update it is to place or replace the `useclass.sty` file in the same directory as your working document.
+You can download `useclass.sty` from the [GitHub Release](https://github.com/huangyxi/useclass/releases/latest/download/useclass.sty).
+
+For a full installation of the package, you can use a TeX repository manager such as TeX Live.
+This method will download the package from CTAN and install all required files to TeX Directory Structure (TDS).
+For command-line users, the following commands can be used:
+
+```bash
+tlmgr [--usermode] install useclass
+tlmgr [--usermode] update useclass
+```
+
+If you're a developer interested in contributing to the project's development, or if you simply want to try the latest features before they are released, you can clone the repository from GitHub and use either `l3build` or `make` to install the package.
+
## Usage
Use `\useclass` to load a class with the same usage as `\usepackage`:
@@ -18,9 +43,11 @@ Example:
## License
This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
-The latest version of this license is in
+This version of this license is in
+ https://www.latex-project.org/lppl/lppl-1-3c.txt
+and the latest version of this license is in
https://www.latex-project.org/lppl.txt
and version 1.3c or later is part of all distributions of LaTeX
version 2008 or later.
diff --git a/macros/latex/contrib/useclass/useclass.dtx b/macros/latex/contrib/useclass/useclass.dtx
index 74d9d63ca1..37016e738b 100644
--- a/macros/latex/contrib/useclass/useclass.dtx
+++ b/macros/latex/contrib/useclass/useclass.dtx
@@ -23,13 +23,13 @@
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
- version 1.3 of this license or (at your option) any later
+ version 1.3c of this license or (at your option) any later
version. This version of this license is in
https://www.latex-project.org/lppl/lppl-1-3c.txt
and the latest version of this license is in
https://www.latex-project.org/lppl.txt
- and version 1.3 or later is part of all distributions of
- LaTeX version 2005/12/01 or later.
+ and version 1.3c or later is part of all distributions of LaTeX
+ version 2008 or later.
This work has the LPPL maintenance status "maintained".
@@ -62,14 +62,15 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesExplPackage{useclass}
-%<package> {2024-03-04}{0.9}{Use Classes as Packages} %
+%<package> {2024-03-06}{1.0}{Use Classes as Packages} %
%<*driver>
\documentclass{article}
\usepackage{useclass}
-\useclass[full]{l3doc}
+\useclass*[full]{l3doc}
\usepackage{mdframed}
-\providecommand{\pkgname}{\pkg{\jobname}}
+\providecommand{\name}{\jobname}
+\providecommand{\pkgname}{\pkg{\name}}
\begin{document}
\DocInput{\jobname.dtx}
\PrintIndex
@@ -77,7 +78,7 @@
%</driver>
% \fi
%
-% \title{The \pkgname.sty Package: Use Classes as Packages}
+% \title{The \pkgname.sty Package: Load Classes as Packages}
% \author
% {
% Huang Yuxi
@@ -90,19 +91,17 @@
% {useclass@hyxi.dev}^^A
% >
% }
-% \date{2024-03-04 \quad Version 0.9}
-%
-
-% \maketitle
+% \date{2024-03-06 \quad Version 1.0}
%
%
+% \maketitle
%
% \begin{mdframed}
-% \textsf{TL;DR} \; Use \cs{useclass} to load a class with the same usage as \cs{usepackage}:
-% \begin{verbatim}
+% \textsf{TL;DR} \; Use \cs{useclass} to load a class with the same usage as \cs{usepackage}:
+% \begin{verbatim}
% \usepackage{useclass}
% \useclass[full]{l3doc}
-% \end{verbatim}
+% \end{verbatim}
% \end{mdframed}
%
% \tableofcontents
@@ -112,19 +111,47 @@
% \section{Introduction}
%
% \pkgname{} is a package that enables the usage of classes as packages. It was originally designed for the \cls{l3doc} class, which is employed for documenting \LaTeX{} code with numerous useful features. However, employing the \cls{l3doc} class as a package is not convenient when using the developing class as the style for the document. Therefore, this package provides a simple interface for utilizing classes as packages.
-% The package \pkgname{} was initially released on 2024-03-04, under the LaTeX Project Public License Version 1.3c^^A
+% The package \pkgname{} was initially released on 2024-03-05, under the LaTeX Project Public License Version 1.3c^^A
% \footnote{\url{https://www.latex-project.org/lppl/lppl-1-3c.txt}}
% or later, and is maintained at \url{https://github.com/huangyxi/useclass}.
+% The latest documentation can be found at
+% \url{https://github.com/huangyxi/useclass/releases/latest/download/useclass.pdf}.
+%
+%
+% \section{Installation}
+%
+% The following are the methods for installing and updating the package.
+% You can choose the method that is most suitable for you.
+%
+% Since this package is tangled from the \file{.dtx} file,
+% the easiest way to install or update the package is to place or replace the \file{\name.sty} file in the same directory as your working document.
+% You can find \file{\name.sty} at GitHub Release^^A
+% \footnote{\url{https://github.com/huangyxi/useclass/releases/latest/download/useclass.sty}}.
+%
+% For a full installation of the package, you can use the \TeX repository manager, such as \TeX{} Live.
+% This method will download the package from CTAN, and install all required files to \TeX{} Directory Structure (TDS).
+% For command-line users, you can use the following command:
+% \begin{verbatim}
+% tlmgr [--usermode] install useclass
+% tlmgr [--usermode] update useclass
+% \end{verbatim}
+%
+% If you're a developer interested in contributing to the project's development,
+% or just want to try the latest features before they are released,
+% you can clone the repository from GitHub, and use either |l3build| or |make| to install the package.
%
% \section{Usage}
-
%
-% \begin{function}{\useclass}
+% \begin{function}{\useclass, \useclass*}
% \begin{syntax}
- % \cs{useclass} \marg{class}
+% \cs{useclass} \marg{class}
% \cs{useclass} \oarg{options} \marg{class}
+% \cs{useclass*} \marg{class}
+% \cs{useclass*} \oarg{options} \marg{class}
% \end{syntax}
% Load class with options, where \meta{options} is the options for the class and \meta{class} is the class name without the extension.
+% When using the starred version \cs{useclass*}, the tokens, dimensions, and control sequences modified by the class will be saved before loading the class and restored after loading the class.
+% Currently, the starred version is only applicable to the \cls{l3doc} class.
% \end{function}
%
% Example for a \file{dtx} file:
@@ -161,15 +188,67 @@
%
% \subsection{Variables}
%
-% \begin{variable}{\@@_tempa_cs:w}
-% Temporary control sequence.
+% \begin{macro}{\c_@@_cs_name_tl}
+% Prefix of control sequence names for saving and restoring.
% \begin{macrocode}
+\tl_const:Nn \c_@@_cs_name_tl {@@_s_cs_}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{variable}{\g_@@_tl_seq, \g_@@_dim_seq, \g_@@_cs_name_seq}
+% Sequnce of variables to save before, and restore after loading class.
+% \begin{macrocode}
+\seq_new:N \g_@@_tl_seq
+\seq_new:N \g_@@_dim_seq
+\seq_new:N \g_@@_cs_name_seq
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\l_@@_class_prop}
+% Temporary property list of class configuration.
+% \begin{macrocode}
+\prop_new:N \l_@@_class_prop
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\l_@@_csname_seq}
+% Temporary sequence of csnames of variables to save and restore.
+% \begin{macrocode}
+\seq_new:N \l_@@_csname_seq
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\l_@@_tmpa_tl, \l_@@_tmpb_tl, \l_@@_tmpa_dim, \@@_tempa_cs:w}
+% Temporary variables used in the implementation.
+% \begin{macrocode}
+\tl_new:N \l_@@_tmpa_tl
+\tl_new:N \l_@@_tmpb_tl
+\dim_new:N \l_@@_tmpa_dim
\cs_new_eq:NN \@@_tempa_cs:w ?
% \end{macrocode}
% \end{variable}
%
+%
% \subsection{Helpers}
%
+% \begin{macro}{\@@_prop_get_prop:NnN, \@@_prop_get_seq:NnN}
+% Since the values of \cs{c_@@_classes_prop} are token lists, we need to parse them to property.
+% \begin{macrocode}
+% \cs_set_eq:NN \@@_prop_set_from_keyval:Nn \prop_set_from_keyval:Nn
+% \cs_generate_variant:Nn \@@_prop_set_from_keyval:Nn { No }
+\cs_new_protected:Npn \@@_prop_get_prop:NnN #1 #2 #3
+ {
+ \prop_get:NnN #1 {#2} \l_@@_tmpa_tl
+ \exp_args:NNo \prop_set_from_keyval:Nn #3 \l_@@_tmpa_tl
+ }
+\cs_new_protected:Npn \@@_prop_get_seq:NnN #1 #2 #3
+ {
+ \prop_get:NnN #1 {#2} \l_@@_tmpa_tl
+ \exp_args:NNo \seq_set_from_clist:Nn #3 \l_@@_tmpa_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@@_cs_swap:NN}
% Define a helper function to swap two control sequences.
% \begin{macrocode}
@@ -181,6 +260,85 @@
}
% \end{macrocode}
% \end{macro}
+%
+%
+% \subsection{Variables Save and Restore}
+%
+% \begin{macro}{\@@_save_tl:N, \@@_restore_tl:N}
+% Save and restore the token lists of the class.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_save_tl:N #1
+ {
+ \@@_prop_get_seq:NnN #1 {tl} \l_@@_csname_seq
+ \seq_map_inline:Nn \l_@@_csname_seq
+ {
+ \tl_set:Nx \l_@@_tmpa_tl {\tl_use:c {##1}}
+ \seq_gput_right:No \g_@@_tl_seq {\l_@@_tmpa_tl}
+ }
+ }
+\cs_new_protected:Npn \@@_restore_tl:N #1
+ {
+ \@@_prop_get_seq:NnN #1 {tl} \l_@@_csname_seq
+ \seq_map_inline:Nn \l_@@_csname_seq
+ {
+ \seq_gpop_left:NN \g_@@_tl_seq \l_@@_tmpa_tl
+ \tl_set:cn {##1} {\l_@@_tmpa_tl}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_save_dim:N, \@@_restore_dim:n}
+% Save and restore the dimensions of the class.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_save_dim:N #1
+ {
+ \@@_prop_get_seq:NnN #1 {dim} \l_@@_csname_seq
+ \seq_map_inline:Nn \l_@@_csname_seq
+ {
+ \tl_set:Nx \l_@@_tmpa_tl {\dim_use:c {##1}}
+ \seq_gput_right:No \g_@@_dim_seq {\l_@@_tmpa_tl}
+ }
+ }
+\cs_new_protected:Npn \@@_restore_dim:N #1
+ {
+ \@@_prop_get_seq:NnN #1 {dim} \l_@@_csname_seq
+ \seq_map_inline:Nn \l_@@_csname_seq
+ {
+ \seq_gpop_left:NN \g_@@_dim_seq \l_@@_tmpa_dim
+ \dim_set:cn {##1} {\l_@@_tmpa_dim}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_save_cs:N, \@@_restore_cs:N}
+% Create a new control sequence with the transformed name,
+% and save and restore the original control sequence with the new name.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_save_cs:N #1
+ {
+ \@@_prop_get_seq:NnN #1 {cs} \l_@@_csname_seq
+ \seq_map_inline:Nn \l_@@_csname_seq
+ {
+ \tl_concat:NNN \l_@@_tmpa_tl \c_@@_cs_name_tl {##1}
+ \cs_set_eq:cc \l_@@_tmpa_tl {##1}
+ \seq_gput_right:No \g_@@_cs_name_seq {\l_@@_tmpa_tl}
+ }
+ }
+\cs_new_protected:Npn \@@_restore_cs:N #1
+ {
+ \@@_prop_get_seq:NnN #1 {cs} \l_@@_csname_seq
+ \seq_map_inline:Nn \l_@@_csname_seq
+ {
+ \seq_gpop_left:NN \g_@@_cs_name_seq \l_@@_tmpa_tl
+ \cs_set_eq:cc {##1} \l_@@_tmpa_tl
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
% \subsection{Dependences loading}
% \pkgname{} currently don't have any explicit dependences.
%
@@ -195,8 +353,20 @@
%
% \subsection{Before Loading Class}
%
+% \begin{macro}{\@@_save_before:N}
+% Save variables before loading class.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_save_before:N #1
+ {
+ \@@_save_tl:N #1
+ \@@_save_dim:N #1
+ \@@_save_cs:N #1
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@@_use_before:}
-% These are the things to do before loading class.
+% These are the general things to do before loading class.
% \begin{macrocode}
\cs_new_protected:Npn \@@_use_before:
{
@@ -220,7 +390,7 @@
% \subsection{After Loading Class}
%
% \begin{macro}{\@@_use_after:}
-% These are the things to do after loading class.
+% These are the general things to do after loading class.
% \begin{macrocode}
\cs_new_protected:Npn \@@_use_after:
{
@@ -229,22 +399,75 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_restore_after:N}
+% Restore variables after loading class.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_restore_after:N #1
+ {
+ \@@_restore_cs:N #1
+ \@@_restore_dim:N #1
+ \@@_restore_tl:N #1
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
% \subsection{User Interface}
-% \begin{macro}{\useclass}
+% \begin{macro}{\useclass, \useclass*}
% Load patch class with options.
% \begin{macrocode}
-\NewDocumentCommand {\useclass} { O{} m }
+\NewDocumentCommand {\useclass} { s O{} m }
{
- \@@_use_before:
- \@@_use_class:nn {#1} {#2}
- \@@_use_after:
+ \bool_if:NTF #1
+ {
+ \@@_prop_get_prop:NnN \c_@@_classes_prop {#3} \l_@@_class_prop
+ \@@_save_before:N \l_@@_class_prop
+ \@@_use_before:
+ \@@_use_class:nn {#2} {#3}
+ \@@_use_after:
+ \@@_restore_after:N \l_@@_class_prop
+ }
+ {
+ \@@_use_before:
+ \@@_use_class:nn {#2} {#3}
+ \@@_use_after:
+ }
}
% \end{macrocode}
% \end{macro}
%
+% \subsection{Classes Configuration}
+% \begin{variable}{\c_@@_classes_prop}
+% Configuration for classes to restore after loading.
+% The defined property is NOT nested, where values in the prop are token lists but not properties or sequences.
+% \begin{macrocode}
+\prop_const_from_keyval:Nn \c_@@_classes_prop {
+ l3doc = {
+ tl = {
+ partname,
+ },
+ dim = {
+ textwidth,
+ marginparwidth,
+ oddsidemargin,
+ evensidemargin,
+ parindent,
+ itemindent,
+ parskip,
+ },
+ cs = {
+ list,
+ l@section,
+ l@subsection,
+ },
+ },
+}
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macrocode}
%</package>
% \end{macrocode}
-
+%
% \end{implementation}
% \PrintIndex
diff --git a/macros/latex/contrib/useclass/useclass.ins b/macros/latex/contrib/useclass/useclass.ins
index 3d8431cde6..878cfc6626 100644
--- a/macros/latex/contrib/useclass/useclass.ins
+++ b/macros/latex/contrib/useclass/useclass.ins
@@ -10,13 +10,13 @@
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
-%% version 1.3 of this license or (at your option) any later
+%% version 1.3c of this license or (at your option) any later
%% version. This version of this license is in
%% https://www.latex-project.org/lppl/lppl-1-3c.txt
%% and the latest version of this license is in
%% https://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of
-%% LaTeX version 2005/12/01 or later.
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
@@ -31,13 +31,13 @@
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
- version 1.3 of this license or (at your option) any later
+ version 1.3c of this license or (at your option) any later
version. This version of this license is in
https://www.latex-project.org/lppl/lppl-1-3c.txt
and the latest version of this license is in
https://www.latex-project.org/lppl.txt
- and version 1.3 or later is part of all distributions of
- LaTeX version 2005/12/01 or later.
+ and version 1.3c or later is part of all distributions of LaTeX
+ version 2008 or later.
This work has the LPPL maintenance status "maintained".
@@ -58,10 +58,6 @@
}
\endbatchfile
-
-
- % \cs{useclass} \marg{class}
-
%%
%% This work consists of the files useclass.dtx
%% and the derived files useclass.sty and useclass.ins.
diff --git a/macros/latex/contrib/useclass/useclass.pdf b/macros/latex/contrib/useclass/useclass.pdf
index 499da57e29..2623e72d2b 100644
--- a/macros/latex/contrib/useclass/useclass.pdf
+++ b/macros/latex/contrib/useclass/useclass.pdf
Binary files differ