Debian Codegraph @

texmf-dist/doc/latex/jslectureplanner/jslectureplanner.tex

raw
1 % !TeX spellcheck = en_US
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% File jslectureplanner.tex
4 %%
5 %% Manual of the jslectureplanner bundle.
6 %%
7 %% This file is part of the jslectureplanner bundle.
8 %%
9 %% Author: Juergen Spitzmueller <[email protected]>
10 %%
11 %% This work may be distributed and/or modified under the
12 %% conditions of the LaTeX Project Public License, either version 1.3
13 %% of this license or (at your option) any later version.
14 %% The latest version of this license is in
15 %% http://www.latex-project.org/lppl.txt
16 %% and version 1.3 or later is part of all distributions of LaTeX
17 %% version 2003/12/01 or later.
18 %%
19 %% This work has the LPPL maintenance status "maintained".
20 %%
21 %% The Current Maintainer of this work is Juergen Spitzmueller.
22 %%
23 %% Code repository and issue tracker: https://github.com/jspitz/jslectureplanner
24 %%
25 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26
27 \documentclass[english]{article}
28
29 \usepackage{metre}
30 \usepackage[osf]{libertine}
31 \usepackage[scaled=0.7]{beramono}
32 \usepackage[T1]{fontenc}
33 \usepackage[utf8]{inputenc}
34 \usepackage{url}
35
36 % markup
37 \newcommand*\jmacro[1]{\textbf{\texttt{#1}}}
38 \newcommand*\jcsmacro[1]{\jmacro{\textbackslash{#1}}}
39 \newcommand*\joption[1]{\textbf{\texttt{#1}}}
40 \newcommand*\jfoption[1]{\texttt{#1}}
41 \newcommand*\jfmacro[1]{\texttt{#1}}
42 \newcommand*\jfcsmacro[1]{\jfmacro{\textbackslash{#1}}}
43 \newcommand*\jparam[1]{\angus #1\angud}
44
45 % macros
46 \newcommand*\jslp{\textsf{jslectureplanner}}
47 \newcommand*\jsmt{\textsf{jsmembertable}}
48
49 % improve layout
50 \tolerance 1414
51 \hbadness 1414
52 \emergencystretch 1.5em
53 \hfuzz 0.3pt
54 \widowpenalty = 10000
55 \vfuzz \hfuzz
56 \raggedbottom
57
58 \usepackage[bookmarks=true,
59 bookmarksnumbered=false,
60 bookmarksopen=false,
61 breaklinks=false,
62 pdfborder={0 0 0},
63 backref=false,
64 colorlinks=false
65 ]{hyperref}
66 \hypersetup{%
67 pdftitle={The jslectureplanner manual},
68 pdfauthor={Jürgen Spitzmüller},
69 pdfkeywords={latex,course planning}
70 }
71
72 \usepackage{microtype}
73
74 \usepackage{babel}
75
76 \usepackage{listings}
77 \lstset{language={[LaTeX]TeX},
78 basicstyle={\small\ttfamily},
79 frame=single}
80
81 \setcounter{tocdepth}{2}
82
83 \begin{document}
84
85 \title{The \jslp\ bundle}
86
87 \author{Jürgen Spitzmüller%
88 \thanks{Please report issues via \protect\url{https://github.com/jspitz/jslectureplanner}.}}
89
90 \date{Version 1.15, 2025/10/02}
91
92 \maketitle
93
94 \begin{abstract}
95 \noindent The \jslp\ bundle provides a collection of packages
96 I have written in order to facilitate, and somewhat systematize,
97 the planning of my university courses and the generation of course material
98 (and thus, ultimately, to relieve me from some of the more boring and
99 time-consuming part of teaching work).
100 Currently, the bundle consists of the main, title-giving package \jslp\
101 that provides an interface to central, partly dynamically generated course
102 metadata as well as routines to generate programs, bibliographies etc., and one
103 smaller companion package: \jsmt, a package that can construct course
104 member and presence tables. This manual documents these packages.
105 \end{abstract}
106
107 \tableofcontents
108
109 \clearpage
110
111 \part{The \jslp\ package}
112
113 This part of the manual describes the basic user interface of the
114 \jslp\ package.
115 Please also refer to the example files included in the bundle in order to
116 see how \jslp\ is supposed to be used ``in practice''.
117
118 \section{Aim of this package}
119
120 The basic idea of the \jslp\ package is that you record
121 all general data of a course (date, semester, type, course title, session titles,
122 general information etc.) in a central tex file and then input this
123 file to all documents related to the course (such as the course program,
124 bibliography, scripts, handouts, beamer presentations, exercises etc.),
125 in order to re-use the recorded data.
126 This is particularly helpful if you have standard courses which
127 are held every other semester: instead of changing the data in every
128 single file, you just need to change it once, in the metadata file.
129
130 To further facilitate the planning, the \jslp\ package
131 is able to calculate the session dates of a whole semester, if the sessions
132 of the course follow at regular intervals.
133 You only need to set the date of the first session, the package does
134 the rest. Moreover, the package can be used to generate a sectioned
135 bibliography for the course via \textsf{biblatex}.
136
137 Since the package has been written for my own needs, it is somewhat tied
138 to my workflow. Particularly, it is tied to my context: teaching in
139 the Humanities at a German-speaking university. Hence, the categorization
140 of the package draws on this context. In particular, all default strings and
141 formats are German. However, it is possible to add new categories as
142 well as to customize and translate the strings.
143 This is described later in this manual.
144
145 \section{Requirements of \jslp}\label{sec:req-jslp}
146
147 The following packages are required and loaded by \jslp:
148 \begin{itemize}
149 \setlength\itemsep{2pt}
150 \item \textsf{calc}
151 \item \textsf{datetime2}
152 \item \textsf{etoolbox}
153 \item \textsf{ifthen}
154 \item \textsf{xparse}
155 \end{itemize}
156 \pagebreak
157
158 \section{General idea}
159
160 The general idea goes as follows:
161 \begin{itemize}
162 \item Set up a \emph{metadata.tex} file (or whatever name you prefer) and
163 record all meta information of the course in it (as described in sec.~\ref{sec:course-metadata}
164 and \ref{sec:lecplan}).
165 \item In your documents, load the package (\jcsmacro{usepackage\{jslectureplanner\}})
166 and/or%
167 \footnote{If you prefer to record the data via package options
168 (see sec.~\ref{sub:package-options}) instead of macros (see sec.~\ref{sec:via-macros}),
169 you need to load the package in the metadata file itself.}
170 input the metadata file (\jcsmacro{input\{metadata.tex\}}).
171 \item Finally, use the macros described in sec.~\ref{sec:general-course-info}
172 and \ref{sec:session-specific-info} to retrieve the respective data and re-use
173 the recorded information in your documents.
174 \end{itemize}
175 The procedure is detailed in the following sections.
176
177
178 \section{Setting up course metadata\label{sec:course-metadata}}
179
180 You can set up the course metadata either via package options (if
181 you load the package in the metadata file; see sec.~\ref{sub:package-options})
182 or via specific macros (see sec.~\ref{sec:via-macros}).
183
184
185 \subsection{Via package options\label{sub:package-options}}
186
187 \jcsmacro{usepackage[\jparam{comma-separated options}]\{jslectureplanner\}}
188
189 \subsubsection{Course classification\label{sec:lecture-classification}}
190
191 The default course classification draws on the conventions at German-speaking
192 universities (or those where I have worked, for that matter). Each type is
193 connected to a verbose string (such as \emph{Seminar}), a short form (such as
194 \emph{SE}) and a form that is used to denote individual sessions (as
195 in ``the second \emph{session} of this course'').
196 \begin{description}
197 \item [\joption{type=\jparam{type}}] defines the course type. Predefined values are:
198
199 \begin{itemize}
200 \item \joption{vl}: A lecture (verbose form: \emph{Vorlesung}, short form:
201 \emph{VL}, session form: \emph{Vorlesung})
202 \item \joption{ps}: Undergraduate seminar (verbose form: \emph{Proseminar},
203 short form: \emph{PS}, session form: \emph{Sitzung})
204 \item \joption{se}: Seminar (verbose form: \emph{Seminar}, short form:
205 \emph{SE}, session form: \emph{Sitzung})
206 \item \joption{ue}: Practical course (verbose form: \emph{Übung}, short
207 form: \emph{UE}, session form: \emph{Sitzung})
208 \item \joption{ko}: Colloquium (verbose form: \emph{Kolloquium}, short form:
209 \emph{KO}, session form: \emph{Sitzung})
210 \item \joption{pv}: Research seminar (verbose form: \emph{Privatissimum},
211 short form: \emph{PV}, session form: \emph{Sitzung})
212 \end{itemize}
213
214 Section~\ref{sec:customizing-strings} explains how to extend this list and how
215 to customize the strings.
216 Please also cf. sec.~\ref{sec:styles} on the concept of ``styles''.
217 \end{description}
218
219 \subsubsection{Course title}
220 \begin{description}
221 \item [\joption{title=\jparam{title}}] Main title of the course
222 \item [\joption{titlesep=\jparam{separator}}] Separator between title and subtitle
223 \item [\joption{subtitle=\jparam{subtitle}}] Subtitle of the course
224 \item [\joption{shorttitle=\jparam{shorttitle}}] Short title of the course (for headings etc.)
225 \end{description}
226
227 \subsubsection{Date and place\label{sec:date-and-place}}
228 \begin{description}
229 \item [\joption{semester=\jparam{term}},] where \joption{\jparam{term}} is one of
230
231 \begin{itemize}
232 \item \joption{fs}: Spring term (\emph{Frühjahrssemester}, short form: \emph{FS})
233 \item \joption{hs}: Fall term (\emph{Herbstsemester}, short form: \emph{HS})
234 \item \joption{ss}: Summer term (\emph{Sommersemester}, short form: \emph{SoSe})
235 \item \joption{ws}: Winter term (\emph{Wintersemester}, short form: \emph{WS})
236 \end{itemize}
237 Sec.~\ref{sec:customizing-strings} explains how to customize and extend this list.
238 Also cf. sec.~\ref{sec:styles}.
239
240 \item [\joption{year=\jparam{year}}] (Start) year of the term
241 \item [\joption{endyear=\jparam{year}}] End year of the term if applicable (in case of terms such as \emph{Winter Term 2020/21})
242 \item [\joption{uni=\jparam{university}}] Your university
243 \item [\joption{institute=\jparam{institute}}] Your institute/department
244 \item [\joption{room=\jparam{room}}] The room where the course generally takes place;
245 it is possible to specify diverging rooms for individual sessions
246 (see sec. \ref{sec:lecplan})
247 \item [\joption{startdate=\jparam{startdate}}] The date of the first session (the argument
248 must have the form YYYY-MM-DD or DD/MM/YYYY); if no startdate is given,
249 \jfcsmacro{today} is used
250 \item [\joption{starttime=\jparam{starttime}}] The time the course generally starts (the argument
251 must have the form HH:MM:SS)
252 \item [\joption{duration=\jparam{duration}}] The duration of individual course units in minutes.
253 Default is 90.
254 \item [\joption{interval=\jparam{interval}}] The interval (in days) between two sessions;
255 the preset interval is 7 (=~weekly courses)
256 \end{description}
257
258 \subsubsection{Additional information}
259 \begin{description}
260 \item [\joption{instructor=\jparam{name}}] (General) course instructor's name;
261 it is possible to specify different or specific instructors for individual sessions
262 (see sec. \ref{sec:lecplan})
263 \item [\joption{shortinstructor=\jparam{name}}] Short form of the course instructor's name (e.\,g., for headings)
264 \item [\joption{platform=\jparam{data}}] Information of the e-learning platform
265 (such as the URL)
266 \item [\joption{officehours=\jparam{data}}] Date of your office hours
267 \item [\joption{officenumber=\jparam{data}}] Your office (room) number
268 \end{description}
269
270 \subsubsection{Other global settings}
271 \begin{description}
272 \item[\joption{sestitlesep=\jparam{separator}}] Specifies a default separator between session title and subtitle
273 \end{description}
274
275 \subsection{Via macros\label{sec:via-macros}}
276
277 The following macros provide an alternative way to set up the course metadata.
278
279 \subsubsection{Course classification}
280 \begin{itemize}
281 \item \jcsmacro{LecType\{\jparam{course type}\}}: Set course type;
282 \joption{\jparam{course type}} is one of\footnote{See above sec.~\ref{sec:lecture-classification} for a detailed
283 description.}
284
285 \begin{itemize}
286 \item \joption{vl}: Lecture (\emph{Vorlesung})
287 \item \joption{ps}: Undergraduate seminar (\emph{Proseminar})
288 \item \joption{se}: Seminar (\emph{Seminar})
289 \item \joption{ue}: Practical course (\emph{Übung})
290 \item \joption{ko}: Colloquium (\emph{Kolloquium})
291 \item \joption{pv}: Research seminar (\emph{Privatissimum})
292 \end{itemize}
293 \end{itemize}
294
295 \subsubsection{Course title}
296 \begin{itemize}
297 \item \jcsmacro{LecTitle[\jparam{package options}]\{\jparam{title}\}}: Record course title and options;
298 \joption{\jparam{package options}} might be any set of package options described
299 in sec.~\ref{sub:package-options}, so this macro can actually be used to record
300 all metadata.
301 \item \jcsmacro{LecTitleSep\{\jparam{title separator}\}}: Specify a separator between course
302 title and subtitle (e.\,g., ``. '' or `` -- '')
303 \item \jcsmacro{LecSubTitle\{\jparam{subtitle}\}}: Record course subtitle
304 \end{itemize}
305
306 \subsubsection{Date and place}
307 \begin{itemize}
308 \item \jcsmacro{LecYear\{\jparam{term}\}\{\jparam{year}\}}, Record term and
309 year of the course; \joption{\jparam{term}} is one of\footnote{See above sec.~\ref{sec:date-and-place} for a detailed
310 description.}
311
312 \begin{itemize}
313 \item \joption{fs}: Spring term (\emph{Frühjahrssemester})
314 \item \joption{hs}: Fall term (\emph{Herbstsemester})
315 \item \joption{ss}: Summer term (\emph{Sommersemester})
316 \item \joption{ws}: Winter term (\emph{Wintersemester})
317 \end{itemize}
318 %
319 If the \joption{\jparam{year}} spans multiple years, always use a slash as separator (e.\,g., 2020/21)
320 for parsing purposes in the input.
321 The separator that is used in the output can be customized (see sec.~\ref{sec:custstrings}).
322 \item \jcsmacro{LecUni\{\jparam{university}\}}: Record the name of
323 your university
324 \item \jcsmacro{LecInstitute\{\jparam{institute}\}}: Record your institute's/department's name
325 \item \jcsmacro{LecRoom\{\jparam{room}\}}: Record the room where the course (generally) takes place
326 \item \jcsmacro{LecStartDate\{\jparam{startdate}\}}: Set the date of
327 the first session (the argument must have the form YYYY-MM-DD or DD/MM/YYYY)
328 \item \jcsmacro{LecStartTime\{\jparam{starttime}\}}: Set the time the course generally starts
329 (the argument must have the form HH:MM:SS)
330 \item \jcsmacro{LecDuration\{\jparam{duration}\}}: The duration of individual course units in minutes.
331 Default is 90.
332 \item \jcsmacro{LecInterval\{\jparam{interval}\}}: Adjust the interval (in days) between two sessions.
333 The preset interval is 7 (=~weekly courses).
334 \item \jcsmacro{SetAutoOffset[\jparam{first}]\{\jparam{n}\}\{\jparam{days}\}}:
335 Automatically shift all subsequent sessions
336 by \jparam{days} extra days after every \jparam{n}th session,
337 counting the first session as the \jparam{first}th session for
338 this purpose. This is useful if your course meets multiple times
339 a week. For instance, a course meeting Tuesdays and Thursdays
340 could be defined via \jcsmacro{LecInterval\{2\}} and
341 \jcsmacro{SetAutoOffset\{2\}\{3\}}, a course meeting Monday,
342 Wednesday, Friday using \jcsmacro{LecInterval\{2\}} and
343 \jcsmacro{SetAutoOffset\{3\}\{1\}}. \jparam{n} must be a
344 positive integer, \jparam{days} can also be a negative integer
345 value. Use the optional \jparam{first} if the first session in
346 the course is not the first session in a group. For instance, if
347 your course meets Monday/Wednesday/Friday but the first day of
348 term is a Wednesday, use \jcsmacro{SetAutoOffset[2]\{3\}\{1\}}.
349 \end{itemize}
350
351 \subsubsection{Additional information}\label{ses-add}
352 \begin{itemize}
353 \item \jcsmacro{LecInstructor[\jparam{short name}]\{\jparam{name}\}}: Record the (general) instructor's name, including an optional short form for headings etc.
354 \item \jcsmacro{SetOfficeHours\{\jparam{office hours}\}}: Record date of your office hours
355 \item \jcsmacro{SetOfficeNumber\{\jparam{office number}\}}: Record your office (room) number
356 \item \jcsmacro{SetPlatform\{\jparam{platform information}\}}: Record information
357 (such as URL) of the e-learning platform
358 \end{itemize}
359
360 \subsubsection{Other global settings}\label{ses-global}
361 \begin{itemize}
362 \item \jcsmacro{SessionTitleSep\{\jparam{separator}\}}: Specify a default separator between session title and subtitle (e.\,g., ``. '' or `` -- ''). This is used if no specific separator has been specified in the session entry (see sec.~\ref{sec:lecplan}); by default, no separator is defined.
363 \end{itemize}
364
365
366 \section{Setting up a course schedule}\label{sec:lecplan}
367
368 In the metadata file, you can set up a schedule for the course by entering
369 session information in chronological order. This is done via the following
370 macro:
371 \begin{itemize}
372 \item \jcsmacro{NewSession[\jparam{options}]\{Session title\}}
373
374
375 Valid \joption{\jparam{options}} include:
376 \begin{itemize}
377 \item \joption{draft=\jparam{true|false}}: If \joption{true}, a placeholder text (by default: ``Thema \jparam{n}'',
378 see sec.~\ref{sec:listcust}) will be output if no session title is defined.
379 This might be handy for planning the schedule.
380 \item \joption{topicnumber=\jparam{n}}: In draft mode, reset the current topic number of this session to \jparam{n}.
381 All subsequent topics will be calculated from this unless reset again. This might be useful if only part of
382 the schedule is still drafted.
383 \item \joption{titlesep=\jparam{separator}}: Separator between session title and
384 subtitle (e.\,g., \verb|titlesep={.\ }|); this overrides any global separator set via \joption{sestitlesep} option
385 or \jcsmacro{SessionTitleSep} macro for the current session
386 \item \joption{subtitle=\jparam{subtitle}}: Subtitle of the session
387 \item \joption{shorttitle=\jparam{shorttitle}}: Short title (for
388 headings etc.)
389 \item \joption{instructor=\jparam{name}}: Specific instructor for this session
390 (if it differs from the usual course instructor)
391 \item \joption{shortinstructor=\jparam{name}}: Short form of the specific instructor for this session
392 \item \joption{presstudents=\jparam{names}}: Students presenting in this session
393 (used for student presentation lists, see below sec.~\ref{sec:preslists})
394 \item \joption{room=\jparam{room}}: Room for this session (if it differs
395 from the usual course room)
396 \item \joption{starttime=\jparam{starttime}}: Start time for this session (if it differs
397 from the usual start time). Input must have the form HH:MM.SS.
398 \item \joption{duration=\jparam{duration}}: Duration of this session in minutes (if it differs
399 from the usual duration).
400 \item \joption{bibsec=\jparam{keyword}}: Session keyword for the bibliography
401 (see below sec.~\ref{sub:bibliographies} for its use)
402 \item \joption{cancel=\jparam{true|false}}: Marks this session as ``canceled''.
403 If you specify \joption{cancel=true}, the session will be printed
404 in the program in bold type and appended by a verbal comment.
405 For example,
406
407 \jcsmacro{NewSession[cancel=true]\{Dies Academicus\}}
408
409 will expand to
410 \begin{quote}
411 \textbf{15.\,05.: Dies Academicus -- keine Sitzung}
412 \end{quote}
413
414 (i.\,e., ``Dies Academicus -- no session'').
415
416 Furthermore, a canceled session is not counted in the session counter
417 that is used to retrieve session-specific information
418 (see below sec.~\ref{sec:session-specific-info}).
419 \item \joption{exam=\jparam{true|false}}: Marker for exam dates. If \joption{true},
420 this session is put to the exam rather than the program list (see sec.~\ref{sec:lecprog})
421 Useful if you want to list the exam dates separately. Note that exam sessions also get their
422 own additional exam number, which makes them accessible independently from the number of
423 preceding sessions (see sec.~\ref{sec:arbisess} on macro \jcsmacro{examsesno}).
424 \item \joption{extradate=\jparam{date}}: Sets a fix date for this session. The date needs
425 to be inserted in ISO format (YYYY-MM-DD). Note that these sessions are excluded from
426 the auto-offset set by \jcsmacro{SetAutoOffset}.
427 \end{itemize}
428 \item \jcsmacro{SetBreak[\jparam{span}]\{Break\}}: Add a semester break
429 (e.\,g., holidays) that affects one session. The macro increments
430 the internal counters respectively and expands in the program to
431
432 \begin{center}
433 \textbf{(Break)}
434 \par\end{center}
435
436 By means of the optional argument, the real time span of the break
437 might be given if you want to print it on the program. If you pass
438 an optional argument \joption{\jparam{span}}, the macro will expand to
439
440 \begin{center}
441 \textbf{(\jparam{span}: Break)}
442 \par\end{center}
443
444 So for instance, \jcsmacro{SetBreak[28.05.-{}-3.06.]\{Whitsun holidays\}}
445 expands to
446
447
448 \begin{center}
449 \textbf{(28.05.--3.06.: Whitsun holidays)}
450 \par\end{center}
451
452 \item \jcsmacro{SetBreaks[\jparam{options}]\{Break\}}: Add
453 a semester break that affects more than one session (e.\,g., two-week holidays).
454 The output in the program is identical to the \jcsmacro{SetBreak} macro,
455 but the counter incrementation can be adjusted to the needed time span.
456
457 Possible \jmacro{\jparam{options}} are:
458 \begin{itemize}
459 \item \joption{units=\jparam{n}}: Number of interval units the break takes. One \emph{unit}
460 is the number of days as specified by the \joption{interval} option (one week by
461 default\footnote{The former option \joption{weeks} is deprecated as of v. 0.9,
462 since the interval can be adjusted now.}).
463 This value is needed in order to increment the internal counter that is used to
464 calculate the session dates. If \joption{units} is not specified, the counter is
465 incremented by one.\footnote{That is: \jcsmacro{SetBreak\{Break\}} =
466 \jcsmacro{SetBreaks\{Break\}} = \jcsmacro{SetBreaks[units=1]\{Break\}}.}
467 \jfoption{\jparam{n}} must be a positive integer.
468 \item \joption{span=\jparam{span}}: Real time span (verbally output on the program)
469 \end{itemize}
470 \item \jcsmacro{SetLecOffset\{\jparam{n}\}}: Shift the date of all subsequent sessions by \jparam{n} days.
471 \jparam{n} can also be negative.
472 \item \jcsmacro{SetBeamerFrameBreak}: Add a frame break in the beamer program at this position
473 (more precisely, start a new frame; see sec.~\ref{sec:lecprog} for details).
474 This also increments the frame counter which is used for subsequent program
475 frame titles. Note that you can insert maximally 3 breaks.
476 \item \jcsmacro{SetBeamerHook\{\jparam{code}\}}: Add arbitrary LaTeX code to the
477 beamer program
478 \item \jcsmacro{begin\{SessionBlock\}\{\jparam{Block title}\}}\\
479 \ldots{} \\
480 \jcsmacro{end\{SessionBlock\}}:\\
481 Thematic block consisting of several sessions. Respective sessions
482 are nested inside this block.
483 \end{itemize}
484
485 \section{Retrieving general course information\label{sec:general-course-info}}
486
487 Once the metadata file is set up as documented above and input to
488 your document(s), you can retrieve the recorded as well as some concatenated
489 information by means the following macros.
490
491
492 \subsection{Course data}\label{sec:csdata}
493
494 The following macros output general course-specific information:
495 \begin{itemize}
496 \item \jcsmacro{lectype}: Outputs the course type in short
497 form (e.\,g., ``SE'')
498 \item \jcsmacro{lectypeverb}: Outputs the course type in
499 verbose form (e.\,g., ``Seminar'')
500 \item \jcsmacro{lectypesession}: Outputs the appropriate
501 ``session'' string (e.\,g., ``Vorlesung'' or ``Sitzung'')
502 \item \jcsmacro{lectitle}: Outputs the main title of the
503 course
504 \item \jcsmacro{lectitlesep}: Outputs the separator between
505 title and subtitle
506 \item \jcsmacro{lecsubtitle}: Outputs the subtitle of the course
507 \item \jcsmacro{lecfulltitle}: Outputs the course's full title
508 (title, separator, subtitle)
509 \item \jcsmacro{lecshorttitle}: Outputs the short version
510 of the course title; if no explicit short title is specified,
511 the normal title is output (you can check whether
512 there is a unique short title by the test
513 \jcsmacro{iftoggle\{uniquelecshorttitle\}\{\jparam{true}\}\{\jparam{false}\}})
514 \item \jcsmacro{lecsemshort}: Outputs the short version of
515 the term type (e.\,g., ``WS'')
516 \item \jcsmacro{lecsemverb}: Outputs the verbose version
517 of the term type (such as ``Winter\-semester'')
518 \item \jcsmacro{lecyear}: Outputs the (start) year
519 \item \jcsmacro{lecendyear}: Outputs the end year if available
520 \item \jcsmacro{lecendyearsep}: Outputs the separator between start and end year (slash by default)
521 \item \jcsmacro{lecsemester}: Outputs the short version of
522 the semester (e.\,g., ``WS 2014/15'')
523 \item \jcsmacro{lecsemesterverb}: Outputs the verbose version
524 of the semester (such as ``Winter\-semester 2014/15'')
525 \item \jcsmacro{adjsemester}: Outputs the short version of
526 the semester that \emph{follows} this one (e.\,g., ``SoSe 2015'')
527 \item \jcsmacro{adjsemesterverb}: Outputs the verbose version
528 of the semester that \emph{follows} this one (such as ``Sommer\-semester 2015'')
529 \item \jcsmacro{lecuniversity}: Outputs the university's name
530 \item \jcsmacro{lecinstitute}: Outputs the institute's/department's name
531 \item \jcsmacro{lecinstructor}: Outputs the (general) instructor's name
532 \item \jcsmacro{lecshortinstructor}: Outputs short form of the (general) instructor's name;
533 if no explicit short name is given, the normal name will be output (you can check whether
534 there is a unique short name by the test
535 \jcsmacro{iftoggle\{uniquelecshortinstructor\}\{\jparam{true}\}\{\jparam{false}\}})
536 \item \jcsmacro{lecroom}: Outputs the (general) course room
537 \item \jcsmacro{lecstarttime}: Outputs the (general) start time
538 \item \jcsmacro{lecduration}: Outputs the (general) duration of single units
539 \item \jcsmacro{lecendtime}: Outputs the (general) end time (this is calculated from the start time and duration)
540 \item \jcsmacro{lecslot}: Outputs the time slot of the lecture (starttime\,--\,endtime). Please refer to
541 sec.~\ref{sec:custdate} for customization possibilities of the output.
542 \item \jcsmacro{lecplatform}: Outputs information on the
543 e-learning platform
544 \item \jcsmacro{officehours}: Outputs the office hours
545 \item \jcsmacro{officenumber}: Outputs the office (room) number
546 \end{itemize}
547 %
548 Furthermore, if your material contains information that is specific to a given term, you can use the test
549 \verb|\IfSemesterTF{<term>}{<true>}{<false>}|, where \joption{<term>} is the term specifier used in
550 course metadata specification. For example:
551 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
552 frame=single,escapechar=\$]
553 \IfSemesterTF{ws}{Winter}{Spring} break
554 \end{lstlisting}
555
556 \subsection{Generating course programs}\label{subsec:genprog}
557 \label{sec:lecprog}
558 \begin{itemize}
559 \item \jcsmacro{makeprogram}: Generates a course program that, by default,
560 expands to the form:
561 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
562 frame=single,escapechar=\$]
563 \begin{labeling}{\lecprogramlistindent}
564 \item[$\jparam{short date}$] $\jparam{session full title}$
565 ...
566 (break)
567 ...
568 \item[$\jparam{short date}$]] $\jparam{session full title}$]
569 \end{labeling}
570 \end{lstlisting}
571
572 The \jmacro{labeling} environment is defined by the KOMA classes.
573 The package provides a fallback, however, if a different class is used.
574 The list type can also be customized. See sec.~\ref{sec:listcust} for details.
575
576 \item \jcsmacro{makeprogram*}: as opposed to the unstarred form, the session instructors
577 (if there are specific instructors for a given session) are added to the program items.
578
579 \item \jcsmacro{makebeamerprogram[\jparam{options}]}: Generates
580 a beamer-suited lecture program from the metadata in the form
581 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
582 frame=single,escapechar=\$,moretexcs={[1]{frametitle}}]
583 \begin{frame}<overlayarg$\jparam{n}$>[label=beamerprogram$\jparam{n}$,$\jparam{bfoptions}$]
584 \frametitle{$\jparam{Heading}$}
585 \begin{description}[\lecprogramlistindent]
586 \item[$\jparam{short date}$] $\jparam{session full title}$
587 ...
588 (break)
589 ...
590 \item[$\jparam{short date}$] $\jparam{session full title}$
591 \end{description}
592 \end{frame}
593 \end{lstlisting}
594
595 Again, see sec.~\ref{sec:listcust} for customization possibilities.
596
597 Note that
598 \begin{itemize}
599 \item multiple subsequent frames (not just slides) are generated if the metadata
600 file contains \jcsmacro{SetBeamerFrameBreak} macros (this is because beamer frame breaks
601 via \jfoption{allowframebreaks} and \jfcsmacro{framebreak} do not allow for overlays).
602 \item you can refer to the frames via the automatically generated
603 labels \emph{beamerprogram} (for the first frame), \emph{beamerprogram2}
604 for the second, etc.
605 \item the number of program frames is currently limited to 4. If you need more, you should probably rethink
606 your program structure.
607 \end{itemize}
608 %
609 \joption{\jparam{options}} include
610 \begin{itemize}
611 \item \joption{title=\jparam{title}}: Program title (\jparam{Heading})
612 \item \joption{blocksonly=\jparam{true|false}}: If \joption{true}, only the session blocks are output,
613 not the sessions.
614 \item \joption{uncover=\jparam{true|false}}: If \joption{true}, the program will be uncovered item-wise.
615 \item \joption{size=\jparam{size command}}: Adjust the size of the program.
616 \item \joption{options=\jparam{bfoptions}}: Beamer frame options. Note that key-value
617 beamer frame options need to be embraced, as in\\
618 \jcsmacro{makebeamerprogram[options=\{shrink=10\}]}
619 \item \joption{overlayarg=\jparam{overlay specification}}: Beamer frame overlay specification
620 (to be specified without angle brackets, e.\,g.\ \jfoption{overlayarg=1-3}).\\
621 This option applies to the first program frame only. For subsequent frames,
622 use \joption{overlayarg2}, \joption{overlayarg3} and \joption{overlayarg4},
623 respectively.
624 \item \joption{instructors=\jparam{true|false}}: If \joption{true}, the session instructors
625 (if there are specific instructors for a given session) are added to the program items.
626 \end{itemize}
627
628 \end{itemize}
629 %
630 If you want to separate the dates of your exams from the program, you can flag them with
631 the \joption{exam} option of \jcsmacro{NewSession}. Those session entries will not be included
632 in the output of the above two macros. However, there are the macros
633
634 \begin{itemize}
635 \item \jcsmacro{makeexamprogram}. This generates a list with exam dates in the same layout
636 than \jcsmacro{makeprogram}.
637 \item \jcsmacro{makebeamerexamprogram}. This generates a list with exam dates in the same layout
638 than \jcsmacro{makebeamerprogram} (and takes the same options).
639 \end{itemize}
640
641 \subsection{Generating bibliographies\label{sub:bibliographies}}
642
643 The package provides macros for easy generation of sectioned bibliographies
644 via \textsf{biblatex}. The macro
645 \begin{itemize}
646 \item \jcsmacro{makesessionbib}
647 \end{itemize}
648 generates code in the form
649 \begin{lstlisting}[basicstyle={\small\ttfamily},frame=single,
650 escapechar=\$,moretexcs={[1]{printbibliography}}]
651 \section{$\jparam{session full title}$}
652 \nocite{*}
653 \printbibliography[keyword=$\jparam{session keyword}$,heading=none]
654 \end{lstlisting}
655 for each session of the lecture which has been linked to a \textsf{biblatex}
656 keyword via the \joption{bibsec} option (see above sec.~\ref{sec:lecplan}).
657
658 So if you specify your session with a keyword via the \joption{bibsec}
659 option, and tag your Bib\TeX{} database entries with that keyword,
660 you will get a list of session-specific literature.
661
662
663 \subsection{Generating student presentation lists}\label{sec:preslists}
664
665 The package provides macros to produce a list with the name of the students presenting
666 stuff, or generally being particularly involved, in specific sessions.
667
668 The names of the presenting students are assigned in the metadata to specific sessions
669 by means of the \joption{presstudents} option of the \jcsmacro{NewSession} command
670 (see above sec.~\ref{ses-add}). The macro
671
672 \begin{quote}
673 \jcsmacro{makepreslist}
674 \end{quote}
675 outputs a list that consists of the session dates and titles as well as the names of the
676 presenting students, i.\,e., it expands to code in the form:
677 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
678 escapechar=\$,frame=single]
679 \begin{labeling}{\lecprogramlistindent}
680 \item[$\jparam{short date}$] $\jparam{session full title}$\par
681 $\jparam{presenting students}$
682 ...
683 \end{labeling}
684 \end{lstlisting}
685 If no presenting students have been assigned to a given session,
686 an em-dash (---) is output instead.
687 This all can be customized (please refer to sec.~\ref{sec:listcust} for details).
688
689 A starred version of the macro outputs a ``blank'' presentation list that just consists of
690 the session dates and titles with enough space to fill in student names manually.
691 This version might be useful to schedule the presentations of your students in the first
692 session:
693
694 \begin{quote}
695 \jcsmacro{makepreslist*}
696 \end{quote}
697 For beamer presentations, finally, a specific macro
698
699 \begin{quote}
700 \jcsmacro{makebeamerpreslist}
701 \end{quote}
702 is provided (with no starred version). The main difference is the more compact design that makes
703 the list fit better on a slide.
704
705 If you want to start your presentation list only from a given session number (e.\,g., since you
706 do not have any presentations in the first session of the course), you can use
707
708 \begin{quote}
709 \jcsmacro{setfirstpressession\{\jparam{session number}\}}
710 \end{quote}
711 to set the first session number to be printed on the list. Likewise,
712 \begin{quote}
713 \jcsmacro{setlastpressession\{\jparam{session number}\}}
714 \end{quote}
715 can be used to determine the last session number to be printed on the list.
716
717
718 \section{Retrieving session-specific information\label{sec:session-specific-info}}
719
720 In session-specific documents, you also need information specific
721 to the current session. This is done as follows.
722
723
724 \subsection{Setting the current session}
725
726 Use \jcsmacro{ThisSession\{\jparam{n}\}} to tell the package
727 which session is current. \joption{\jparam{n}} is an integer value, e.\,g.
728 \jcsmacro{ThisSession\{3\}} for the 3rd session of the lecture.
729
730 If you are looking for exam session particularly, you can also use
731 \jcsmacro{examsesno\{\jparam{n}\}} with the number of the exam to get the
732 corresponding session number. Thus, \verb|\ThisSession{\examsesno{2}}|
733 will set the current session to the second exam session, notwithstanding
734 the number of preceding (non-exam) sessions.
735
736 \subsection{Generating session-specific information for the current session}
737
738 If you have specified the current session via the macro \jcsmacro{ThisSession},
739 the following macros output general session-specific information:
740 \begin{itemize}
741 \item \jcsmacro{sesdate}: Date of the current session
742 \item \jcsmacro{sesshortdate}: Date of the current session,
743 short form (no year)
744 \item \jcsmacro{sesdtmdate}: Date of the current session in the form of the
745 \textsf{datetime2} package, without explicit style setting.
746 This can be used if you want to locally set another
747 date style (via \jfcsmacro{DTMsetdatestyle}, which is to be set before this macro then)
748 \item \jcsmacro{sesstarttime}: Start time of the current session
749 \item \jcsmacro{sesendtime}: End time of the current session (calculated from start time and duration).
750 \item \jcsmacro{seslot}: Time slot of the current session (starttime\,--\,endtime). Please refer to
751 sec.~\ref{sec:custdate} for customization possibilities of the output.
752 \item \jcsmacro{sestitle}: Main title of the current session
753 \item \jcsmacro{sesshorttitle}: Short title of the current session; if
754 no explicit short title is specified, the normal [main] title is output
755 (you can check whether there is a unique short title by the test
756 \jcsmacro{iftoggle\{uniquesesshorttitle\}\{\jparam{true}\}\{\jparam{false}\}})
757 \item \jcsmacro{sestitlesep}: Title-subtitle separator of
758 the current session
759 \item \jcsmacro{sessubtitle}: Subtitle of the current session
760 \item \jcsmacro{sesfulltitle}: Full title of the current
761 session (title, separator, subtitle)
762 \item \jcsmacro{sesblocktitle}: The title of the current session block (if available).
763 \item \jcsmacro{sesblocknumber}: The number of the current session block (if available).
764 \item \jcsmacro{sesinstructor}: Current session's instructor's name; if you want to output this name only if it differs from the general instructor (\jcsmacro{lecinstructor}), use the starred version \jcsmacro{sesinstructor*} (furthermore, you can check whether
765 there is a unique session instructor by the test
766 \jcsmacro{iftoggle\{uniquesesinstructor\}\{\jparam{true}\}\{\jparam{false}\}})
767 \item \jcsmacro{sesshortinstructor}: Current session's instructor's short name; if you want to output this name only if it differs from the general instructor (\jcsmacro{lecshortinstructor}), use the starred version \jcsmacro{sesshortinstructor*}; if no explicit instructor short name is given, the normal instructor name will be output (you can check whether
768 there is a unique short instructor [that differs from the long session instructor name] by the test
769 \jcsmacro{iftoggle\{uniquesesshortinstructor\}\{\jparam{true}\}\{\jparam{false}\}})
770 \item \jcsmacro{sespresstudents}: Students presenting in this session
771 \item \jcsmacro{sesnr}: Number of the current session
772 \item \jcsmacro{sesroom}: Room of the current session
773 \end{itemize}
774
775 \subsection{Generating session-specific information for adjacent sessions}
776
777 Depending on the value of \jcsmacro{ThisSession}, you can retrieve the following
778 information for sessions that follow or precede the current session by a specific interval unit via the following macros:
779 \begin{itemize}
780 \item \jcsmacro{AdjSessionTitle[\jparam{offset}]}: Outputs the main title
781 of the adjacent session
782 \item \jcsmacro{AdjSessionFullTitle[\jparam{offset}]}: Outputs the full
783 title (main title, separator, subtitle) of the adjacent session
784 \item \jcsmacro{AdjSessionShortTitle[\jparam{offset}]}: Outputs the short
785 title of the adjacent session; if no explicit short title is specified, the normal main title is output
786 \item \jcsmacro{AdjSessionBlockTitle[\jparam{offset}]}: Outputs the session block
787 title of the adjacent session (if available)
788 \item \jcsmacro{AdjSessionBlockNumber[\jparam{offset}]}: Outputs the session block
789 number of the adjacent session (if available)
790 \item \jcsmacro{AdjSessionDate[\jparam{offset}]}: Outputs the date of the adjacent session
791 \item \jcsmacro{AdjSessionShortDate[\jparam{offset}]}: Outputs the short
792 date (no year) of the adjacent session
793 \item \jcsmacro{AdjSessionDTMDate[\jparam{offset}]}: Date of the adjacent session in the form of the
794 \textsf{datetime2} package, without explicit style setting.
795 This can be used if you want to locally set another
796 date style (via \jfcsmacro{DTMsetdatestyle}, which is to be set before this macro then)
797 \item \jcsmacro{AdjSessionStartTime[\jparam{offset}]}: Outputs the start time of the adjacent session
798 \item \jcsmacro{AdjSessionEndTime[\jparam{offset}]}: Outputs the end time of the adjacent session
799 \item \jcsmacro{AdjSessionTimeSlot[\jparam{offset}]}: Outputs the time slot of the adjacent session
800 (starttime\,--\,endtime). Please refer to sec.~\ref{sec:custdate} for customization possibilities of the output.
801 \item \jcsmacro{AdjSessionInstructor[\jparam{offset}]}: Outputs the name of the instructor of the adjacent session
802 \item \jcsmacro{AdjSessionInstructor*[\jparam{offset}]}: Outputs the name of the instructor of the adjacent session if it differs from the general instructor (\jcsmacro{lecinstructor})
803 \item \jcsmacro{AdjSessionShortInstructor[\jparam{offset}]}: Outputs the short name (or normal name, if no short name was specified) of the instructor of the adjacent session if it differs from the general instructor (\jcsmacro{lecshortinstructor})
804 \item \jcsmacro{AdjSessionShortInstructor*[\jparam{offset}]}: Outputs the short name (or normal name, if no short name was specified) of the instructor of the adjacent session
805 \item \jcsmacro{AdjSessionPresStudents[\jparam{offset}]}: Outputs the name of the students presenting in the adjacent session
806 \item \jcsmacro{AdjSessionRoom[\jparam{offset}]}: Outputs the room of the adjacent session
807 \end{itemize}
808 Via the numerical \joption{\jparam{offset}} option, you can specify which session, relative to the current one, you want to output. The default is \joption{1}, i.\,e., \jcsmacro{AdjSessionTitle} without argument outputs the title of the \emph{next} session. Negative values are valid: \jcsmacro{AdjSessionTitle[-1]}, thus, outputs the title of the \emph{previous} session.
809
810 \subsection{Generating session-specific information for an arbitrary session}\label{sec:arbisess}
811
812 Independent of the value of \jcsmacro{ThisSession},
813 you can retrieve the following information for arbitrary sessions
814 (session number \joption{\jparam{n}}) via the following macros:
815 \begin{itemize}
816 \item \jcsmacro{SessionTitle\{\jparam{n}\}}: Outputs the main title
817 of session number \joption{\jparam{n}}
818 \item \jcsmacro{SessionFullTitle\{\jparam{n}\}}: Outputs the full
819 title (main title, separator, subtitle) of session number \joption{\jparam{n}}
820 \item \jcsmacro{SessionShortTitle\{\jparam{n}\}}: Outputs the short
821 title of session number \joption{\jparam{n}}; if
822 no explicit short title is specified, the normal main title is output
823 \item \jcsmacro{SessionBlockTitle\{\jparam{n}\}}: Outputs the session block title
824 of session number \joption{\jparam{n}} (if available)
825 \item \jcsmacro{SessionBlockNumber\{\jparam{n}\}}: Outputs the (formatted) session block number
826 of session number \joption{\jparam{n}} (if available)
827 \item \jcsmacro{SessionDate\{\jparam{n}\}}: Outputs the date of
828 session number \joption{\jparam{n}}
829 \item \jcsmacro{SessionShortDate\{\jparam{n}\}}: Outputs the short
830 date (no year) of session number \joption{\jparam{n}}
831 \item \jcsmacro{SessionDTMDate\{\jparam{n}\}}: Date of the session session number \joption{\jparam{n}}
832 in the form of the \textsf{datetime2} package, without explicit style setting.
833 This can be used if you want to locally set another
834 date style (via \jfcsmacro{DTMsetdatestyle}, which is to be set before this macro then)
835 \item \jcsmacro{SessionStartTime\{\jparam{n}\}}: Outputs the start time of
836 session number \joption{\jparam{n}}
837 \item \jcsmacro{SessionEndTime\{\jparam{n}\}}: Outputs the end time of
838 session number \joption{\jparam{n}}
839 \item \jcsmacro{SessionTimeSlot\{\jparam{n}\}}: Outputs the time slot of
840 session number \joption{\jparam{n}} (starttime\,--\,endtime). Please refer to
841 sec.~\ref{sec:custdate} for customization possibilities of the output.
842 \item \jcsmacro{SessionInstructor\{\jparam{n}\}}: Outputs the name of the instructor of session
843 number \joption{\jparam{n}}
844 \item \jcsmacro{SessionInstructor*\{\jparam{n}\}}: Outputs the name of the instructor of session
845 number \joption{\jparam{n}} if it differs from the general instructor (\jcsmacro{lecinstructor})
846 \item \jcsmacro{SessionShortInstructor\{\jparam{n}\}}: Outputs the short name (or normal name, if no short name was specified) of the instructor of session
847 number \joption{\jparam{n}}
848 \item \jcsmacro{SessionShortInstructor*\{\jparam{n}\}}: Outputs the short name (or normal name, if no short name was specified) of the instructor of session
849 number \joption{\jparam{n}} if it differs from the general instructor (\jcsmacro{lecinstructor})
850 \item \jcsmacro{SessionPresStudents\{\jparam{n}\}}: Outputs the name of the students presenting
851 in session number \joption{\jparam{n}}
852 \item \jcsmacro{SessionRoom\{\jparam{n}\}}: Outputs the room of session number \joption{\jparam{n}}
853 \item \jcsmacro{MakeProgramline\{\jparam{n}\}}: Outputs a list
854 item line for session number \joption{\jparam{n}} in the form
855 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
856 escapechar=\$,frame=single]
857 \item[{\bfseries $\jparam{short date}$}] $\jparam{session full title}$
858 \end{lstlisting}
859
860 \end{itemize}
861 %
862 Note once more that if you are looking for exam session particularly, you can also use
863 \jcsmacro{examsesno\{\jparam{n}\}} with the number of the exam to get the
864 corresponding session number. For instance, \verb|\SessionDate{\examsesno{2}}|
865 will return the date of the second exam session, notwithstanding the global
866 session number of this session.
867
868
869 \section{Customizing the output}\label{sec:customizing-strings}
870
871 \subsection{Defining and customizing course types}
872
873 The following macro allows to define new course types and redefine existing ones:
874 \begin{itemize}
875 \item \jcsmacro{DefLecType\{\jparam{key}\}\{\jparam{short form}\}\{\jparam{title}\}\{\jparam{session title}\}}
876 \end{itemize}
877 A new type, say summer school, thus, could be defined as follows:
878 \begin{itemize}
879 \item \jcsmacro{DefLecType\{ss\}\{SS\}\{Summer School\}\{Session\}}
880 \end{itemize}
881 This could then be set via \jcsmacro{LecType\{ss\}} or the package option
882 \joption{type=ss}, respectively.
883
884 Likewise, you can use the macro to redefine existing styles, e.\,g. change
885 the ``session'' string of type \joption{vl} via
886 \begin{itemize}
887 \item \jcsmacro{DefLecType\{vl\}\{VL\}\{Vorlesung\}\{Einheit\}}
888 \end{itemize}
889 If you need to change or add types, consider the use of styles
890 (see sec.~\ref{sec:styles}).
891
892
893 \subsection{Defining and customizing term types}
894
895 The available term (semester) types can be changed and extended via the macro:
896 \begin{itemize}
897 \item \jcsmacro{DefSemType[\jparam{options}]\{\jparam{key}\}\{\jparam{short form}\}\{\jparam{verbose form}\}}
898 \end{itemize}
899 %
900 Options are in key-value form and include:
901 \begin{itemize}
902 \item \joption{next=\jparam{key}}: the key of the semester type that follows this one in the academic cycle. This is
903 used for \jcsmacro{adjsemester} and \jcsmacro{adjsemesterverb}.
904 \item \joption{nextny=\jparam{true|false}}: if true, the semester that follows this one is in a different year. This is
905 used for \jcsmacro{adjsemester} and \jcsmacro{adjsemesterverb}.
906 \end{itemize}
907 Thus, you could add a new term types ``spring term'' and ``autumn term'' via
908 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,moretexcs={[1]{DefSemType}}]
909 \DefSemType[next=at]{st}{ST}{Spring Term}
910 \DefSemType[next=st,nextny=true]{at}{AT}{Autumn Term}
911 \end{lstlisting}
912
913 \subsection{Customizing the date and time format}\label{sec:custdate}
914
915 If you need to change the date format, redefine the date styles \textsf{lecdate}
916 (for the long format) and \textsf{lecshortdate} (for the short format),
917 using the syntax provided by the \textsf{datetime2}
918 package. By default, the two formats are defined as follows:
919 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,moretexcs={[1]{DTMnewdatestyle}}]
920 \DTMnewdatestyle{lecdate}{% long date: DD.\,MM.~YYYY
921 \renewcommand*{\DTMdisplaydate}[4]{\DTMtwodigits{##3}.\,\DTMtwodigits{##2}.~##1}%
922 \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}%
923 }
924
925 \DTMnewdatestyle{lecshortdate}{% short date: DD.\,MM.
926 \renewcommand*{\DTMdisplaydate}[4]{\DTMtwodigits{##3}.\,\DTMtwodigits{##2}.}%
927 \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}%
928 }
929 \end{lstlisting}
930 \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.
931
932 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:
933 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,moretexcs={[1]{DTMrenewdatestyle}}]
934 \DTMrenewdatestyle{lecdate}{% long date: MM/DD/YYYY
935 \renewcommand*{\DTMdisplaydate}[4]{\DTMtwodigits{##2}/\DTMtwodigits{##3}/##1}%
936 }
937
938 \DTMrenewdatestyle{lecshortdate}{% short date: Month, DD
939 \renewcommand*{\DTMdisplaydate}[4]{\DTMenglishmonthname{##2}, ##3}%
940 }
941 \end{lstlisting}
942 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).
943
944 Note, further, that if you need another date style only locally, you can set an arbitrary date style on the dtm date provided by \jcsmacro{lectdtmdate} and friends, i.\,e., \verb|\DTMsetdatestyle{mydatestyle}\lecdtmdate|.
945
946 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.
947
948 As for the time span, this is defined in the macro \jcsmacro{jstimeslot}, which is predefined as follows and can be adjusted to your needs:
949 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,moretexcs={[1]{jstimeslot}}]
950 \newcommand*\jstimeslot[2]{#1\,--\,#2}
951 \end{lstlisting}
952 The time format itself can be customized by the means of \textsf{datetime2} (timestyle). Please refer to the package's manual for details.
953
954
955 \subsection{Customizing program and presentation list appearance}\label{sec:listcust}
956
957 \subsubsection{List layout}
958 The course program generated by \jcsmacro{makeprogram} is typeset using
959 a \textit{labeling} list, i.\,e., a description list
960 with a customizable indentation (see sec.~\ref{subsec:genprog}).
961 Since \jslp\ uses customizable environments, this can be easily changed.
962 Simply redefine the following environment (\jcsmacro{lecprogramlistindent}
963 holds a string that represents the indentation width; see below):
964
965 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
966 frame=single,moretexcs={[1]{lecprogramlistindent}}]
967 \newenvironment{ProgramList}{\begin{labeling}{\lecprogramlistindent}}{\end{labeling}}
968 \end{lstlisting}
969 %
970 This will also change the list of the exam sessions generated by \jcsmacro{makeexamprogram}
971 and the student presentation lists generated by \jcsmacro{makepreslist}.
972 If you want these lists to look different from the normal program list, redefine:
973
974 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single]
975 \newenvironment{ProgramListExam}{\begin{ProgramList}}{\end{ProgramList}}
976 \end{lstlisting}
977 %
978 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single]
979 \newenvironment{PresList}{\begin{ProgramList}}{\end{ProgramList}}
980 \end{lstlisting}
981 %
982 For beamer programs, exam and presentation lists, a description environment is used instead,
983 and the respective commands are
984 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
985 frame=single,moretexcs={[1]{lecprogramlistindent}}]
986 \newenvironment{BeamerProgramList}{\begin{description}[\lecprogramlistindent]}%
987 {\end{description}}
988 \end{lstlisting}
989 %
990 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
991 frame=single,moretexcs={[1]{lecprogramlistindent}}]
992 \newenvironment{BeamerPresList}{\begin{BeamerProgramList}}{\end{BeamerProgramList}}
993 \end{lstlisting}
994 %
995 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
996 frame=single,moretexcs={[1]{lecprogramlistindent}}]
997 \newenvironment{BeamerProgramListExam}{\begin{BeamerProgramList}}{\end{BeamerProgramList}}
998 \end{lstlisting}
999 %
1000 The individual lines of the program are defined in the following macro that can be redefined
1001 (\texttt{\#1} represents the date, \texttt{\#2} the session title, \texttt{\#3} the session title--subtitle separator,
1002 and \texttt{\#4} the session subtitle; for the used text formatting macros, see sec.~\ref{subsec:textform}):
1003 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
1004 frame=single,moretexcs={[3]{ProgramListItem,programdateformat,sestitleformat}}]
1005 \newcommand*{\ProgramListItem}[4]{\item[\programdateformat{#1}] \sestitleformat{#2#3#4}}
1006 \end{lstlisting}
1007 %
1008 This also redefines the presentation list items.
1009 If you want these lists to look different from the normal program list, redefine:
1010 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
1011 frame=single,moretexcs={[2]{PresListItem,ProgramListItem}}]
1012 \newcommand*\PresListItem[4]{%
1013 \ProgramListItem{#1}{#2}{#3}{#4}%
1014 }
1015 \end{lstlisting}
1016 %
1017 Analogous macros for canceled session items, exam items and presentation list items are:
1018 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
1019 frame=single,moretexcs={[3]{ProgramListCancelItem,programdateformat,cansestitleformat}}]
1020 \newcommand*{\ProgramListCancelItem}[4]{\item[\programdateformat{#1}]
1021 \cansestitleformat{#2#3#4\leccancel}}
1022 \end{lstlisting}
1023 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
1024 frame=single,moretexcs={[3]{ProgramListExamItem,programdateformat,exsestitleformat}}]
1025 \newcommand*{\ProgramListExamItem}[4]{\item[\programdateformat{#1}]
1026 \exsestitleformat{#2#3#4}}
1027 \end{lstlisting}
1028 %
1029 For the beamer program, the respective macros are:
1030 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
1031 frame=single,moretexcs={[3]{BeamerProgramListItem,programdateformat,sestitleformat}}]
1032 \newcommand*{\BeamerProgramListItem}[4]{\item[\programdateformat{#1}]
1033 \sestitleformat{#2#3#4}}
1034 \end{lstlisting}
1035 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
1036 frame=single,moretexcs={[2]{BeamerPresListItem,BeamerProgramListItem}}]
1037 \newcommand*\BeamerPresListItem[4]{%
1038 \BeamerProgramListItem{#1}{#2}{#3}{#4}%
1039 }
1040 \end{lstlisting}
1041 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
1042 frame=single,moretexcs={[3]{BeamerProgramListCancelItem,programdateformat,cansestitleformat}}]
1043 \newcommand*{\BeamerProgramListCancelItem}[4]{\item[\programdateformat{#1}]
1044 \cansestitleformat{#2#3#4\leccancel}}
1045 \end{lstlisting}
1046 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
1047 frame=single,moretexcs={[3]{BeamerProgramListExamItem,programdateformat,exsestitleformat}}]
1048 \newcommand*{\BeamerProgramListExamItem}[4]{\item[\programdateformat{#1}]
1049 \exsestitleformat{#2#3#4}}
1050 \end{lstlisting}
1051 %
1052 The program block titles are set in the embedding list via the following macro:
1053 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
1054 frame=single,moretexcs={[3]{ProgramBlockItem,blocknumberformat,blocktitleformat}}]
1055 \newcommand*{\ProgramBlockItem}[2]{\item[\blocknumberformat{#1}.] \blocktitleformat{#2}}
1056 \end{lstlisting}
1057 %
1058 For beamer, the following is used with \joption{blocksonly=false}:
1059 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
1060 frame=single,moretexcs={[3]{BeamerProgramBlockItem,blocknumberformat,blocktitleformat}}]
1061 \newcommand*{\BeamerProgramBlockItem}[2]{\item[\blocknumberformat{#1}.]
1062 \blocktitleformat{#2}}
1063 \end{lstlisting}
1064 %
1065 and the following is used with \joption{blocksonly=true}:
1066 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
1067 frame=single,moretexcs={[1]{BeamerProgramBlockBlocksOnlyItem}}]
1068 \newcommand*{\BeamerProgramBlockBlocksOnlyItem}[2]{\item[#1.] #2}
1069 \end{lstlisting}
1070 %
1071 The indentation used in program lists can be changed by redefining
1072 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1073 moretexcs={[2]{lecprogramlistindent,programdateformat}}]
1074 \newcommand*\lecprogramlistindent{\programdateformat{88.\,88.}}
1075 \end{lstlisting}
1076 %
1077 The vertical space that separates lines in blank presentation lists can be changed
1078 by redefining
1079 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1080 moretexcs={[2]{blankpreslistvspace,setlength}}]
1081 \setlength\blankpreslistvspace{2\baselineskip}
1082 \end{lstlisting}
1083 %
1084 The separator between session title and presenting students in presentation lists
1085 can be adjusted by changing
1086 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1087 moretexcs={[1]{presseparator}}]
1088 \newcommand*\presseparator{\par}
1089 \end{lstlisting}
1090 %
1091 For beamer presentation lists, the adaptation can be done by changing
1092 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1093 moretexcs={[1]{beamerpresseparator}}]
1094 \newcommand*\beamerpresseparator{:\ }
1095 \end{lstlisting}
1096
1097
1098 \subsubsection{Text formatting}\label{subsec:textform}
1099
1100 If you only want to change the formatting of lines, you do not need to redefine the whole macros
1101 describe above. You can simply adjust the respective markup macros, as described in what follows.
1102
1103 The dates in the program are bold by default. You can change this globally by redefining
1104 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1105 moretexcs={[1]{programdateformat}}]
1106 \newcommand*\programdateformat[1]{\textbf{#1}}
1107 \end{lstlisting}
1108 %
1109 Cancelled session titles in the program are bold by default as well. You can change this globally by redefining
1110 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1111 frame=single,moretexcs={[1]{cansestitleformat}}]
1112 \newcommand*\cansestitleformat[1]{\textbf{#1}}
1113 \end{lstlisting}
1114 %
1115 Normal session titles, on the other hand, are by default not emphasized at all. You can also change this
1116 globally by redefining
1117 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1118 frame=single,moretexcs={[1]{sestitleformat}}]
1119 \newcommand*\sestitleformat[1]{#1}
1120 \end{lstlisting}
1121 %
1122 Exam session titles are copies of the above. You can also change this
1123 globally by redefining
1124 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1125 frame=single,moretexcs={[2]{exsestitleformat,sestitleformat}}]
1126 \newcommand*\exsestitleformat[1]{\sestitleformat{#1}}
1127 \end{lstlisting}
1128 %
1129 Session block titles and session block numbers can be redefined by changing
1130 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1131 frame=single,moretexcs={[1]{blocktitleformat}}]
1132 \newcommand*\blocktitleformat[1]{\textbf{#1}}
1133 \end{lstlisting}
1134 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1135 frame=single,moretexcs={[1]{blocknumberformat}}]
1136 \newcommand*\blocknumberformat[1]{\textbf{#1}}
1137 \end{lstlisting}
1138 %
1139 If you want to change the line in which semester breaks are output, redefine
1140 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1141 frame=single,moretexcs={[1]{breakevent}}]
1142 \newcommand*{\ProgramListBreak}[2][\empty]%
1143 {%
1144 \begin{center}
1145 (\breakevent{#1}{: }{#2})
1146 \end{center}%
1147 }
1148 \end{lstlisting}
1149 %
1150 \jcsmacro{breakevent} thereby checks whether a date range has been given (\texttt{\#1}),
1151 and if so, it is output followed by the separator given as second argument and the break
1152 title (\texttt{\#2}). If not, only the break title (\texttt{\#2}) is output.
1153
1154 \subsubsection{Strings}\label{sec:custstrings}
1155
1156 For canceled sessions, the program outputs
1157 ``\jparam{Session title} -- keine \jparam{Session}'' (``keine''
1158 is German for ``no''). To modify or translate this, redefine the
1159 following macro
1160 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1161 moretexcs={[2]{leccancel,lectypesession}}]
1162 \newcommand*\leccancel{\ -- keine \lectypesession}
1163 \end{lstlisting}
1164 The default program string used in beamer frames can be changed by
1165 redefining
1166 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1167 moretexcs={[1]{lecprogram}}]
1168 \newcommand*\lecprogram{Programm}
1169 \end{lstlisting}
1170 The placeholder text for session without title with \joption{draft=true}
1171 (see sec.~\ref{sec:lecplan}) is ``Thema \jparam{n}'' (``Thema'' is German for ``topic'').
1172 It can be changed by redefinition of this macro (\jcsmacro{thesestopic} outputs
1173 the value of the internal topic counter).
1174 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1175 moretexcs={[2]{sestopic,thesestopic}}]
1176 \newcommand*\sestopic{Thema~\thesestopic}
1177 \end{lstlisting}
1178 %
1179 The placeholder for presentation sessions with no students assigned (by default
1180 an em-dash), can be redefined by changing
1181 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1182 moretexcs={[1]{emptypressession}}]
1183 \newcommand*\emptypressession{---}
1184 \end{lstlisting}
1185 %
1186 The separator between start and end year of a term can be redefined by changing
1187 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
1188 moretexcs={[1]{lecendyearsep}}]
1189 \newcommand*\lecendyearsep{/}
1190 \end{lstlisting}
1191
1192 \subsection{Using styles}\label{sec:styles}
1193
1194 The most elegant way to do the customizing is to use \emph{lecture planner style} (*.lps) files.
1195 These files can be loaded via the \joption{style=\jparam{style}} package option, where \jparam{style}
1196 is the file name without *.lps extension.
1197
1198 Currently, the package ships three styles:
1199 \begin{enumerate}
1200 \item \joption{german-default} simply includes the default strings.
1201 This style is meant to be used as a model for new styles.
1202 \item \joption{english} is a proof-of-concept localization to English.
1203 This style can be used as a basis for English styles. The English examples
1204 included in the \jslp\ bundle use this style.
1205 \item \joption{cologne} provides some specifics current at the University of Cologne
1206 (\emph{Universität zu Köln}):
1207 \begin{itemize}
1208 \item Additional course types: \joption{ak} (AK, \emph{Arbeitskurs}),
1209 \joption{as} (AS, \emph{Aufbauseminar}), \joption{es} (ES, \emph{Einführungsseminar}),
1210 \joption{evl} (EVL, \emph{Einführungsvorlesung}), \joption{hs} (HS, \emph{Hauptseminar}).
1211 \end{itemize}
1212
1213 \end{enumerate}
1214 If you provide me with other style files, in particular
1215 translations to other languages than German (but also other university conventions), I consider
1216 them for inclusion to the package.
1217
1218 \clearpage
1219
1220 \part{Companion packages}
1221
1222 \section{The \jsmt\ package}
1223
1224 This section of the manual describes the user interface of the \jsmt\
1225 package. Please also refer to the example files included in the bundle.
1226
1227 \subsection{Aim of this package}
1228
1229 This package provides a way to easily generate tables to track the members of a
1230 university course (a table where you, or your students, can fill in names,
1231 student IDs and e-mail adresses) and a table to record their presence,
1232 should this be a requisite at your institute.
1233
1234 The package somewhat integrates with \jslp\ and can use the
1235 metadata and styles of that package where necessary (see part~I of this
1236 manual for details on metadata and styles).
1237
1238 Since the package was written for my own needs, the table design might not fit yours.
1239 However, with some basic LaTeX knowledge, it should not be too hard to adapt it.
1240 Like for \jslp, the default strings are German.
1241 However, it is possible to customize and translate them.
1242 This is described later in this manual.
1243
1244
1245 \subsection{Requirements of \jsmt}\label{sec:req-jsmt}
1246
1247 The following packages are required and loaded by \jsmt:
1248 \begin{itemize}
1249 \setlength\itemsep{2pt}
1250 \item \textsf{datatool} (only if the option \joption{datafile} is used)
1251 \item \textsf{ifthen}
1252 \item \textsf{calc}
1253 \item \textsf{longtable}
1254 \item \textsf{hhline}
1255 \end{itemize}
1256 \jsmt\ can be used independently of
1257 \jslp\ to some degree. The latter package is only required for specific
1258 features (see below) and must be loaded explicitly in that case.
1259
1260 \subsection{Loading the package}
1261
1262 The package is loaded as usual:
1263 \begin{quote}
1264 \jcsmacro{usepackage[\jparam{options}]\{jsmembertable\}}
1265 \end{quote}
1266 Currently, the following package options are available:
1267 \begin{itemize}
1268 \item \joption{datafile=\jparam{csv-file}}: Use external student data file (see sec.~\ref{sec:ext-data}).
1269 \item \joption{datakeys=\jparam{keyorder}}: Specify order of items in CSV data file (see sec.~\ref{sec:ext-data}).
1270 \end{itemize}
1271
1272
1273 \subsection{Loading external data}\label{sec:ext-data}
1274
1275 Both course member and presence tables can be filled with external student data. To this end,
1276 the package option \joption{datafile=\jparam{csv-file}} is provided. If it is used, the package tries
1277 to access a comma-separated data file. Note that the external file must have the extension \emph{.csv},
1278 and the extension must be omitted in the option, so
1279 \begin{quote}
1280 \jcsmacro{usepackage[datafile=mystudents]\{jsmembertable\}}
1281 \end{quote}
1282 loads the file \texttt{mystudents.csv}.
1283
1284 It is assumed that the external CSV file conforms to the following structure:
1285 \begin{lstlisting}[language={},basicstyle={\small\ttfamily},frame=single]
1286 Prename1, Surname1, StudentID1, Email1
1287 Prename2, Surname2, StudentID2, Email2
1288 ...
1289 \end{lstlisting}
1290 The order if items can be adjusted via the \joption{datakeys} package option.
1291 The four items, \texttt{pname} (prename), \texttt{sname} (surname), \texttt{mid} (student ID) and \texttt{email}, can be freely re-ordered by that option. Note however, that all four items must be used. Thus, to change the order to \emph{Surname, Prename, Email, StudentID}, use:
1292 \begin{quote}
1293 \jcsmacro{usepackage[datafile=mystudents,\\
1294 \hphantom{\textbackslash usepackage[}datakeys=\{sname,pname,email,mid\}]\{jsmembertable\}}
1295 \end{quote}
1296 Note, finally, that the CSV file should have the same encoding than the tex file.
1297
1298 \subsection{Generating a course member table}
1299
1300 In order to generate a course member table, simply insert
1301
1302 \begin{quote}
1303 \jcsmacro{makemembertable\{\jparam{number of blank rows}\}}
1304 \end{quote}
1305 If an external data file has been loaded, \joption{\jparam{number of blank rows}} can either be empty or a positive
1306 integer value. If no external data file has been loaded, \joption{\jparam{number of blank rows}} \emph{must} be a
1307 positive integer value.
1308
1309 If no external data file has been loaded, the command generates a table with \joption{\jparam{number of blank rows}}
1310 blank rows, to which your students can fill in their name, student ID and e-mail address.
1311
1312 If an external data file has been loaded, an appropriate number of rows is generated and the
1313 respective student data is filled in. Additionally, \joption{\jparam{number of blank rows}} blank rows are
1314 \emph{appended} after the filled-in rows (for the late birds that have not registered themselves yet).
1315 If the command's argument is empty or \joption{0}, no extra rows are appended.
1316
1317 The number of columns of the member table is always 3, tracking \emph{student id},
1318 \emph{name} and \emph{e-mail address}.
1319 If you want to have more or less columns, you need to redefine the
1320 \jcsmacro{makemembertable} command.
1321 The header strings, though, can easily be changed by redefining the following three
1322 macros (using \jfcsmacro{renewcommand*}), for instance like this:
1323 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single]
1324 % Student Name
1325 \renewcommand*\jsmnameheader{\textbf{Student name}}
1326 % Student ID
1327 \renewcommand*\jsmidheader{\textbf{Student ID}}
1328 % Email
1329 \renewcommand*\jsemailheader{\textbf{Email address}}
1330 \end{lstlisting}
1331 If you use the \jslp\ package, you can use the \jslp\
1332 style files in order to store those redefinitions globally.
1333 See the \texttt{german-default.lps} style file for a model.\footnote{%
1334 Note that within styles, you must use \jfcsmacro{newcommand*} instead of
1335 \jfcsmacro{renewcommand*}, since the styles are loaded before the \jsmt\ package.}
1336 Of course, you need to load \jslp\ with the respective \joption{style} option then
1337 (\emph{before} \jsmt).
1338 See above section~\ref{sec:styles} for details on styles.
1339
1340 \subsection{Generating a presence table}
1341
1342 Presence tables consist of rows with your students' names and columns for each session
1343 of your course where each student can sign and mark her/his presence in the respective
1344 session. As with the member tables, the package can fill in student data (the student
1345 name in this case) from an external data file if the \joption{datafile} package option
1346 is used.
1347
1348 The package provides two kinds of presence tables: A presence table with real session dates
1349 and a simpler one just with session numbers (``Session~1'' etc.). The first variant requires
1350 the \jslp\ package, since it uses the course metadata in order to generate a matching number
1351 of columns with the respective session date in the column headers. The second one also works
1352 without \jslp\, since the session numbers can be simply derived from an internal counter and
1353 you can manually set the total number of sessions.
1354
1355 Note that if you use \jslp, you must load the \jslp\ package and also input the metadata file
1356 \emph{before} \jsmt.
1357
1358 The first presence table variant (with real session dates) is produced with the following macro:
1359
1360 \begin{quote}
1361 \jcsmacro{makeprestable\{\jparam{number of blank rows}\}}
1362 \end{quote}
1363 As with the member table, an appropriate number of rows, pre-filled with student data, is
1364 generated if an external data file has been loaded. Then, \joption{\jparam{number of blank rows}}
1365 blank rows are \emph{appended} after the filled-in rows (if \joption{\jparam{number of blank rows}}
1366 is not empty or \joption{0}). If no external data file has been loaded, simply a table with
1367 \joption{\jparam{number of blank rows}} blank rows is constructed.
1368
1369 The number of columns/sessions is automatically calculated from the metadata. If you want a different
1370 number, you can use the optional argument of the command to override this calculation:
1371
1372 \begin{quote}
1373 \jcsmacro{makeprestable[\jparam{number of sessions}]\{\jparam{number of blank rows}\}}
1374 \end{quote}
1375 The second kind of presence table (with session numbers instead of session dates) is provided
1376 via the starred version of the command:
1377
1378 \begin{quote}
1379 \jcsmacro{makeprestable*[\jparam{number of sessions}]\{\jparam{number of blank rows}\}}
1380 \end{quote}
1381 Like with the unstarred version, if the \jslp\
1382 metadata is used/available, the number of columns/sessions is calculated from the metadata.
1383 Again, the optional argument can be used to override this calculation.
1384 If the \jslp\ metadata is not used/available, and no session number is given via the optional
1385 argument, the table will use a preset number of sessions, namely 15. The starred version uses,
1386 like the unstarred variant, the external student data if the \joption{datafile} option has been
1387 used.
1388
1389 For courses of 2--16 sessions, the package tries to produce reasonably sized tables that
1390 fit the page width (more than 16 sessions are currently not supported).
1391 From 7 sessions upwards, two separate tables, each for half a term,
1392 are produced. In general, it is assumed that you use landscape page format for presence tables.
1393 The tables will be too wide for portrait page format. Also, the tables have been optimized for A4
1394 page size.
1395
1396 If you want to add text before the second of these tables (e.\,g., repeating the course title),
1397 you can employ the \LaTeX\ hook \texttt{jsmembertable/followuptable/before}, as in:
1398 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,moretexcs={[1]{AddToHook}}]
1399 \AddToHook{jsmembertable/followuptable/before}{additional text}
1400 \end{lstlisting}
1401 %
1402 The header strings of the presence tables can be adjusted by redefining the following
1403 macros (using \jfcsmacro{renewcommand*}), for instance like this:
1404 \begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single]
1405 % Student Name
1406 \renewcommand*\jsmnameheader{\textbf{Student name}}
1407 % "Session" string for the starred macro version
1408 \renewcommand*\jsmsession{Session}}
1409 % Session header for the starred macro version
1410 % (\thesession outputs the counter value)
1411 \renewcommand*\jsmsessionheader{\textbf{\jsmsession\ \thesession}}
1412 % The advice for students to sign
1413 \renewcommand*\jssigheader{Students' signature}
1414 \end{lstlisting}
1415 Again, if you use \jslp, you can use the \jslp\
1416 style files in order to store those redefinitions globally.
1417 See the \texttt{german-default.lps} and \texttt{english.lps} style files for a model.\footnote{%
1418 Note that within styles, you must use \jfcsmacro{newcommand*} instead of
1419 \jfcsmacro{renewcommand*}, since the styles are loaded before the \jsmt\ package.}
1420 Of course, you need to load \jslp\ with the respective \joption{style} option then
1421 (\emph{before} \jsmt).
1422 See above section~\ref{sec:styles} for details on styles.
1423
1424 Note, furthermore, that the ``Session'' string (value of \jcsmacro{jsmsession}) is by default
1425 linked to \jslp's \jcsmacro{lectypesession} value if
1426 \jslp\ is loaded before \jsmt. So if \jcsmacro{lectypesession} fits, you do not have to redefine
1427 \jcsmacro{jsmsession}.
1428
1429 \clearpage
1430
1431 \appendix
1432
1433 \part{Appendix}
1434
1435 \section{Acknowledgements}
1436
1437 I could not have written the packages of the \jslp\ bundle without the expertise of the incredible \LaTeX\
1438 community. The packages heavily rely on functions and features
1439 provided by other packages (which are listed in sec.~\ref{sec:req-jslp} and \ref{sec:req-jsmt}).
1440 I am deeply indebted to the authors of those packages.
1441 Furthermore, \emph{stackexchange} proved to be a great source of knowledge which
1442 provided me with solutions for specific tasks:
1443 \jsmt\ heavily draws on code for dynamic table generation that has been
1444 provided by Herbert Voss (\url{http://tex.stackexchange.com/a/7594}); \jslp\ and \jsmt\
1445 use code to test for \jfcsmacro{romannumeral} arguments which has been taken from
1446 a \emph{stackexchange} post by Enrico Gregorio (\url{http://tex.stackexchange.com/a/50131}).
1447 The time span calculation uses code provided by Christian Hupfer at
1448 \url{https://tex.stackexchange.com/a/473552/19291}.
1449 Thank you, Herbert, Enrico and Christian!
1450 Richard Zach provided a fix and enhancement to \jcsmacro{SetAutoOffset} and code to customize
1451 the program list. Many thanks for this.
1452 Vít Starý Novotný made me aware of some \textsf{expl3} coding flaws -- thank you!
1453 Finally, Dominik Waßenhoven tested the package and provided
1454 me with multiple suggestions, which effectively manifested in major new features such as
1455 the \jslp\ style files. Thanks, Dominik.
1456
1457 \section{Release History}
1458
1459 \begin{itemize}
1460 \item 2025/10/02 (v.\,1.15):
1461 \begin{itemize}
1462 \item Fix some expl3 code.
1463 \item Add \jcsmacro{IfSemesterTF} check (see sec.~\ref{sec:csdata}).
1464 \item Add \joption{size} option to \jcsmacro{makebeamerprogram}.
1465 \item Fix expansion issue with \textsf{datatool} \texttt{keys} in \textsf{jsmembertable}.
1466 \end{itemize}
1467 \item 2025/01/29 (v.\,1.14):
1468 \begin{itemize}
1469 \item Add \texttt{jsmembertable/followuptable/before} \LaTeX\ hook.
1470 \item Add way to generate programs with session instructors
1471 (\jcsmacro{makeprogram*} and \joption{instructors=true}
1472 with \jcsmacro{makebeamerprogram}).
1473 \end{itemize}
1474 \item 2024/03/06 (v.\,1.13):
1475 \begin{itemize}
1476 \item Use legacy keyvals rather than \textsf{xkeyval}.
1477 \item Fix row spacing in prestables.
1478 \end{itemize}
1479 \item 2020/12/08 (v.\,1.12):
1480 \begin{itemize}
1481 \item Correctly parse staryear/endyear.
1482 \end{itemize}
1483 \item 2020/05/11 (v.\,1.11):
1484 \begin{itemize}
1485 \item Allow for customization of program and presentation lists (see sec.~\ref{sec:listcust}).
1486 \item Correctly set first session in presentation list.
1487 \end{itemize}
1488 \item 2020/04/30 (v.\,1.10):
1489 \begin{itemize}
1490 \item Do not increment session topic counter for cancelled sessions and breaks.
1491 \item Add session option \joption{topicnumber} to reset topic number in draft mode.
1492 \item Recode this manual in utf8.
1493 \end{itemize}
1494 \item 2020/02/04 (v.\,1.9):
1495 \begin{itemize}
1496 \item Allow \jcsmacro{SetBeamerFrameBreak} within \joption{SessionBlock}.
1497 \item Fix \jcsmacro{SetAutoOffset} at first session and add optional argument
1498 to alter first session (fix contributed by Richard Zach).
1499 \end{itemize}
1500 \item 2019/02/06 (v.\,1.8):
1501 \begin{itemize}
1502 \item Add support for displaying the next semester (macros \jcsmacro{adjsemester} and
1503 \jcsmacro{adjsemesterverb}).
1504 \item Add support for lecture and session start time, duration and thus also end time
1505 calculation.
1506 \item Add unstyled date formats which allow preceding \jfcsmacro{DTMsetdatestyle}
1507 (the short and long date formats would override such settings).
1508 \item Add \joption{extradate} option to \jcsmacro{NewSession} to support fix dates.
1509 See sec.~\ref{sec:lecplan}.
1510 \item Add possibility to enter exam dates that are not added to the standard program
1511 (option \joption{exam} of \jcsmacro{NewSession}); see sec.~\ref{sec:lecplan}.
1512 Also add macros to display them separately (\jcsmacro{makeexamprogram},
1513 \jcsmacro{makebeamerexamprogram}; see sec.~\ref{sec:lecprog}) and to
1514 access their session number (\jcsmacro{examsesno}; see sec.~\ref{sec:arbisess}).
1515 \item Switch input format of \jcsmacro{LecStartDate} to ISO (YYYY-MM-DD). The old format
1516 (DD/MM/YYYY) is still supported for backwards compatibility.
1517 \item Add macros to receive session block numbers (\jcsmacro{sesblocknumber},\\
1518 \jcsmacro{SessionBlockNumber\{\jparam{session no}\}} and \jcsmacro{AdjSessionBlockNumber}).
1519 \end{itemize}
1520 \item 2018/12/14 (v.\,1.7):
1521 \begin{itemize}
1522 \item Allow \joption{options} in \jcsmacro{makebeamerprogram} also with \joption{blocksonly}.
1523 \item Add \joption{overlayarg} option to \jcsmacro{makebeamerprogram}. See sec.~\ref{sec:csdata}.
1524 \item Add macros to receive session block titles (\jcsmacro{sesblocktitle},\\
1525 \jcsmacro{SessionBlockTitle\{\jparam{session no}\}} and \jcsmacro{AdjSessionBlockTitle}).
1526 \end{itemize}
1527 \item 2018/09/26 (v.\,1.6):
1528 \begin{itemize}
1529 \item Bugfix: Do not output session title-subtitle separator if there is no subtitle.
1530 \item Add \joption{blocksonly} and \joption{uncover} options to \jcsmacro{makebeamerprogram}.
1531 \item Add \joption{draft} option to \jcsmacro{NewSession}.
1532 \end{itemize}
1533 \item 2017/03/12 (v.\,1.5):
1534 \begin{itemize}
1535 \item Add \joption{english} style file (proof of concept).
1536 \item Add \joption{datakeys} option to \jsmt.
1537 \item Add package option \joption{sestitlesep} and macro \jcsmacro{SessionTitleSep} that
1538 allow for the definition of a global session title-subtitle separator.
1539 \end{itemize}
1540 \item 2016/10/19 (v.\,1.4):
1541 \begin{itemize}
1542 \item Add instructor short forms for lecture and session.
1543 \item Add starred versions of the \jcsmacro{sesinstructor}, \jcsmacro{SessionInstructor} and \jcsmacro{AdjSessionInstructor} macros that only produce output if the session instructor differs from the general course instructor.
1544 \item All short\{instructor|title\} macros now output the long version if no short form was defined.
1545 \item Add boolean tests for unique short forms and session instructors.
1546 \end{itemize}
1547 \item 2016/08/31 (v.\,1.3):
1548 \begin{itemize}
1549 \item \textbf{Backwards-incompatible change!} Use \textsf{datetime2} instead of \textsf{datetime} and \textsf{advdate}.
1550 This changes the interface to set the lecture date format. See sec.~\ref{sec:custdate}.
1551 \item Fix output of \jcsmacro{SetBreaks} when no \joption{span} argument is given.
1552 \item Protect content of some \jcsmacro{Lec}* macros and options to allow for commas in
1553 titles etc.
1554 \item Microtypographic improvement in default definition of the lecture date format.
1555 \end{itemize}
1556 \item 2016/05/11 (v.\,1.2):
1557 \begin{itemize}
1558 \item Fix line breaking with empty session titles before course breaks.
1559 \item New commands for getting adjacent session data:
1560 \begin{itemize}
1561 \item \jcsmacro{AdjSessionFullTitle}
1562 \item \jcsmacro{AdjSessionDate}
1563 \item \jcsmacro{AdjSessionShortTitle}
1564 \item \jcsmacro{AdjSessionTitle}
1565 \item \jcsmacro{AdjSessionShortDate}
1566 \item \jcsmacro{AdjSessionRoom}
1567 \item \jcsmacro{AdjSessionInstructor}\enlargethispage{\baselineskip}
1568 \item \jcsmacro{AdjSessionPresStudents}
1569 \end{itemize}
1570 \end{itemize}
1571 \item 2015/07/15 (v.\,1.1):
1572 \begin{itemize}
1573 \item Include and document the \jsmt\ package.
1574 \item Add support for student presentation lists. This introduces the new macros
1575 \jcsmacro{makepreslist}, \jcsmacro{makepreslist*},
1576 \jcsmacro{makebeamerpreslist}, \jcsmacro{setfirstpressession} and
1577 \jcsmacro{setlastpressession}.
1578 \item Major revision of the manual.
1579 \end{itemize}
1580 \item 2015/07/07 (v.\,1.0.2):
1581 \begin{itemize}
1582 \item Permit \jcsmacro{LecType} and \jcsmacro{LecYear} in the document body again
1583 (fix a regression introduced by v. 1.0).
1584 \end{itemize}
1585 \item 2015/02/27 (v.\,1.0.1):
1586 \begin{itemize}
1587 \item Properly expand \jcsmacro{leccancel}
1588 (fix a regression introduced by v. 1.0).
1589 \end{itemize}
1590 \item 2015/02/27 (v.\,1.0):
1591 \begin{itemize}
1592 \item Lecture types and term types are not hardcoded anymore and can be freely
1593 modified and extended via \jcsmacro{DefLecType} and \jcsmacro{DefSemType}.
1594 \item Add option to add the instructor's name to both the course (via macro
1595 \jcsmacro{LecInstructor} or \joption{instructor} package option) and
1596 to specific sessions (via \joption{instructor} option of
1597 \jcsmacro{NewSession}).
1598 \item Add option to add names of presenting students to a session (via option
1599 \joption{presstudents}).
1600 \item Add option to record the office number (\jcsmacro{SetOfficeNumber}
1601 or package option \joption{officenumber}).
1602 \item Fix expansion issue in \joption{options} option of \jcsmacro{makebeamerprogram}.
1603 \item Add option to automatically shift all subsequent sessions by a certain value
1604 after every \emph{n}th session (\jcsmacro{SetAutoOffset}).
1605 \item Add \joption{cologne} style file (suggested by Dominik Waßenhoven).
1606 \end{itemize}
1607 \item 2015/02/08 (v.\,0.9):
1608 \begin{itemize}
1609 \item Add a way to adjust the interval between two sessions
1610 (\joption{interval} package option and \jcsmacro{LecInterval} macro).
1611 \item Add a way to shift session dates from the regular interval
1612 (by means of macro \jcsmacro{SetLecOffset}).
1613 \item Add option and macro to set a room for the course as well as
1614 a session-specific room.
1615 \item Rename option \joption{weeks} of the \jcsmacro{SetBreaks} macro
1616 to \joption{units} (\joption{weeks} still works, but is marked deprecated).
1617 \end{itemize}
1618 \item 2015/01/17 (v.\,0.8):
1619 \begin{itemize}
1620 \item Fix corruption of \jfcsmacro{today}.
1621 \item Add framework for different styles.
1622 \item Add option and macro to set a room for the course as well as
1623 a session-specific room.
1624 \item Remove redundant lecture type \joption{vo} from the documentation.
1625 \item Change \jcsmacro{leccancel} default definition in favour of better
1626 translatability.
1627 \end{itemize}\filbreak
1628 \item 2015/01/04 (v.\,0.7):
1629 \begin{itemize}
1630 \item Add macro for resetting \jfcsmacro{today}.
1631 \item Minor corrections of the manual.
1632 \end{itemize}
1633 \item 2014/12/12 (v.\,0.6\,b): Minor corrections of the manual and example files.
1634 \item 2014/12/12 (v.\,0.6): Initial release to CTAN.
1635 \end{itemize}
1636
1637 \end{document}