diff options
author | Karl Berry <karl@freefriends.org> | 2020-12-08 22:03:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-12-08 22:03:37 +0000 |
commit | a02f01decb83795aa2d41b1a390a90684f560cf5 (patch) | |
tree | 8c412bc2ed285e518362941443ff1b45b83260c5 /Master/texmf-dist/tex/latex/jslectureplanner | |
parent | 93cefbe6f7c254a94cb771a78aff7d7ffd3f5850 (diff) |
jslectureplanner (7dec20)
git-svn-id: svn://tug.org/texlive/trunk@57095 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/jslectureplanner')
-rw-r--r-- | Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty | 33 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/jslectureplanner/jsmembertable.sty | 4 |
2 files changed, 29 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty b/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty index 72c62b27fa7..31bbfd3530c 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{2020/05/11} -\def\fileversion{1.11} +\def\filedate{2020/12/08} +\def\fileversion{1.12} \def\filename{jslectureplanner.sty} \NeedsTeXFormat{LaTeX2e} @@ -58,6 +58,8 @@ \def\lecnsemverb{} \def\lecnsemny{} \def\lecyear{} +\def\lecendyear{} +\def\lecendyearsep{/} \def\lecsemester{} \def\lecsemesterverb{} \def\lecuniversity{} @@ -256,6 +258,7 @@ \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}} @@ -313,12 +316,31 @@ % % ALTERNATIVE SETUP MACROS % +\RequirePackage{xparse} + +% LecYear parses and splits {...}{startyear/endyear} +\ExplSyntaxOn +\NewDocumentCommand \LecYear { m m } +{ + % #1: semester/term + \setkeys{lec}{lecsem=#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} + } + \seq_get_right:NNT \seq_jslp_lec_year \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*{\LecYear}[2]{\setkeys{lec}{lecsem=#1,year=#2}} \newcommand*{\LecUni}[1]{\setkeys{lec}{uni={#1}}} \newcommand*{\LecInstitute}[1]{\setkeys{lec}{institute={#1}}} \newcommand*{\LecRoom}[1]{\setkeys{lec}{room={#1}}} @@ -341,7 +363,6 @@ % % Courtesy of Christian Hupfer at % https://tex.stackexchange.com/a/473552/19291 -\RequirePackage{xparse} \ExplSyntaxOn \cs_generate_variant:Nn \int_set:Nn {NV} @@ -384,8 +405,8 @@ % % CONCATENATED VARIABLES % -\def\lecsemester{\lecsemshort~\lecyear} -\def\lecsemesterverb{\lecsemverb\ \lecyear} +\def\lecsemester{\lecsemshort~\lecyear\ifcsempty{lecendyear}{}{\lecendyearsep\lecendyear}} +\def\lecsemesterverb{\lecsemverb\ \lecyear\ifcsempty{lecendyear}{}{\lecendyearsep\lecendyear}} \def\lecfulltitle{\lectitle\lectitlesep\lecsubtitle} \def\sesfulltitle{\sestitle\sestitlesep\sessubtitle} \def\lecendtime{\jslp@endtime{\@lecstarttime}{\lecduration}} diff --git a/Master/texmf-dist/tex/latex/jslectureplanner/jsmembertable.sty b/Master/texmf-dist/tex/latex/jslectureplanner/jsmembertable.sty index 8d8b634bbac..a371a492a57 100644 --- a/Master/texmf-dist/tex/latex/jslectureplanner/jsmembertable.sty +++ b/Master/texmf-dist/tex/latex/jslectureplanner/jsmembertable.sty @@ -24,8 +24,8 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\def\filedate{2020/05/11} -\def\fileversion{1.11} +\def\filedate{2020/12/08} +\def\fileversion{1.12} \def\filename{jsmembertable.sty} \NeedsTeXFormat{LaTeX2e} |