summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/jslectureplanner
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-08-31 22:47:47 +0000
committerKarl Berry <karl@freefriends.org>2016-08-31 22:47:47 +0000
commit59fe7990216c0d13eb0e9797c7dc563d2f1705b5 (patch)
tree75ab31dad47d808008a03a860422180859317e05 /Master/texmf-dist/tex/latex/jslectureplanner
parent81ee5e54df53e5bb20be20bfefae95dd1e9815ef (diff)
jslectureplanner (31aug16)
git-svn-id: svn://tug.org/texlive/trunk@41965 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/jslectureplanner')
-rw-r--r--Master/texmf-dist/tex/latex/jslectureplanner/german-default.lps16
-rw-r--r--Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty118
-rw-r--r--Master/texmf-dist/tex/latex/jslectureplanner/jsmembertable.sty4
3 files changed, 90 insertions, 48 deletions
diff --git a/Master/texmf-dist/tex/latex/jslectureplanner/german-default.lps b/Master/texmf-dist/tex/latex/jslectureplanner/german-default.lps
index 4a23ae70cf9..9b7026373c8 100644
--- a/Master/texmf-dist/tex/latex/jslectureplanner/german-default.lps
+++ b/Master/texmf-dist/tex/latex/jslectureplanner/german-default.lps
@@ -42,10 +42,18 @@
\DefSemType{ws}{WS}{Wintersemester}% winter term
% Date formats
-\renewcommand*\lecdateformat{%
- \THEDAY.\,\twodigit{\THEMONTH}.\,\THEYEAR}% long date
-\renewcommand*\lecdateshortformat{%
- \THEDAY.\,\twodigit{\THEMONTH}.}% short date
+% Uses datetime2 syntax:
+% ##1: year
+% ##2: month
+% ##3: day
+% \DTMtwodigits: always output two digits
+\DTMrenewdatestyle{lecdate}{% long date: dd.\,mm.~yyyy
+\renewcommand*{\DTMdisplaydate}[4]{\DTMtwodigits{##3}.\,\DTMtwodigits{##2}.~##1}%
+}
+
+\DTMrenewdatestyle{lecshortdate}{% short date: dd.\,mm.
+\renewcommand*{\DTMdisplaydate}[4]{\DTMtwodigits{##3}.\,\DTMtwodigits{##2}.}%
+}
% Suffix to cancelled sessions
\renewcommand*\leccancel{\ -- keine \lectypesession}
diff --git a/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty b/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty
index 81f1d97bef4..ed719c4751c 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{2016/05/11}
-\def\fileversion{1.2}
+\def\filedate{2016/08/31}
+\def\fileversion{1.3}
\def\filename{jslectureplanner.sty}
\NeedsTeXFormat{LaTeX2e}
@@ -36,9 +36,8 @@
% REQUIRED PACKAGES
%
\RequirePackage{etoolbox}
-\RequirePackage{advdate}
\RequirePackage{xkeyval}
-\RequirePackage{datetime}
+\RequirePackage[calc,useregional]{datetime2}
\RequirePackage{calc}
\RequirePackage{ifthen}
@@ -230,19 +229,19 @@
\fi
}
-\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{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{uni}{\setkeys{lec}{uni={#1}}}
+\DeclareOptionX{institute}{\setkeys{lec}{institute={#1}}}
\DeclareOptionX{startdate}{\setkeys{lec}{startdate=#1}}
-\DeclareOptionX{instructor}{\setkeys{lec}{instructor=#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{instructor}{\setkeys{lec}{instructor={#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}}
@@ -258,15 +257,15 @@
%
\newcommand*{\LecType}[1]{\setkeys{lec}{lectype=#1}}
-\newcommand*{\LecTitle}[2][]{\setkeys{lec}{#1,title=#2}}
-\newcommand*{\LecTitleSep}[1]{\setkeys{lec}{titlesep=#1}}
-\newcommand*{\LecSubTitle}[1]{\setkeys{lec}{subtitle=#1}}
+\newcommand*{\LecTitle}[2][]{\setkeys{lec}{#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}}
+\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*{\LecInstructor}[1]{\setkeys{lec}{instructor=#1}}
+\newcommand*{\LecInstructor}[1]{\setkeys{lec}{instructor={#1}}}
\newcommand*{\LecInterval}[1]{\setkeys{lec}{interval=#1}}
@@ -280,12 +279,25 @@
%
-% CUSTOM DATE FORMATS (via datetime)
+% CUSTOM DATE FORMATS (via datetime2)
%
-\newcommand*\lecdateformat{\THEDAY.\,\twodigit{\THEMONTH}.\,\THEYEAR}
-\newcommand*\lecdateshortformat{\THEDAY.\,\twodigit{\THEMONTH}.}
-\newdateformat{vldate}{\lecdateformat}
-\newdateformat{vlshdate}{\lecdateshortformat}
+
+\DTMnewdatestyle{lecdate}{% long date: DD.\,MM.~YYYY
+ \renewcommand*{\DTMdisplaydate}[4]{\DTMtwodigits{##3}.\,\DTMtwodigits{##2}.~##1}%
+ \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}%
+}
+
+\DTMnewdatestyle{lecshortdate}{% short date: DD.\,MM.
+ \renewcommand*{\DTMdisplaydate}[4]{\DTMtwodigits{##3}.\,\DTMtwodigits{##2}.}%
+ \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}%
+}
+
+
+% Internal macro to set the date to a given value
+% Code adapted from advdate.sty
+\newcommand\jslp@SetDate[1][\s@v@dT@d@y]{\edef\d@t@{#1}%
+ \expandafter\t@d@y\d@t@\t@d@y}
+\def\t@d@y#1/#2/#3\t@d@y{\day#1 \month#2 \year#3 \relax}
%
@@ -511,13 +523,13 @@
% 1) Session definition
%
-\define@key{session}{titlesep}{\csdef{@sestitlesep}{#1}}
-\define@key{session}{subtitle}{\csdef{@vasutitle}{#1}}
-\define@key{session}{shorttitle}{\csdef{@vashorttitle}{#1}}
+\define@key{session}{titlesep}{\csdef{@sestitlesep}{{#1}}}
+\define@key{session}{subtitle}{\csdef{@vasutitle}{{#1}}}
+\define@key{session}{shorttitle}{\csdef{@vashorttitle}{{#1}}}
\define@key{session}{bibsec}{\csdef{@sesbibsec}{#1}}
-\define@key{session}{room}{\csdef{@sesroom}{#1}}
-\define@key{session}{instructor}{\csdef{@sesinstructor}{#1}}
-\define@key{session}{presstudents}{\csdef{@sespresstudents}{#1}}
+\define@key{session}{room}{\csdef{@sesroom}{{#1}}}
+\define@key{session}{instructor}{\csdef{@sesinstructor}{{#1}}}
+\define@key{session}{presstudents}{\csdef{@sespresstudents}{{#1}}}
\define@boolkey{session}{cancel}[true]{}
%
\newcommand*\NewSession[2][]{%
@@ -542,11 +554,11 @@
\setkeys{session}{#1}
\csdef{@sestitle}{#2}
\protected@csxdef{sesdate\thesnum}{%
- \bgroup\ifx\lecstartdate\empty\else\SetDate[\lecstartdate]\fi%
- \AdvanceDate[\thedateratio]\vldate\today\egroup}
+ \bgroup\ifx\lecstartdate\empty\else\jslp@SetDate[\lecstartdate]\fi%
+ \DTMsetdatestyle{lecdate}\DTMdate{\year-\month-\day+\thedateratio}\egroup}
\protected@csxdef{sesshortdate\thesnum}{%
- \bgroup\ifx\lecstartdate\empty\else\SetDate[\lecstartdate]\fi%
- \AdvanceDate[\thedateratio]\vlshdate\today\egroup}
+ \bgroup\ifx\lecstartdate\empty\else\jslp@SetDate[\lecstartdate]\fi%
+ \DTMsetdatestyle{lecshortdate}\DTMdate{\year-\month-\day+\thedateratio}\egroup}
\protected@csxdef{sestitle\thesnum}{\csuse{@sestitle}\ifcsempty{@sestitle}{\strut}{}}
\protected@csxdef{sestitlesep\thesnum}{\csuse{@sestitlesep}}
\protected@csxdef{sessubtitle\thesnum}{\csuse{@vasutitle}}
@@ -605,8 +617,8 @@
\setkeys{break}{units=#1}%
}
\newcommand*\SetBreaks[2][units=1]{%
- \csdef{@breakunits}{\empty}
- \csdef{@breakspan}{\empty}
+ \csdef{@breakunits}{}
+ \csdef{@breakspan}{}
\setkeys{break}{#1}
\setcounter{breakunits}{\csuse{@breakunits}}
\setcounter{sesunit}{\thesesunit+\thebreakunits}
@@ -621,13 +633,13 @@
}{}
\stepcounter{loopcounter}
\repeat
- \ifx\empty\csuse{@breakspan}
+ \ifcsempty{@breakspan}{%
\protected@eappto\programlist{\noexpand\begin{center} (#2) \noexpand\end{center}}
\protected@eappto\programlistbeamer{\noexpand\begin{center} (#2) \noexpand\end{center}}
- \else
+ }{%
\protected@eappto\programlist{\noexpand\begin{center} (\csuse{@breakspan}: #2) \noexpand\end{center}}
\protected@eappto\programlistbeamer{\noexpand\begin{center} (\csuse{@breakspan}: #2) \noexpand\end{center}}
- \fi
+ }
}
% Offset in days
@@ -923,6 +935,10 @@
%
%%%%%%%%%%%%%
+%
+% DEPRECATED THINGS
+%
+
% Reset to today
% DEPRECATED as of v.0.8,
\newcommand*\ResetDate{%
@@ -930,4 +946,22 @@
\protect\ResetDate\space is deprecated (not needed anymore).}%
}
+% datetime (v.1) date formats
+% DEPRECATED as of v.1.3
+% Issue a warning if redefined.
+\newcommand*\lecdateformat{}
+\newcommand*\lecdateshortformat{}
+\AtEndPreamble{%
+ \ifcsempty{lecdateformat}{}{
+ \PackageWarning{jslectureplanner}{\protect\lecdateformat\space is deprecated and non-functional.\MessageBreak
+ Please refer to the manual for the new way of customizing date output.
+ }
+ }
+ \ifcsempty{lecdateshortformat}{}{
+ \PackageWarning{jslectureplanner}{\protect\lecdateshortformat\space is deprecated and non-functional.\MessageBreak
+ Please refer to the manual for the new way of customizing date output.
+ }
+ }
+}
+
% Finis
diff --git a/Master/texmf-dist/tex/latex/jslectureplanner/jsmembertable.sty b/Master/texmf-dist/tex/latex/jslectureplanner/jsmembertable.sty
index 82f0eb053d5..da3ab9364e2 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{2015/07/15}
-\def\fileversion{1.1}
+\def\filedate{2016/08/31}
+\def\fileversion{1.3}
\def\filename{jsmembertable.sty}
\NeedsTeXFormat{LaTeX2e}