diff options
author | Karl Berry <karl@freefriends.org> | 2016-08-31 22:47:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-08-31 22:47:47 +0000 |
commit | 59fe7990216c0d13eb0e9797c7dc563d2f1705b5 (patch) | |
tree | 75ab31dad47d808008a03a860422180859317e05 /Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.tex | |
parent | 81ee5e54df53e5bb20be20bfefae95dd1e9815ef (diff) |
jslectureplanner (31aug16)
git-svn-id: svn://tug.org/texlive/trunk@41965 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.tex | 62 |
1 files changed, 45 insertions, 17 deletions
diff --git a/Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.tex b/Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.tex index c07e23a32c2..200bb441ebc 100644 --- a/Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.tex +++ b/Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.tex @@ -69,7 +69,7 @@ \author{Jürgen Spitzmüller% \thanks{Please report issues via \protect\url{https://github.com/jspitz/jslectureplanner}.}} -\date{Version 1.2, 2016/05/11} +\date{Version 1.3, 2016/08/31} \maketitle @@ -129,14 +129,13 @@ This is described later in this manual. The following packages are required and loaded by \jslp: \begin{itemize} \setlength\itemsep{2pt} - \item \textsf{advdate} \item \textsf{calc} - \item \textsf{datetime} + \item \textsf{datetime2} \item \textsf{etoolbox} \item \textsf{ifthen} \item \textsf{xkeyval} \end{itemize} - +\pagebreak \section{General idea} @@ -713,20 +712,40 @@ Thus, you could add a new term type ``spring term'' via \item \jcsmacro{DefSemType\{st\}\{ST\}\{Spring Term\}} \end{itemize} -\subsection{Customizing the date format} +\subsection{Customizing the date format}\label{sec:custdate} -If you need to change the date format, redefine the macros \jcsmacro{lecdateformat} -(for the long format) and \jcsmacro{lecdateshortformat} -(for the short format), using the syntax provided by the \textsf{datetime} +If you need to change the date format, redefine the date styles \textsf{lecdate} +(for the long format) and \textsf{lecshortdate} (for the short format), +using the syntax provided by the \textsf{datetime2} package. By default, the two formats are defined as follows: -\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single] -\newcommand*\lecdateformat{% - \THEDAY.\,\twodigit{\THEMONTH}.\,\THEYEAR} -\newcommand*\lecdateshortformat{% - \THEDAY.\,\twodigit{\THEMONTH}.} +\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,moretexcs={[1]{DTMnewdatestyle}}] +\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}% +} +\end{lstlisting} +\jfcsmacro{DTMtwodigits\{\#\#3\}} represents the day of the month (producing always two digits, i.\,e., \emph{01} not \emph{1}), \jfcsmacro{DTMtwodigits\{\#\#2\}} represents the month (also in two-digit form) and \jfmacro{\#\#1} represents the year. Please refer to the \textsf{datetime2} manual for details. + +If you want to redefine the styles, use \jfcsmacro{DTMrenewdatestyle} and change the definition accordingly. For instance, to get the typical American English date formats \emph{MM/DD/YYYY} and \emph{Month, DD}, redefine the formats as follows: + +\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,moretexcs={[1]{DTMrenewdatestyle}}] +\DTMrenewdatestyle{lecdate}{% long date: MM/DD/YYYY +\renewcommand*{\DTMdisplaydate}[4]{\DTMtwodigits{##2}/\DTMtwodigits{##3}/##1}% +} + +\DTMrenewdatestyle{lecshortdate}{% short date: Month, DD +\renewcommand*{\DTMdisplaydate}[4]{\DTMenglishmonthname{##2}, ##3}% +} \end{lstlisting} -Use \jfcsmacro{renewcommand*} to redefine them. +Note that it is not necessary to include the \jfcsmacro{DTMDisplaydate} redefinition in the date format redefinition (since it does never change here). Note further that the macro \jfcsmacro{DTMenglishmonthname} used in the short date redefinition requires the \textsf{datetime2-english} module to be loaded (see \textsf{datetime2} manual for details). + +Note, finally, that the date redefinition syntax used up to \jslp\ 1.2 is no longer supported, since it relied on the \textsf{datetime} package, which is deprecated (and superseded by \textsf{datetime2}). The \jslp\ package will issue a warning if you try to use the old syntax. \subsection{Misc. customizing} @@ -749,7 +768,7 @@ The indentation used in program lists can be changed by redefining \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single] \newcommand*\lecprogramlistindent{\textbf{88.\,88.}} \end{lstlisting} -Again, use \jfcsmacro{renewcommand{*}} for the redefinitions. +Use \jfcsmacro{renewcommand{*}} for the redefinitions. \subsection{Using styles}\label{sec:styles} @@ -1002,6 +1021,15 @@ the \jslp\ style files. Thanks, Dominik. \section{Release History} \begin{itemize} +\item 2016/08/31 (v. 1.3): + \begin{itemize} + \item \textbf{Backwards-incompatible change!} Use \textsf{datetime2} instead of \textsf{datetime} and \textsf{advdate}. + This changes the interface to set the lecture date format. See sec.~\ref{sec:custdate}. + \item Fix output of \jcsmacro{SetBreaks} when no \joption{span} argument is given. + \item Protect content of some \jcsmacro{Lec}* macros and options to allow for commas in + titles etc. + \item Microtypographic improvement in default definition of the lecture date format. + \end{itemize} \item 2016/05/11 (v. 1.2): \begin{itemize} \item Fix line breaking with empty session titles before course breaks. @@ -1013,7 +1041,7 @@ the \jslp\ style files. Thanks, Dominik. \item \jcsmacro{AdjSessionTitle} \item \jcsmacro{AdjSessionShortDate} \item \jcsmacro{AdjSessionRoom} - \item \jcsmacro{AdjSessionInstructor} + \item \jcsmacro{AdjSessionInstructor}\enlargethispage{\baselineskip} \item \jcsmacro{AdjSessionPresStudents} \end{itemize} \end{itemize} @@ -1025,7 +1053,7 @@ the \jslp\ style files. Thanks, Dominik. \jcsmacro{makebeamerpreslist}, \jcsmacro{setfirstpressession} and \jcsmacro{setlastpressession}. \item Major revision of the manual. - \end{itemize}\filbreak + \end{itemize} \item 2015/07/07 (v. 1.0.2): \begin{itemize} \item Permit \jcsmacro{LecType} and \jcsmacro{LecYear} in the document body again |