From 59ec3703e8068266ab208e8c512cc16a0105a229 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 27 Feb 2015 22:46:08 +0000 Subject: jslectureplanner (27feb15) git-svn-id: svn://tug.org/texlive/trunk@36395 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/jslectureplanner/README | 24 +- .../latex/jslectureplanner/jslectureplanner.pdf | Bin 116569 -> 119854 bytes .../latex/jslectureplanner/jslectureplanner.tex | 188 +++++++++----- .../tex/latex/jslectureplanner/cologne.lps | 33 +++ .../tex/latex/jslectureplanner/german-default.lps | 20 +- .../latex/jslectureplanner/jslectureplanner.sty | 270 ++++++++++++--------- 6 files changed, 352 insertions(+), 183 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/jslectureplanner/cologne.lps diff --git a/Master/texmf-dist/doc/latex/jslectureplanner/README b/Master/texmf-dist/doc/latex/jslectureplanner/README index 626e6e34fd6..4fd16bd10f5 100644 --- a/Master/texmf-dist/doc/latex/jslectureplanner/README +++ b/Master/texmf-dist/doc/latex/jslectureplanner/README @@ -29,7 +29,8 @@ bibliography via biblatex. The package consists of the following files: * jslectureplanner.sty (the LaTeX package) -* german-default.lps (German style file) +* german-default.lps (German 'model' style file with default settings) +* cologne.lps (German style file attempted at the Univ. of Cologne) * jslectureplanner.pdf (package documentation) * jslectureplanner.tex (documentation source) * README (this very file) @@ -59,8 +60,27 @@ instructions; also have a look at the example files. == CHANGES == +* V. 1.0.1 (2015-02-27): - Fix a regression introduced by v. 1.0 (\leccancel not properly + expanded). + +* V. 1.0 (2015-02-27): - Lecture types and term types are not hardcoded anymore and can + be freely modified and extended via \DefLecType and \DefSemType. + - Add option to add the instructor's name to both the course + (via \LecInstructor or 'instructor' package option) and to + specific sessions (via 'instructor' option of \NewSession). + - Add option to add names of presenting students to a session + (via 'presstudents' option). + - Add option to record the office number (\SetOfficeNumber + or 'officenumber' package option) [github issue #3]. + - Add option to automatically shift all subsequent sessions by + a certain value after every nth session (\SetAutoOffset). + [github issue #2] + - Fix expansion issue in 'options' option of + \makebeamerprogram. + - Add 'cologne' style file. + * V. 0.9 (2015-02-08): - Add a way to adjust the interval between two sessions - ('interval' package option and \LecInternal macro). + ('interval' package option and \LecInterval macro). - Add a way to shift session dates from the regular interval (\SetLecOffset). - Rename option 'weeks' of the \SetBreaks macro to 'units' diff --git a/Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.pdf b/Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.pdf index cb69d62a530..894df05da19 100644 Binary files a/Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.pdf and b/Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.pdf differ diff --git a/Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.tex b/Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.tex index eace8e47c81..5d12a545f24 100644 --- a/Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.tex +++ b/Master/texmf-dist/doc/latex/jslectureplanner/jslectureplanner.tex @@ -29,7 +29,7 @@ \author{Jürgen Spitzmüller% \thanks{Please report issues via \protect\url{https://github.com/jspitz/jslectureplanner}.}} -\date{Version 0.9, 2015/02/08} +\date{Version 1.0.1, 2015/02/27} \maketitle @@ -59,9 +59,9 @@ Since the package was written for my own needs, it is somewhat tied to my workflow. Particularly, it is tied to my context: teaching in the Humanities at a German-speaking university. Hence, the categorization of the package draws on this context. In particular, all strings and -formats are German. However, it is possible to customize them to some -degree, particularly to translate them to other languages. This is -described later in this manual. +formats are German. However, it is possible add new categories as well as +to customize and translate the strings. +This is described later in this manual. This manual describes the basic user interface of the package. Please also refer to the example files included in the package in order to @@ -107,13 +107,13 @@ or via specific macros (see sec.~\ref{sec:via-macros}). \subsubsection{Course classification\label{sec:lecture-classification}} -The course classification draws on the conventions at German universities +The default course classification draws on the conventions at German universities (or those where I have worked, for that matter). Each type is connected to a verbose string (such as ``Seminar''), a short form (such as ``SE'') and a form that is used to denote individual sessions (as in ``the second \emph{session} of this course''). \begin{description} -\item [{type=}] Defines the course type. Possible values: +\item [{type=}] Defines the course type. Preset values: \begin{itemize} \item \joption{vl}: A lecture (verbose form: ``Vorlesung''\footnote{Sec.~\ref{sec:customizing-strings} @@ -129,6 +129,9 @@ form: ``UE'', session form: ``Sitzung'') \item \joption{pv}: Research seminar (verbose form: ``Privatissimum'', short form: ``PV'', session form: ``Sitzung'') \end{itemize} + +Sec.~\ref{sec:customizing-strings} explains how to customize and extend this list. +Also cf. sec.~\ref{sec:styles} on the concept of ``styles''. \end{description} \subsubsection{Course title} @@ -149,6 +152,9 @@ short form: ``PV'', session form: ``Sitzung'') \item \joption{ss}: Summer term (``Sommersemester'', short form: ``SoSe'') \item \joption{ws}: Winter term (``Wintersemester'', short form: ``WS'') \end{itemize} +Sec.~\ref{sec:customizing-strings} explains how to customize and extend this list. +Also cf. sec.~\ref{sec:styles}. + \item [{year=}]~ \item [{uni=}]~ \item [{institute=}]~ @@ -161,13 +167,15 @@ must} have the form DD/MM/YYYY). If no startdate is given, \jfcsmacro{today} is \subsubsection{Additional information} \begin{description} +\item [{instructor=}] Instructor's name \item [{platform=}] Information (e.\,g., URL) of the e-learning platform \item [{officehours=}] Date of your office hours +\item [{officenumber=}] Your office number \end{description} \subsection{Via macros\label{sec:via-macros}} -The following macros provide an alternative interface to set up the course metadata. +The following macros provide an alternative way to set up the course metadata. \subsubsection{Course classification} \begin{itemize} @@ -189,8 +197,8 @@ description.} \begin{itemize} \item \jcsmacro{LecTitle[]\{\}}: Record course title and options; \joption{<package options>} might be any set of package options described -in sec.~\ref{sub:package-options} (except for \joption{title} itself), -so this macro can actually be used to record all metadata. +in sec.~\ref{sub:package-options}, so this macro can actually be used to record +all metadata. \item \jcsmacro{LecTitleSep\{<title separator>\}}: Specify course title-subtitle separator (e.\,g., ``. '' or `` -- '') \item \jcsmacro{LecSubTitle\{<subtitle>\}}: Record course subtitle @@ -198,7 +206,7 @@ title-subtitle separator (e.\,g., ``. '' or `` -- '') \subsubsection{Date and place} \begin{itemize} -\item \textbackslash{}\jmacro{LecYear\{<term>\}\{<year>\}}, Record term and +\item \jcsmacro{LecYear\{<term>\}\{<year>\}}, Record term and year of the course; \joption{<term>} is one of\footnote{See above sec.~\ref{sec:date-and-place} for a detailed description.} @@ -216,17 +224,23 @@ your university the first session (argument\emph{ must} have the form DD/MM/YYYY) \item \jcsmacro{LecInterval\{<interval>\}}: Adjust the interval (in days) between two sessions. The preset interval is 7 (=~weekly courses). +\item \jcsmacro{SetAutoOffset\{<n>\}\{<days>\}}: Automatically shift all subsequent sessions + by <days> extra days after every <n>th session. This is useful if you have each week + two regular sessions and then a pause until the next week (for instance, a Tuesday + + Thursday course could be defined via \jcsmacro{LecInterval\{2\}} and + \jcsmacro{SetAutoOffset\{2\}\{3\}}). <n> must be a positive integer, <days> can + also be a negative integer value. \end{itemize} \subsubsection{Additional information} \begin{itemize} +\item \jcsmacro{LecInstructor\{<name>\}}: Record the instructor's name \item \jcsmacro{SetOfficeHours\{<office hours>\}}: Record date of your office hours +\item \jcsmacro{SetOfficeNumber\{<office number>\}}: Record your office number \item \jcsmacro{SetPlatform\{<platform information>\}}: Record information (e.\,g., URL) of the e-learning platform \end{itemize} -\clearpage - \section{Setting up a course schedule\label{sec:lecplan}} In the metadata file, you can set up a schedule for the course by entering @@ -241,8 +255,11 @@ Valid \joption{<options>}: \item \joption{titlesep=<separator>}: Separator between session title and subtitle \item \joption{subtitle=<subtitle>}: Subtitle of the session -\item \joption{shorttitle=<shorttitle>}: Short title of the session (for +\item \joption{shorttitle=<shorttitle>}: Short title (for headings etc.) +\item \joption{instructor=<name>}: Specific instructor for this session + (if it differs from the usual course instructor) +\item \joption{presstudents=<names>}: Students presenting in this session \item \joption{room=<room>}: Specific room for this session (if it differs from the usual course room) \item \joption{bibsec=<keyword>}: Session keyword for the bibliography @@ -344,10 +361,9 @@ verbose form (e.\,g., ``Seminar'') course \item \jcsmacro{lectitlesep}: Outputs the separator between title and subtitle -\item \jcsmacro{lecsubtitle}: Outputs the subtitle of the -course -\item \jcsmacro{lecfulltitle}: Outputs the full title of -the course (title, separator, subtitle) +\item \jcsmacro{lecsubtitle}: Outputs the subtitle of the course +\item \jcsmacro{lecfulltitle}: Outputs the course's full title + (title, separator, subtitle) \item \jcsmacro{lecshorttitle}: Outputs the short version of the course title \item \jcsmacro{lecsemshort}: Outputs the short version of @@ -361,17 +377,18 @@ the semester (e.\,g., ``WS 2014'') of the semester (e.\,g., ``Wintersemester 2014'') \item \jcsmacro{lecuniversity}: Outputs the university's name \item \jcsmacro{lecinstitute}: Outputs the institute's name +\item \jcsmacro{lecinstructor}: Outputs the instructor's name \item \jcsmacro{lecroom}: Outputs the course room \item \jcsmacro{lecplatform}: Outputs information on the e-learning platform \item \jcsmacro{officehours}: Outputs the office hours +\item \jcsmacro{officenumber}: Outputs the office number \end{itemize} \subsection{Generating course programs} \label{sec:lecprog} \begin{itemize} -\item \jcsmacro{makeprogram}: Generates a course program -from the metadata in the form +\item \jcsmacro{makeprogram}: Generates a course program in the form: \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single] @@ -411,7 +428,9 @@ a beamer-suited lecture program from the metadata in the form \joption{<options>} can be one of \begin{itemize} \item \joption{title=<title>}: Program title (<Heading>) -\item \joption{options=<bfoptions>}: Beamer frame options +\item \joption{options=<bfoptions>}: Beamer frame options. Note that yey-value + beamer frame options need to be embraced, as in\\ + \jcsmacro{makebeamerprogram[options=\{shrink=10\}]} \end{itemize} Note that multiple subsequent frames are generated if the metadata @@ -475,6 +494,8 @@ the current session \item \jcsmacro{sessubtitle}: Subtitle of the current session \item \jcsmacro{sesfulltitle}: Full title of the current session (title, separator, subtitle) +\item \jcsmacro{sesinstructor}: Current session's instructor's name +\item \jcsmacro{sespresstudents}: Students presenting in this session \item \jcsmacro{sesnr}: Number of the current session \item \jcsmacro{sesroom}: Room of the current session \end{itemize} @@ -495,6 +516,10 @@ title of session number \joption{<nr>} session number \joption{<nr>} \item \jcsmacro{SessionShortDate\{<nr>\}}: Outputs the short date (no year) of session number \joption{<nr>} +\item \jcsmacro{SessionInstructor\{<nr>\}}: Outputs the name of the instructor of session +number \joption{<nr>} +\item \jcsmacro{SessionPresStudents\{<nr>\}}: Outputs the name of the students presenting +in session number \joption{<nr>} \item \jcsmacro{SessionRoom\{<nr>\}}: Outputs the room of session number \joption{<nr>} \item \jcsmacro{MakeProgramline\{<nr>\}}: Outputs a list item line for session number \joption{<nr>} in the form @@ -511,33 +536,37 @@ item line for session number \joption{<nr>} in the form \section{Customizing the output}\label{sec:customizing-strings} -\subsection{Customizing the course type strings} +\subsection{Defining and customizing course types} -The strings of the course types can be changed via the macros: +The following macro allows to define new course types and redefine existing ones: \begin{itemize} -\item \jcsmacro{DefTypeVL\{<short form>\}\{<title>\}\{<session title>\}} -\item \jcsmacro{DefTypePS\{<short form>\}\{<title>\}\{<session title>\}} -\item \jcsmacro{DefTypeSE\{<short form>\}\{<title>\}\{<session title>\}} -\item \jcsmacro{DefTypeUE\{<short form>\}\{<title>\}\{<session title>\}} -\item \jcsmacro{DefTypeKO\{<short form>\}\{<title>\}\{<session title>\}} -\item \jcsmacro{DefTypePV\{<short form>\}\{<title>\}\{<session title>\}} +\item \jcsmacro{DefLecType\{<key>\}\{<short form>\}\{<title>\}\{<session title>\}} \end{itemize} -An English form for a lecture, thus, can be achieved by e.\,g. +A new type, say summer school, thus, could be defined as follows: \begin{itemize} -\item \jcsmacro{DefTypeVL\{LEC\}\{Lecture\}\{Session\}} +\item \jcsmacro{DefLecType\{ss\}\{SS\}\{Summer School\}\{Session\}} \end{itemize} -The types themselves are hardcoded. If you need further\slash{}other -types, you need to modify the package (or ask me to do it). +This could then be set via \jcsmacro{LecType\{ss\}} or the package option +\joption{type=ss}, respectively. + +Likewise, you can use the macro to redefine existing styles, e.\,g. change +the ``session'' string of type \joption{vl} via +\begin{itemize} +\item \jcsmacro{DefLecType\{vl\}\{VL\}\{Vorlesung\}\{Einheit\}} +\end{itemize} +If you need to change or add types, consider the use of styles +(see sec.~\ref{sec:styles}). -\subsection{Customizing the term types} +\subsection{Defining and customizing term types} -The strings of the term types can be changed via the macros: +The available term (semester) types can be changed and extended via the macro: +\begin{itemize} +\item \jcsmacro{DefSemType\{<key>\}\{<short form>\}\{<verbose form>\}} +\end{itemize} +Thus, you could add a new term type ``spring term'' via \begin{itemize} -\item \jcsmacro{DefTypeFS\{<short form>\}\{<verbose form>\}} -\item \jcsmacro{DefTypeHS\{<short form>\}\{<verbose form>\}} -\item \jcsmacro{DefTypeSS\{<short form>\}\{<verbose form>\}} -\item \jcsmacro{DefTypeWS\{<short form>\}\{<verbose form>\}} +\item \jcsmacro{DefSemType\{st\}\{ST\}\{Spring Term\}} \end{itemize} \subsection{Customizing the date format} @@ -555,7 +584,7 @@ package. By default, the two formats are defined as follows: \end{lstlisting} -Use \jfmacro{\textbackslash{}renewcommand{*}} to redefine them. +Use \jfcsmacro{renewcommand*} to redefine them. \subsection{Misc. customizing} @@ -588,14 +617,26 @@ Again, use \jfcsmacro{renewcommand{*}} to redefine those. -\subsection{Using styles} +\subsection{Using styles}\label{sec:styles} The most elegant way to do the customizing is to use \emph{lecture planner style} (*.lps) files. These files can be loaded via the \joption{style=<style>} package option, where <style> is the file name without *.lps extension. -Currently, the package ships only one style, \emph{german-default}, which includes the default -strings. This one can be used as a model. If you provide me with other style files, in particular +Currently, the package ships two styles: +\begin{enumerate} + \item \joption{german-default} simply includes the default strings. + This style is meant to be used as a model for new styles. +\item \joption{cologne} provides some specifics current at the University of Cologne + (\emph{Universität zu Köln}): + \begin{itemize} + \item Additional course types: \joption{ak} (AK, \emph{Arbeitskurs}), + \joption{as} (AS, \emph{Aufbauseminar}), \joption{es} (ES, \emph{Einführungsseminar}), + \joption{evl} (EVL, \emph{Einführungsvorlesung}), \joption{hs} (HS, \emph{Hauptseminar}). + \end{itemize} + +\end{enumerate} +If you provide me with other style files, in particular translations to other languages than German (but also other university conventions), I consider them for inclusion to the package. @@ -603,19 +644,56 @@ them for inclusion to the package. \section{History} \begin{itemize} -\item 2015/02/08 (v. 0.9): Add a way to adjust the interval between two sessions - (\joption{interval} package option and \jcsmacro{LecInternal} macro); add a way to shift - session dates from the regular interval (\jcsmacro{SetLecOffset}); rename option \joption{weeks} - of the \jcsmacro{SetBreaks} macro to \joption{units} (\joption{weeks} still works, but is - marked deprecated). -\item 2015/01/17 (v. 0.8): Fix corruption of \jfcsmacro{today}; - add framework for different styles; - add option and macro to set a room for the course as well as a session-specific room; - remove redundant lecture type \joption{vo} from the documentation; - change \jcsmacro{leccancel} default definition in favour of better translatability. -\item 2015/01/04 (v. 0.7): Add macro for resetting \jfcsmacro{today}; minor corrections in the manual. -\item 2014/12/12 (v. 0.6\,b): Minor corrections in the manual and example files. -\item 2014/12/12 (v. 0.6): Initial release to CTAN. +\item 2015/02/27 (v.\,1.0.1): + \begin{itemize} + \item Fix a regression introduced by v. 1.0 (\jcsmacro{leccancel} + was not properly expanded). + \end{itemize} +\item 2015/02/27 (v.\,1.0): + \begin{itemize} + \item Lecture types and term types are not hardcoded anymore and can be freely + modified and extended via \jcsmacro{DefLecType} and \jcsmacro{DefSemType}. + \item Add option to add the instructor's name to both the course (via + \jcsmacro{LecInstructor} or \joption{instructor} package option) and + to specific sessions (via \joption{instructor} option of + \jcsmacro{NewSession}). + \item Add option to add names of presenting students to a session (via + \joption{presstudents} option). + \item Add option to record the office number (\jcsmacro{SetOfficeNumber} + or package option \joption{officenumber}). + \item Fix expansion issue in \joption{options} option of \jcsmacro{makebeamerprogram}. + \item Add option to automatically shift all subsequent sessions by a certain value + after every \emph{n}th session (\jcsmacro{SetAutoOffset}). + \item Add \joption{cologne} style file. + \end{itemize} +\item 2015/02/08 (v. 0.9): + \begin{itemize} + \item Add a way to adjust the interval between two sessions + (\joption{interval} package option and \jcsmacro{LecInterval} macro). + \item Add a way to shift session dates from the regular interval + (macro \jcsmacro{SetLecOffset}). + \item Add option and macro to set a room for the course as well as + a session-specific room. + \item Rename option \joption{weeks} of the \jcsmacro{SetBreaks} macro + to \joption{units} (\joption{weeks} still works, but is marked deprecated). + \end{itemize} +\item 2015/01/17 (v.\,0.8): + \begin{itemize} + \item Fix corruption of \jfcsmacro{today}. + \item Add framework for different styles. + \item Add option and macro to set a room for the course as well as + a session-specific room. + \item Remove redundant lecture type \joption{vo} from the documentation. + \item Change \jcsmacro{leccancel} default definition in favour of better + translatability. + \end{itemize}\filbreak +\item 2015/01/04 (v.\,0.7): + \begin{itemize} + \item Add macro for resetting \jfcsmacro{today}. + \item Minor corrections in the manual. + \end{itemize} +\item 2014/12/12 (v.\,0.6\,b): Minor corrections in the manual and example files. +\item 2014/12/12 (v.\,0.6): Initial release to CTAN. \end{itemize} \end{document} diff --git a/Master/texmf-dist/tex/latex/jslectureplanner/cologne.lps b/Master/texmf-dist/tex/latex/jslectureplanner/cologne.lps new file mode 100644 index 00000000000..729dffa1001 --- /dev/null +++ b/Master/texmf-dist/tex/latex/jslectureplanner/cologne.lps @@ -0,0 +1,33 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% File cologne.lps +%% +%% University of Cologne style for lecture planning +%% +%% This file is part of the jslectureplanner package. +%% +%% Author: Juergen Spitzmueller <juergen.spitzmueller@univie.ac.at> +%% +%% 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. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Juergen Spitzmueller. +%% +%% Code repository and issue tracker: https://github.com/jspitz/jslectureplanner +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Additional lecture types +\DefLecType{evl}{EVL}{Einf\"uhrungsvorlesung}{Vorlesung}% introductory lecture +\DefLecType{es}{ES}{Einf\"uhrungsseminar}{Sitzung}% undergraduate seminar +\DefLecType{as}{AS}{Aufbauseminar}{Sitzung}% seminar +\DefLecType{hs}{HS}{Hauptseminar}{Sitzung}% postgraduate seminar +\DefLecType{ak}{AK}{Arbeitskurs}{Sitzung}% practical course + +% Finis diff --git a/Master/texmf-dist/tex/latex/jslectureplanner/german-default.lps b/Master/texmf-dist/tex/latex/jslectureplanner/german-default.lps index e7318a054fd..7252eae826e 100644 --- a/Master/texmf-dist/tex/latex/jslectureplanner/german-default.lps +++ b/Master/texmf-dist/tex/latex/jslectureplanner/german-default.lps @@ -24,18 +24,18 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Lecture types -\DefTypeVL{VL}{Vorlesung}{Vorlesung}% lecture -\DefTypePS{PS}{Proseminar}{Sitzung}% undergraduate seminar -\DefTypeSE{SE}{Seminar}{Sitzung}% seminar -\DefTypeUE{UE}{\"Ubung}{Sitzung}% practical course -\DefTypeKO{KO}{Kolloquium}{Sitzung}% colloquium -\DefTypePV{PV}{Privatissimum}{Sitzung}% research seminar +\DefLecType{vl}{VL}{Vorlesung}{Vorlesung}% lecture +\DefLecType{ps}{PS}{Proseminar}{Sitzung}% undergraduate seminar +\DefLecType{se}{SE}{Seminar}{Sitzung}% seminar +\DefLecType{ue}{UE}{\"Ubung}{Sitzung}% practical course +\DefLecType{ko}{KO}{Kolloquium}{Sitzung}% colloquium +\DefLecType{pv}{PV}{Privatissimum}{Sitzung}% research seminar % Term types -\DefTypeFS{FS}{Fr\"ujahrssemester}% spring term -\DefTypeHS{HS}{Herbstsemester}% fall term -\DefTypeSS{SoSe}{Sommersemester}% summer term -\DefTypeWS{WS}{Wintersemester}% winter term +\DefSemType{fs}{FS}{Fr\"ujahrssemester}% spring term +\DefSemType{hs}{HS}{Herbstsemester}% fall term +\DefSemType{ss}{SoSe}{Sommersemester}% summer term +\DefSemType{ws}{WS}{Wintersemester}% winter term % Date formats \renewcommand*\lecdateformat{% diff --git a/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty b/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty index b47a48a00c4..4cc723ca8d4 100644 --- a/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty +++ b/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty @@ -21,8 +21,8 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\def\filedate{2015/02/08} -\def\fileversion{0.9} +\def\filedate{2015/02/27} +\def\fileversion{1.0.1} \def\filename{jslectureplanner.sty} \NeedsTeXFormat{LaTeX2e} @@ -59,8 +59,10 @@ \def\lecinstitute{} \def\lecroom{} \def\lecstartdate{} +\def\lecinstructor{} \def\lecplatform{} +\def\officenumber{} \def\officehours{} \def\sesdate{} @@ -82,49 +84,49 @@ % 1) Course types % % vl -\def\lectypevl{Vorlesung} -\def\lectypevls{VL} -\def\lectypevlses{Vorlesung} +\def\lectypeverb@vl{Vorlesung} +\def\lectype@vl{VL} +\def\lectypesession@vl{Vorlesung} % vo (redundant and undocumented; % just kept for historical reasons) -\def\lectypevo{Vorlesung} -\def\lectypevos{VO} -\def\lectypevoses{Vorlesung} +\def\lectypeverb@vo{Vorlesung} +\def\lectype@vo{VO} +\def\lectypesession@vo{Vorlesung} % ps -\def\lectypeps{Proseminar} -\def\lectypepss{PS} -\def\lectypepsses{Sitzung} +\def\lectypeverb@ps{Proseminar} +\def\lectype@ps{PS} +\def\lectypesession@ps{Sitzung} % se -\def\lectypese{Seminar} -\def\lectypeses{SE} -\def\lectypeseses{Sitzung} +\def\lectypeverb@se{Seminar} +\def\lectype@se{SE} +\def\lectypesession@se{Sitzung} % ue -\def\lectypeue{\"Ubung} -\def\lectypeues{UE} -\def\lectypeueses{Sitzung} +\def\lectypeverb@ue{\"Ubung} +\def\lectype@ue{UE} +\def\lectypesession@ue{Sitzung} % ko -\def\lectypeko{Kolloquium} -\def\lectypekos{KO} -\def\lectypekoses{Sitzung} +\def\lectypeverb@ko{Kolloquium} +\def\lectype@ko{KO} +\def\lectypesession@ko{Sitzung} % pv -\def\lectypepv{Privatissimum} -\def\lectypepvs{PV} -\def\lectypepvses{Sitzung} +\def\lectypeverb@pv{Privatissimum} +\def\lectype@pv{PV} +\def\lectypesession@pv{Sitzung} % 2.) Term types % % fs -\def\lectermfs{Fr\"uhjahrssemester} -\def\lectermfss{FS} +\def\lecsemverb@fs{Fr\"uhjahrssemester} +\def\lecsemshort@fs{FS} % hs -\def\lectermhs{Herbstsemester} -\def\lectermhss{HS} +\def\lecsemverb@hs{Herbstsemester} +\def\lecsemshort@hs{HS} % ss -\def\lectermss{Sommersemester} -\def\lectermsss{SoSe} +\def\lecsemverb@ss{Sommersemester} +\def\lecsemshort@ss{SoSe} % ws -\def\lectermws{Wintersemester} -\def\lectermwss{WS} +\def\lecsemverb@ws{Wintersemester} +\def\lecsemshort@ws{WS} % 3.) misc. % @@ -149,62 +151,38 @@ \newcounter{lecinterval} \setcounter{lecinterval}{7} \newcounter{sesoffset} +\newcounter{autooffset} +\newcounter{autooffsettrigger} +\newcounter{autooffsetcounter} +\newcounter{breakunits} +\newcounter{loopcounter} % % PACKAGE OPTIONS % -\define@choicekey*+{lec}{lectype}[\val\nr]{vl,vo,ps,se,ue,ko,pv}{% - \ifcase\nr\relax% vl - \def\lectype{\lectypevls} - \def\lectypeverb{\lectypevl} - \def\lectypesession{\lectypevlses} - \or% vo (redundant and undocumented; just kept for historical reasons) - \def\lectype{\lectypevos} - \def\lectypeverb{\lectypevo} - \def\lectypesession{\lectypevoses} - \or% ps - \def\lectype{\lectypepss} - \def\lectypeverb{\lectypeps} - \def\lectypesession{\lectypepsses} - \or% se - \def\lectype{\lectypeses} - \def\lectypeverb{\lectypese} - \def\lectypesession{\lectypeseses} - \or% ue - \def\lectype{\lectypeues} - \def\lectypeverb{\lectypeue} - \def\lectypesession{\lectypeueses} - \or% ko - \def\lectype{\lectypekos} - \def\lectypeverb{\lectypeko} - \def\lectypesession{\lectypekoses} - \or% pv - \def\lectype{\lectypepvs} - \def\lectypeverb{\lectypepv} - \def\lectypesession{\lectypepvses} - \fi -}{% - \PackageWarning{jslectureplanner}{unknown type value '#1'}% +\define@key{lec}{lectype}{% + \AtEndPreamble{% + \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@choicekey*+{lec}{lecsem}[\val\nr]{fs,hs,ss,ws}{% - \ifcase\nr\relax% fs - \def\lecsemshort{\lectermfss} - \def\lecsemverb{\lectermfs} - \or% hs - \def\lecsemshort{\lectermhss} - \def\lecsemverb{\lectermhs} - \or% ss - \def\lecsemshort{\lectermsss} - \def\lecsemverb{\lectermss} - \or% ws - \def\lecsemshort{\lectermwss} - \def\lecsemverb{\lectermws} - \fi -}{% - \PackageWarning{jslectureplanner}{unknown semester value '#1'}% +\define@key{lec}{lecsem}{% + \AtEndPreamble{% + \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}}% + }% } \DeclareOptionX{semester}{\setkeys{lec}{lecsem=#1}} @@ -217,8 +195,10 @@ \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}{instructor}{\def\lecinstructor{#1}} \define@key{lec}{style}{\AtEndOfPackage{\input{#1.lps}}} \define@key{lec}{interval}{% % test if the input is a number @@ -240,8 +220,10 @@ \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{style}{\setkeys{lec}{style=#1}} \DeclareOptionX{interval}{\setkeys{lec}{interval=#1}} @@ -266,6 +248,7 @@ \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*{\LecInterval}[1]{\setkeys{lec}{interval=#1}} @@ -293,71 +276,66 @@ % 1) Course types % +\newcommand*\DefLecType[4]{% + \csdef{lectype@#1}{#2} + \csdef{lectypeverb@#1}{#3} + \csdef{lectypesession@#1}{#4} +} +% +% Kept for backwards compatibility % vl \newcommand*\DefTypeVL[3]{% - \def\lectypevl{#2} - \def\lectypevls{#1} - \def\lectypevlses{#2} + \DefLecType{vl}{#1}{#2}{#3} } % vo (redundant and undocumented; % just kept for historical reasons) \newcommand*\DefTypeVO[3]{% - \def\lectypevo{#2} - \def\lectypevos{#1} - \def\lectypevoses{#3} + \DefLecType{vo}{#1}{#2}{#3} } % ps \newcommand*\DefTypePS[3]{% - \def\lectypeps{#2} - \def\lectypepss{#1} - \def\lectypepsses{#3} + \DefLecType{ps}{#1}{#2}{#3} } % se \newcommand*\DefTypeSE[3]{% - \def\lectypese{#2} - \def\lectypeses{#1} - \def\lectypeseses{#3} + \DefLecType{se}{#1}{#2}{#3} } % ue \newcommand*\DefTypeUE[3]{% - \def\lectypeue{#2} - \def\lectypeues{#1} - \def\lectypeueses{#3} + \DefLecType{ue}{#1}{#2}{#3} } % ko \newcommand*\DefTypeKO[3]{% - \def\lectypeko{#2} - \def\lectypekos{#1} - \def\lectypekoses{#3} + \DefLecType{ko}{#1}{#2}{#3} } % pv \newcommand*\DefTypePV[3]{% - \def\lectypepv{#2} - \def\lectypepvs{#1} - \def\lectypepvses{#3} + \DefLecType{pv}{#1}{#2}{#3} } % 2.) Term types % +\newcommand*\DefSemType[3]{% + \csdef{lecsemshort@#1}{#2} + \csdef{lecsemverb@#1}{#3} +} +% +% Kept for backwards compatibility % fs \newcommand*\DefTypeFS[2]{% - \def\lectermfss{#1} - \def\lectermfs{#2} + \DefSemType{fs}{#1}{#2} } % hs \newcommand*\DefTypeHS[2]{% - \def\lectermhss{#1} - \def\lectermhs{#2} + \DefSemType{hs}{#1}{#2} } % ss \newcommand*\DefTypeSS[2]{% - \def\lectermsss{#1} - \def\lectermss{#2} + \DefSemType{ss}{#1}{#2} } % ws \newcommand*\DefTypeWS[2]{% - \def\lectermwss{#1} - \def\lectermws{#2} + \DefSemType{ws}{#1}{#2} } @@ -416,7 +394,8 @@ \@ifundefined{programlistbeamerii}{}{% \def\btitleapp{\ (1/\pframes)} \ifcsdef{@bpopts}{% - \begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp} + \begingroup\edef\tempa{\endgroup\noexpand% + \begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa }{% \begin{frame}[label=beamerprogram1]{\csuse{@bptitle}\btitleapp} } @@ -434,7 +413,8 @@ \@ifundefined{programlistbeameriii}{}{% \def\btitleapp{\ (2/\pframes)} \ifcsdef{@bpopts}{% - \begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp} + \begingroup\edef\tempa{\endgroup\noexpand% + \begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa }{% \begin{frame}[label=beamerprogram2]{\csuse{@bptitle}\btitleapp} } @@ -452,7 +432,8 @@ \@ifundefined{programlistbeameriv}{}{% \def\btitleapp{\ (2/\pframes)} \ifcsdef{@bpopts}{% - \begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp} + \begingroup\edef\tempa{\endgroup\noexpand% + \begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa }{% \begin{frame}[label=beamerprogram3]{\csuse{@bptitle}\btitleapp} } @@ -469,7 +450,8 @@ } \ifnumgreater{\thefbreaks}{0}{\def\btitleapp{\ (\pframes/\pframes)}}{} \ifcsdef{@bpopts}{% - \begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp} + \begingroup\edef\tempa{\endgroup\noexpand% + \begin{frame}[\csuse{@bpopts}]{\csuse{@bptitle}\btitleapp}}\tempa }{% \@ifundefined{programlistbeamerii}{% \begin{frame}[label=beamerprogram]{\csuse{@bptitle}\btitleapp} @@ -516,10 +498,18 @@ \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@boolkey{session}{cancel}[true]{} % \newcommand*\NewSession[2][]{% \stepcounter{sesunit} + \ifnumcomp{\value{autooffsettrigger}}{>}{0}{% + \ifnumcomp{\value{autooffsettrigger}}{=}{\value{autooffsetcounter}}{% + \addtocounter{sesoffset}{\theautooffset}% + \setcounter{autooffsetcounter}{1}% + }{\stepcounter{autooffsetcounter}} + }{} \setcounter{dateratio}{(\thesesunit-1)*\thelecinterval+\thesesoffset} \setcounter{snum}{\thesesunit-\thecancellations} \protected@csxdef{sesnr\thesnum}{\thesnum} @@ -528,6 +518,8 @@ \csdef{@vashorttitle}{} \csdef{@sesbibsec}{} \csdef{@sesroom}{\lecroom} + \csdef{@sesinstructor}{\lecinstructor} + \csdef{@sespresstudents}{} \setkeys{session}{cancel=false} \setkeys{session}{#1} \csdef{@sestitle}{#2} @@ -543,14 +535,16 @@ \protected@csxdef{sesshorttitle\thesnum}{\csuse{@vashorttitle}} \protected@csxdef{sesbib\thesnum}{\csuse{@sesbibsec}} \protected@csxdef{sesroom\thesnum}{\csuse{@sesroom}} + \protected@csxdef{sesinstructor\thesnum}{\csuse{@sesinstructor}} + \protected@csxdef{sespresstudents\thesnum}{\csuse{@sespresstudents}} \ifKV@session@cancel \stepcounter{cancellations} \protected@eappto\programlist{\noexpand\item[{\noexpand\bfseries\csuse{sesshortdate\thesnum}}]% \noexpand\bgroup\noexpand\bfseries\csuse{sestitle\thesnum}\csuse{@sestitlesep}\csuse{@vasutitle}% - \leccancel\noexpand\egroup} + \noexpand\leccancel\noexpand\egroup} \protected@eappto\programlistbeamer{\noexpand\item[{\noexpand\bfseries\csuse{sesshortdate\thesnum}}]% \noexpand\bgroup\noexpand\bfseries\csuse{sestitle\thesnum}\csuse{@sestitlesep}\csuse{@vasutitle}% - \leccancel\noexpand\egroup} + \noexpand\leccancel\noexpand\egroup} \else \protected@eappto\programlist{\noexpand\item[{\noexpand\bfseries\csuse{sesshortdate\thesnum}}]% \csuse{sestitle\thesnum}\csuse{@sestitlesep}\csuse{@vasutitle}} @@ -570,6 +564,12 @@ \newcommand*\SetBreak[2][\empty]{% \stepcounter{sesunit} \stepcounter{cancellations} + \ifnumcomp{\value{autooffsettrigger}}{>}{0}{% + \ifnumcomp{\value{autooffsettrigger}}{=}{\value{autooffsetcounter}}{% + \addtocounter{sesoffset}{\theautooffset}% + \setcounter{autooffsetcounter}{1}% + }{\stepcounter{autooffsetcounter}} + }{} \ifx\empty#1 \protected@eappto\programlist{\noexpand\begin{center} (#2) \noexpand\end{center}} \protected@eappto\programlistbeamer{\noexpand\begin{center} (#2) \noexpand\end{center}} @@ -590,8 +590,19 @@ \csdef{@breakunits}{\empty} \csdef{@breakspan}{\empty} \setkeys{break}{#1} - \setcounter{sesunit}{\thesesunit+\csuse{@breakunits}} - \setcounter{cancellations}{\thecancellations+\csuse{@breakunits}} + \setcounter{breakunits}{\csuse{@breakunits}} + \setcounter{sesunit}{\thesesunit+\thebreakunits} + \setcounter{cancellations}{\thecancellations+\thebreakunits} + \setcounter{loopcounter}{0} + \loop\ifnum\theloopcounter<\thebreakunits\relax + \ifnumcomp{\value{autooffsettrigger}}{>}{0}{% + \ifnumcomp{\value{autooffsettrigger}}{=}{\value{autooffsetcounter}}{% + \addtocounter{sesoffset}{\theautooffset}% + \setcounter{autooffsetcounter}{1}% + }{\stepcounter{autooffsetcounter}} + }{} + \stepcounter{loopcounter} + \repeat \ifx\empty\csuse{@breakspan} \protected@eappto\programlist{\noexpand\begin{center} (#2) \noexpand\end{center}} \protected@eappto\programlistbeamer{\noexpand\begin{center} (#2) \noexpand\end{center}} @@ -606,6 +617,12 @@ \addtocounter{sesoffset}{#1} } +% Automatic Offset after n sessions +\newcommand*\SetAutoOffset[2]{% + \setcounter{autooffsettrigger}{#1} + \setcounter{autooffset}{#2} +} + % 3) Definition of thematic blocks % \newcommand*\StartBlock[1]{% @@ -659,6 +676,11 @@ \def\officehours{#1}% } +% Office number +\newcommand\SetOfficeNumber[1]{% + \def\officenumber{#1}% +} + % (E-learning) platform \newcommand\SetPlatform[1]{% \def\lecplatform{#1}% @@ -679,6 +701,8 @@ \gdef\sesshorttitle{\csuse{sesshorttitle#1}}% \gdef\sessubtitle{\csuse{sessubtitle#1}}% \gdef\sesroom{\csuse{sesroom#1}}% + \gdef\sesinstructor{\csuse{sesinstructor#1}}% + \gdef\sespresstudents{\csuse{sespresstudents#1}}% } % Define a local session @@ -692,6 +716,8 @@ \gdef\lsesshorttitle{\csuse{sesshorttitle#1}}% \gdef\lsessubtitle{\csuse{sessubtitle#1}}% \gdef\lsesroom{\csuse{sesroom#1}}% + \gdef\lsesinstructor{\csuse{sesinstructor#1}}% + \gdef\lsespresstudents{\csuse{sespresstudents#1}}% } % Get information for a specific (local) session @@ -732,6 +758,18 @@ \lsesroom% } +% Instructor +\newcommand*\SessionInstructor[1]{% + \LocalSession{#1}% + \lsesinstructor% +} + +% Presenting students +\newcommand*\SessionPresStudents[1]{% + \LocalSession{#1}% + \lsespresstudents% +} + % Program line suitable for % a description or labeling list \newcommand*\MakeProgramline[1]{% -- cgit v1.2.3