summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/jslectureplanner/jslectureplanner.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/jslectureplanner/jslectureplanner.tex')
-rw-r--r--macros/latex/contrib/jslectureplanner/jslectureplanner.tex266
1 files changed, 250 insertions, 16 deletions
diff --git a/macros/latex/contrib/jslectureplanner/jslectureplanner.tex b/macros/latex/contrib/jslectureplanner/jslectureplanner.tex
index a5aff8fa2a..4792ba03bb 100644
--- a/macros/latex/contrib/jslectureplanner/jslectureplanner.tex
+++ b/macros/latex/contrib/jslectureplanner/jslectureplanner.tex
@@ -1,3 +1,4 @@
+% !TeX spellcheck = en_US
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% File jslectureplanner.tex
%%
@@ -54,6 +55,20 @@
\vfuzz \hfuzz
\raggedbottom
+\usepackage[bookmarks=true,
+bookmarksnumbered=false,
+bookmarksopen=false,
+breaklinks=false,
+pdfborder={0 0 0},
+backref=false,
+colorlinks=false
+]{hyperref}
+\hypersetup{%
+ pdftitle={The jslectureplanner manual},
+ pdfauthor={Jürgen Spitzmüller},
+ pdfkeywords={latex,course planning}
+}
+
\usepackage{microtype}
\usepackage{babel}
@@ -72,7 +87,7 @@
\author{Jürgen Spitzmüller%
\thanks{Please report issues via \protect\url{https://github.com/jspitz/jslectureplanner}.}}
-\date{Version 1.10, 2020/04/30}
+\date{Version 1.11, 2020/05/11}
\maketitle
@@ -343,6 +358,8 @@ your university
\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.
\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
@@ -355,7 +372,7 @@ macro:
Valid \joption{\jparam{options}} include:
\begin{itemize}
\item \joption{draft=\jparam{true|false}}: If \joption{true}, a placeholder text (by default: ``Thema \jparam{n}'',
- see sec.~\ref{sec:misccust}) will be output if no session title is defined.
+ see sec.~\ref{sec:listcust}) will be output if no session title is defined.
This might be handy for planning the schedule.
\item \joption{topicnumber=\jparam{n}}: In draft mode, reset the current topic number of this session to \jparam{n}.
All subsequent topics will be calculated from this unless reset again. This might be useful if only part of
@@ -523,10 +540,11 @@ e-learning platform
\item \jcsmacro{officenumber}: Outputs the office (room) number
\end{itemize}
-\subsection{Generating course programs}
+\subsection{Generating course programs}\label{subsec:genprog}
\label{sec:lecprog}
\begin{itemize}
-\item \jcsmacro{makeprogram}: Generates a course program in the form:
+\item \jcsmacro{makeprogram}: Generates a course program that, by default,
+expands to the form:
\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
frame=single,escapechar=\$]
\begin{labeling}{\lecprogramlistindent}
@@ -540,6 +558,7 @@ e-learning platform
The \jmacro{labeling} environment is defined by the KOMA classes.
The package provides a fallback, however, if a different class is used.
+The list type can also be customized. See sec.~\ref{sec:listcust} for details.
\item \jcsmacro{makebeamerprogram[\jparam{options}]}: Generates
a beamer-suited lecture program from the metadata in the form
@@ -557,6 +576,8 @@ a beamer-suited lecture program from the metadata in the form
\end{frame}
\end{lstlisting}
+Again, see sec.~\ref{sec:listcust} for customization possibilities.
+
Note that
\begin{itemize}
\item multiple subsequent frames (not just slides) are generated if the metadata
@@ -644,6 +665,7 @@ presenting students, i.\,e., it expands to code in the form:
\end{lstlisting}
If no presenting students have been assigned to a given session,
an em-dash (---) is output instead.
+This all can be customized (please refer to sec.~\ref{sec:listcust} for details).
A starred version of the macro outputs a ``blank'' presentation list that just consists of
the session dates and titles with enough space to fill in student names manually.
@@ -910,31 +932,237 @@ As for the time span, this is defined in the macro \jcsmacro{jstimeslot}, which
\end{lstlisting}
The time format itself can be customized by the means of \textsf{datetime2} (timestyle). Please refer to the package's manual for details.
-\subsection{Misc. customizing}\label{sec:misccust}
-The canceling output is ``Session title -- keine \jparam{Session}'' (``keine''
+\subsection{Customizing program and presentation list appearance}\label{sec:listcust}
+
+\subsubsection{List layout}
+The course program generated by \jcsmacro{makeprogram} is typeset using
+a \textit{labeling} list, i.\,e., a description list
+with a customizable indentation (see sec.~\ref{subsec:genprog}).
+Since \jslp\ uses customizable environments, this can be easily changed.
+Simply redefine the following environment (\jcsmacro{lecprogramlistindent}
+holds a string that represents the indentation width; see below):
+
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[1]{lecprogramlistindent}}]
+\newenvironment{ProgramList}{\begin{labeling}{\lecprogramlistindent}}{\end{labeling}}
+\end{lstlisting}
+%
+This will also change the list of the exam sessions generated by \jcsmacro{makeexamprogram}
+and the student presentation lists generated by \jcsmacro{makepreslist}.
+If you want these lists to look different from the normal program list, redefine:
+
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single]
+\newenvironment{ProgramListExam}{\begin{ProgramList}}{\end{ProgramList}}
+\end{lstlisting}
+%
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single]
+\newenvironment{PresList}{\begin{ProgramList}}{\end{ProgramList}}
+\end{lstlisting}
+%
+For beamer programs, exam and presentation lists, a description environment is used instead,
+and the respective commands are
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[1]{lecprogramlistindent}}]
+\newenvironment{BeamerProgramList}{\begin{description}[\lecprogramlistindent]}%
+ {\end{description}}
+\end{lstlisting}
+%
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[1]{lecprogramlistindent}}]
+\newenvironment{BeamerPresList}{\begin{BeamerProgramList}}{\end{BeamerProgramList}}
+\end{lstlisting}
+%
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[1]{lecprogramlistindent}}]
+\newenvironment{BeamerProgramListExam}{\begin{BeamerProgramList}}{\end{BeamerProgramList}}
+\end{lstlisting}
+%
+The individual lines of the program are defined in the following macro that can be redefined
+(\texttt{\#1} represents the date, \texttt{\#2} the session title, \texttt{\#3} the session title--subtitle separator,
+and \texttt{\#4} the session subtitle; for the used text formatting macros, see sec.~\ref{subsec:textform}):
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[3]{ProgramListItem,programdateformat,sestitleformat}}]
+\newcommand*{\ProgramListItem}[4]{\item[\programdateformat{#1}] \sestitleformat{#2#3#4}}
+\end{lstlisting}
+%
+This also redefines the presentation list items.
+If you want these lists to look different from the normal program list, redefine:
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[2]{PresListItem,ProgramListItem}}]
+\newcommand*\PresListItem[4]{%
+ \ProgramListItem{#1}{#2}{#3}{#4}%
+}
+\end{lstlisting}
+%
+Analogous macros for canceled session items, exam items and presentation list items are:
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[3]{ProgramListCancelItem,programdateformat,cansestitleformat}}]
+\newcommand*{\ProgramListCancelItem}[4]{\item[\programdateformat{#1}]
+ \cansestitleformat{#2#3#4 \leccancel}}
+\end{lstlisting}
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[3]{ProgramListExamItem,programdateformat,exsestitleformat}}]
+\newcommand*{\ProgramListExamItem}[4]{\item[\programdateformat{#1}]
+ \exsestitleformat{#2#3#4}}
+\end{lstlisting}
+%
+For the beamer program, the respective macros are:
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[3]{BeamerProgramListItem,programdateformat,sestitleformat}}]
+\newcommand*{\BeamerProgramListItem}[4]{\item[\programdateformat{#1}]
+ \sestitleformat{#2#3#4}}
+\end{lstlisting}
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[2]{BeamerPresListItem,BeamerProgramListItem}}]
+\newcommand*\BeamerPresListItem[4]{%
+ \BeamerProgramListItem{#1}{#2}{#3}{#4}%
+}
+\end{lstlisting}
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[3]{BeamerProgramListCancelItem,programdateformat,cansestitleformat}}]
+\newcommand*{\BeamerProgramListCancelItem}[4]{\item[\programdateformat{#1}]
+ \cansestitleformat{#2#3#4\leccancel}}
+\end{lstlisting}
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[3]{BeamerProgramListExamItem,programdateformat,exsestitleformat}}]
+\newcommand*{\BeamerProgramListExamItem}[4]{\item[\programdateformat{#1}]
+ \exsestitleformat{#2#3#4}}
+\end{lstlisting}
+%
+The program block titles are set in the embedding list via the following macro:
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[3]{ProgramBlockItem,blocknumberformat,blocktitleformat}}]
+\newcommand*{\ProgramBlockItem}[2]{\item[\blocknumberformat{#1}.] \blocktitleformat{#2}}
+\end{lstlisting}
+%
+For beamer, the following is used with \joption{blocksonly=false}:
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[3]{BeamerProgramBlockItem,blocknumberformat,blocktitleformat}}]
+\newcommand*{\BeamerProgramBlockItem}[2]{\item[\blocknumberformat{#1}.]
+ \blocktitleformat{#2}}
+\end{lstlisting}
+%
+and the following is used with \joption{blocksonly=true}:
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},
+frame=single,moretexcs={[1]{BeamerProgramBlockBlocksOnlyItem}}]
+\newcommand*{\BeamerProgramBlockBlocksOnlyItem}[2]{\item[#1.] #2}
+\end{lstlisting}
+%
+The indentation used in program lists can be changed by redefining
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+moretexcs={[2]{lecprogramlistindent,programdateformat}}]
+\newcommand*\lecprogramlistindent{\programdateformat{88.\,88.}}
+\end{lstlisting}
+%
+The vertical space that separates lines in blank presentation lists can be changed
+by redefining
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+moretexcs={[2]{blankpreslistvspace,setlength}}]
+\setlength\blankpreslistvspace{2\baselineskip}
+\end{lstlisting}
+%
+The separator between session title and presenting students in presentation lists
+can be adjusted by changing
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+moretexcs={[1]{presseparator}}]
+\newcommand*\presseparator{\par}
+\end{lstlisting}
+%
+For beamer presentation lists, the adaptation can be done by changing
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+moretexcs={[1]{beamerpresseparator}}]
+\newcommand*\beamerpresseparator{:\ }
+\end{lstlisting}
+
+
+\subsubsection{Text formatting}\label{subsec:textform}
+
+If you only want to change the formatting of lines, you do not need to redefine the whole macros
+describe above. You can simply adjust the respective markup macros, as described in what follows.
+
+The dates in the program are bold by default. You can change this globally by redefining
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+moretexcs={[1]{programdateformat}}]
+\newcommand*\programdateformat[1]{\textbf{#1}}
+\end{lstlisting}
+%
+Cancelled session titles in the program are bold by default as well. You can change this globally by redefining
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+frame=single,moretexcs={[1]{cansestitleformat}}]
+\newcommand*\cansestitleformat[1]{\textbf{#1}}
+\end{lstlisting}
+%
+Normal session titles, on the other hand, are by default not emphasized at all. You can also change this
+globally by redefining
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+frame=single,moretexcs={[1]{sestitleformat}}]
+\newcommand*\sestitleformat[1]{#1}
+\end{lstlisting}
+%
+Exam session titles are copies of the above. You can also change this
+globally by redefining
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+frame=single,moretexcs={[2]{exsestitleformat,sestitleformat}}]
+\newcommand*\exsestitleformat[1]{\sestitleformat{#1}}
+\end{lstlisting}
+%
+Session block titles and session block numbers can be redefined by changing
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+frame=single,moretexcs={[1]{blocktitleformat}}]
+\newcommand*\blocktitleformat[1]{\textbf{#1}}
+\end{lstlisting}
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+frame=single,moretexcs={[1]{blocknumberformat}}]
+\newcommand*\blocknumberformat[1]{\textbf{#1}}
+\end{lstlisting}
+%
+If you want to change the line in which semester breaks are output, redefine
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+frame=single,moretexcs={[1]{breakevent}}]
+\newcommand*{\ProgramListBreak}[2][\empty]%
+{%
+ \begin{center}
+ (\breakevent{#1}{: }{#2})
+ \end{center}%
+}
+\end{lstlisting}
+%
+\jcsmacro{breakevent} thereby checks whether a date range has been given (\texttt{\#1}),
+and if so, it is output followed by the separator given as second argument and the break
+title (\texttt{\#2}). If not, only the break title (\texttt{\#2}) is output.
+
+\subsubsection{Strings}
+
+For canceled sessions, the program outputs
+``\jparam{Session title} -- keine \jparam{Session}'' (``keine''
is German for ``no''). To modify or translate this, redefine the
following macro
-\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single]
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+ moretexcs={[2]{leccancel,lectypesession}}]
\newcommand*\leccancel{\ -- keine \lectypesession}
\end{lstlisting}
The default program string used in beamer frames can be changed by
redefining
-\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single]
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+ moretexcs={[1]{lecprogram}}]
\newcommand*\lecprogram{Programm}
\end{lstlisting}
-The indentation used in program lists can be changed by redefining
-\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single]
-\newcommand*\lecprogramlistindent{\textbf{88.\,88.}}
-\end{lstlisting}
The placeholder text for session without title with \joption{draft=true}
(see sec.~\ref{sec:lecplan}) is ``Thema \jparam{n}'' (``Thema'' is German for ``topic'').
-It can be changed by redefinition of this macro (\lstinline|\thesestopic| outputs
+It can be changed by redefinition of this macro (\jcsmacro{thesestopic} outputs
the value of the internal topic counter).
-\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single]
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+ moretexcs={[2]{sestopic,thesestopic}}]
\newcommand*\sestopic{Thema~\thesestopic}
\end{lstlisting}
-Use \jfcsmacro{renewcommand{*}} for the redefinitions.
+%
+The placeholder for presentation sessions with no students assigned (by default
+an em-dash), can be redefined by changing
+\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,
+moretexcs={[1]{emptypressession}}]
+\newcommand*\emptypressession{---}
+\end{lstlisting}
\subsection{Using styles}\label{sec:styles}
@@ -1190,7 +1418,8 @@ a \emph{stackexchange} post by Enrico Gregorio (\url{http://tex.stackexchange.co
The time span calculation uses code provided by Christian Hupfer at
\url{https://tex.stackexchange.com/a/473552/19291}.
Thank you, Herbert, Enrico and Christian!
-Richard Zach provided a fix and enhancement to \jcsmacro{SetAutoOffset}. Many thanks for this.
+Richard Zach provided a fix and enhancement to \jcsmacro{SetAutoOffset} and code to customize
+the program list. Many thanks for this.
Finally, Dominik Waßenhoven tested the package and provided
me with multiple suggestions, which effectively manifested in major new features such as
the \jslp\ style files. Thanks, Dominik.
@@ -1198,6 +1427,11 @@ the \jslp\ style files. Thanks, Dominik.
\section{Release History}
\begin{itemize}
+\item 2020/05/11 (v. 1.11):
+ \begin{itemize}
+ \item Allow for customization of program and presentation lists (see sec.~\ref{sec:listcust}).
+ \item Correctly set first session in presentation list.
+ \end{itemize}
\item 2020/04/30 (v. 1.10):
\begin{itemize}
\item Do not increment session topic counter for cancelled sessions and breaks.