diff options
author | Karl Berry <karl@freefriends.org> | 2015-07-17 22:42:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-07-17 22:42:45 +0000 |
commit | 836bd4773e861a6ea3ac4e8c9606bbb0fdd3f44c (patch) | |
tree | 2e68afa431d3566c160198fdb9e9d2821242a579 /Master/texmf-dist/tex/latex/jslectureplanner | |
parent | 19b8c17ca1c0af54d194ebc1d1c39f5cfbe1d06a (diff) |
jslectureplanner (16jul15)
git-svn-id: svn://tug.org/texlive/trunk@37878 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/jslectureplanner')
4 files changed, 795 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/jslectureplanner/cologne.lps b/Master/texmf-dist/tex/latex/jslectureplanner/cologne.lps index 729dffa1001..da7d17534de 100644 --- a/Master/texmf-dist/tex/latex/jslectureplanner/cologne.lps +++ b/Master/texmf-dist/tex/latex/jslectureplanner/cologne.lps @@ -3,7 +3,7 @@ %% %% University of Cologne style for lecture planning %% -%% This file is part of the jslectureplanner package. +%% This file is part of the jslectureplanner bundle. %% %% Author: Juergen Spitzmueller <juergen.spitzmueller@univie.ac.at> %% diff --git a/Master/texmf-dist/tex/latex/jslectureplanner/german-default.lps b/Master/texmf-dist/tex/latex/jslectureplanner/german-default.lps index 7252eae826e..4a23ae70cf9 100644 --- a/Master/texmf-dist/tex/latex/jslectureplanner/german-default.lps +++ b/Master/texmf-dist/tex/latex/jslectureplanner/german-default.lps @@ -3,7 +3,7 @@ %% %% Default German style for lecture planning %% -%% This file is part of the jslectureplanner package. +%% This file is part of the jslectureplanner bundle. %% %% Author: Juergen Spitzmueller <juergen.spitzmueller@univie.ac.at> %% @@ -23,6 +23,10 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Default strings (German) used by the jslectureplanner package +% + % Lecture types \DefLecType{vl}{VL}{Vorlesung}{Vorlesung}% lecture \DefLecType{ps}{PS}{Proseminar}{Sitzung}% undergraduate seminar @@ -52,4 +56,26 @@ % Indentation of program list \renewcommand*\lecprogramlistindent{\textbf{88.\,88.}} +% +% Strings used by the jsmembertable package +% NOTE that these have to be defined via \newcommand +% + +% 1.) Session column header +\newcommand*\jsmsession{\lectypesession}% +\newcommand*\jsmsessionheader{\textbf{\thesession.~\jsmsession}}% + +% 2.) Student Name +\newcommand*\jsmnameheader{\textbf{Name, Vorname}} + +% 3.) Student ID +\newcommand*\jsmidheader{\textbf{Matrikel-Nr.}} + +% 3.) E-Mail +\newcommand*\jsemailheader{\textbf{E-Mail-Adresse}} + +% 4.) Signature advice +\newcommand*\jssigheader{Unterschrift Teilnehmer*innen} + + % Finis diff --git a/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty b/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty index e1a8298900e..5e3df477936 100644 --- a/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty +++ b/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty @@ -3,6 +3,8 @@ %% %% Package to manage university courses. %% +%% This file is part of the jslectureplanner bundle. +%% %% Author: Juergen Spitzmueller <juergen.spitzmueller@univie.ac.at> %% %% This work may be distributed and/or modified under the @@ -21,8 +23,8 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\def\filedate{2015/07/07} -\def\fileversion{1.0.2} +\def\filedate{2015/07/15} +\def\fileversion{1.1} \def\filename{jslectureplanner.sty} \NeedsTeXFormat{LaTeX2e} @@ -38,6 +40,7 @@ \RequirePackage{xkeyval} \RequirePackage{datetime} \RequirePackage{calc} +\RequirePackage{ifthen} % @@ -702,6 +705,72 @@ % +% 6) Student presentations +% + +\newcounter{pressession} +\newcounter{lastpressession} +\providebool{deflastpressession} + +% Allow to change first output session +\newcommand*\setfirstpressession[1]{% + \setcounter{pressession}{#1}% +} + +% Allow to change last output session +\newcommand*\setlastpressession[1]{% + \setcounter{lastpressession}{#1}% + \booltrue{deflastpressession}% +} + +% Generate presentation list +\newcommand\makepreslist{% + \@ifstar{\@makeblankpreslist}{\@makepreslist}% +} +% Unstarred: use sespresstudents +\newcommand\@makepreslist{% + \ifbool{deflastpressession}{}{\setcounter{lastpressession}{\thesnum}}% + \begin{labeling}{\lecprogramlistindent} + \whiledo {\not{\value{pressession} > \value{lastpressession}}}% + {% + \ThisSession{\thepressession}% + \if\relax\sespresstudents\relax + \MakeProgramline{\thepressession}\par + --- + \else + \MakeProgramline{\thepressession}\par + \SessionPresStudents{\thepressession} + \fi + \stepcounter{pressession}% + } + \end{labeling} +} +% Starred: blank list +\newcommand\@makeblankpreslist{% + \ifbool{deflastpressession}{}{\setcounter{lastpressession}{\thesnum}}% + \begin{labeling}{\lecprogramlistindent} + \whiledo {\not{\value{pressession} > \value{lastpressession}}}% + {% + \MakeProgramline{\thepressession}\vspace{2\baselineskip} + \stepcounter{pressession}% + } + \end{labeling} +} + +% A beamer-specific version +\newcommand\makebeamerpreslist{% + \ifbool{deflastpressession}{}{\setcounter{lastpressession}{\thesnum}}% + \begin{description}[\lecprogramlistindent] + \whiledo {\not{\value{pressession} > \value{lastpressession}}}% + {% + \MakeProgramline{\thepressession}: \SessionPresStudents{\thepressession} + \stepcounter{pressession}% + } + \end{description} +} + + +% % RETRIEVE SESSION-SPECIFIC INFORMATION % diff --git a/Master/texmf-dist/tex/latex/jslectureplanner/jsmembertable.sty b/Master/texmf-dist/tex/latex/jslectureplanner/jsmembertable.sty new file mode 100644 index 00000000000..82f0eb053d5 --- /dev/null +++ b/Master/texmf-dist/tex/latex/jslectureplanner/jsmembertable.sty @@ -0,0 +1,696 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% File jsmembertable.sty +%% +%% Generate a longtable suitable for course member or presence lists +%% +%% This file is part of the jslectureplanner bundle. +%% +%% Author: Juergen Spitzmueller <juergen.spitzmueller@univie.ac.at> +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Juergen Spitzmueller. +%% +%% Code repository and issue tracker: https://github.com/jspitz/jslectureplanner +%% +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\def\filedate{2015/07/15} +\def\fileversion{1.1} +\def\filename{jsmembertable.sty} + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{jsmembertable} + [\filedate\space v\fileversion\space JS Course member table generation] + +% +% REQUIRED PACKAGES +% + +\RequirePackage{ifthen} +\RequirePackage{calc} +\RequirePackage{array} +\RequirePackage{longtable} +\RequirePackage{hhline} +\RequirePackage{xkeyval} + +% +% PACKAGE OPTIONS +% + +\newif\if@datatool\@datatoolfalse +\def\jsmt@datafile{} +\define@key{mem}{datafile}{% + \def\jsmt@datafile{#1.csv} + \@datatooltrue +} +\DeclareOptionX{datafile}{\setkeys{mem}{datafile=#1}} +\ProcessOptionsX + +% +% OPT-IN PACKAGES +% + +% Load datatool if necessary +\if@datatool + \RequirePackage{datatool} + \DTLloadrawdb[noheader,keys={fname,sname,mid,email}]{data}{\jsmt@datafile} + \dtlsort{sname,fname}{data}{\dtlicompare} +\fi + +% +% STRETCH ROW HEIGHT +% + +\renewcommand\arraystretch{2} + +% +% COUNTERS +% + +% Total members +\newcounter{members} +% Current member +\newcounter{member} +% Tabular row +\newcounter{tabrow} +% session (pres. list column) +\newcounter{session} +% Total sessions +% (if jslectureplanner is used, +% this is already defined) +\@ifundefined{thesnum}{% + \newcounter{snum} + \setcounter{snum}{15} +}{} + + +% +% STRINGS +% + +% 1.) Session +% Try to retrieve from jslectureplanner metadata +\@ifundefined{\lectypesession}{% + \providecommand*\jsmsession{Sitzung}% +}{% + \providecommand*\jsmsession{\lectypesession}% +} +\providecommand*\jsmsessionheader{\textbf{\thesession.~\jsmsession}} + +% 2.) Student Name +\providecommand*\jsmnameheader{\textbf{Name, Vorname}} + +% 3.) Student ID +\providecommand*\jsmidheader{\textbf{Matrikel-Nr.}} + +% 3.) E-Mail +\providecommand*\jsemailheader{\textbf{E-Mail-Adresse}} + +% 4.) Signature advice +\providecommand*\jssigheader{Unterschrift Teilnehmer*innen} + + +% +% GET VALUES +% + +\newif\iffixedseshead\fixedsesheadfalse + +% Get the session date (self-incrementing) +\newcommand*\sescolhead{% + \stepcounter{session}% + \iffixedseshead + \jsmsessionheader% + \else + \@ifundefined{SessionDate}{% + \PackageWarning{jsmembertable}{% + Command makemembertable (unstarred) requires jslectureplanner.\MessageBreak + Falling back to starred version.}% + \jsmsessionheader% + }{% + \textbf{\SessionDate{\thesession}}% + } + \fi +} + +% Get member count (self-incrementing) +\newcommand*\getmembernr{% + \stepcounter{member}% + \themember% +} + + +% +% Define tokens for expanding table rows +% (courtesy of Herbert Voss at http://tex.stackexchange.com/a/7594) +% + +\newtoks\@tabtoks +\newcommand\addtabtoks[1]{\@tabtoks\expandafter{\the\@tabtoks#1}} +\newcommand*\resettabtoks{\@tabtoks{}} +\newcommand*\printtabtoks{\the\@tabtoks} + + +% +% GENERATE A MEMBER TABLE +% (code for dynamic row generation courtesy of Herbert Voss +% at http://tex.stackexchange.com/a/7594) +% + +\newcommand\makemembertable[1]{% + \ifx\relax#1\relax\else + % test if the input is a number + % courtesy of egreg at http://tex.stackexchange.com/a/50131 + \if\relax\detokenize\expandafter{\romannumeral-0#1}\relax + \setcounter{members}{#1}% + \else + \PackageError{jsmembertable}{% + Argument of 'makemembertable' must be\MessageBreak + a positive integer number\MessageBreak + ('#1' was given instead)}{}% + \fi + \fi + \resettabtoks + \loop\ifnum\thetabrow<\themembers\relax + \stepcounter{tabrow} + \addtabtoks{\getmembernr & & & \tabularnewline\hline}% + \repeat + \begin{longtable}{|r|>{\raggedright}p{0.2\textwidth}|>{\raggedright}% + p{0.35\textwidth}|>{\raggedright}p{0.32\textwidth}|} + \cline{2-4} + \multicolumn{1}{l|}{} & \jsmidheader & \jsmnameheader% + & \jsemailheader\tabularnewline + \hhline{-===} + \endhead + \if@datatool + \DTLforeach*{data}{% + \jsmt@firstname=fname,\jsmt@surname=sname,\jsmt@mid=mid,\jsmt@email=email}{% + \DTLiffirstrow{}{\tabularnewline\hline}% + \getmembernr & \jsmt@mid & \jsmt@surname, \jsmt@firstname & \jsmt@email% + }% + \tabularnewline\hline + \fi% + \printtabtoks% + \end{longtable} +} + + +% +% GENERATE PRESENCE TABLES +% + +\newcommand*{\makeprestable}{% + \@ifstar{% + \fixedsesheadtrue\@makeprestable% + }{% + \fixedsesheadfalse\@makeprestable% + }% +} + +\newcommand*\@makeprestable[2][]{ + \ifx\relax#1\relax\else\setcounter{snum}{#1}\fi + \@@makeprestable{#2} +} + +% Width of session columns (table 1) +\newlength\sescolwidth +% Width of session columns (table 2) +\newlength\sescolwidthtwo + + +% +% TEMPLATES FOR DYNAMIC TABLES (2--16 SESSIONS) +% + +\newcommand\inittemplates{% +% Default table design (16 sessions) +\setlength\sescolwidth{.075\textwidth} +\setlength\sescolwidthtwo{.075\textwidth} +\def\bodyrowone##1{##1 & & & & & & & & } +\def\bodyrowtwo##1{##1 & & & & & & & & } +\def\visumcell{\raisebox{8pt}{\footnotesize\jssigheader}} +\def\headerpone{% + \cline{2-9} + \multicolumn{1}{c|}{} & \multicolumn{8}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead & \sescolhead & \sescolhead & \sescolhead\tabularnewline +} +\def\headerptwo{% + \cline{2-9} + \multicolumn{1}{c|}{} & \multicolumn{8}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead & \sescolhead & \sescolhead & \sescolhead\tabularnewline +} +\def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|} +} +\def\ltstarttwo{% + \begin{longtable}[l]{|>{\raggedright}p{0.24\textwidth}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}% + |>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}% + |>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|} +} +% +% Table design: 15 sessions +\ifnum\thesnum=15 + \setlength\sescolwidth{.085\textwidth} + \setlength\sescolwidthtwo{.075\textwidth} + \def\bodyrowone##1{##1 & & & & & & & } + \def\bodyrowtwo##1{##1 & & & & & & & & } + \def\headerpone{% + \cline{2-8} + \multicolumn{1}{c|}{} & \multicolumn{7}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead & \sescolhead & \sescolhead\tabularnewline + } + \def\headerptwo{% + \cline{2-9} + \multicolumn{1}{c|}{} & \multicolumn{8}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead & \sescolhead & \sescolhead & \sescolhead\tabularnewline + } + \def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|} + } + \def\ltstarttwo{% + \begin{longtable}[l]{|>{\raggedright}p{0.24\textwidth}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}% + |>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}% + |>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|} + } +\fi +% +% Table design: 14 sessions +\ifnum\thesnum=14 + \setlength\sescolwidth{.085\textwidth} + \setlength\sescolwidthtwo{.085\textwidth} + \def\bodyrowone##1{##1 & & & & & & & } + \def\bodyrowtwo##1{##1 & & & & & & & } + \def\headerpone{% + \cline{2-8} + \multicolumn{1}{c|}{} & \multicolumn{7}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead & \sescolhead & \sescolhead\tabularnewline + } + \def\headerptwo{% + \cline{2-8} + \multicolumn{1}{c|}{} & \multicolumn{7}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead & \sescolhead & \sescolhead\tabularnewline + } + \def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|} + } + \def\ltstarttwo{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}% + |>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidthtwo}|} + } +\fi +% +% Table design: 13 sessions +\ifnum\thesnum=13 + \setlength\sescolwidth{.085\textwidth} + \setlength\sescolwidthtwo{.102\textwidth} + \def\bodyrowone##1{##1 & & & & & & & } + \def\bodyrowtwo##1{##1 & & & & & & } + \def\headerpone{% + \cline{2-8} + \multicolumn{1}{c|}{} & \multicolumn{7}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead & \sescolhead & \sescolhead\tabularnewline + } + \def\headerptwo{% + \cline{2-7} + \multicolumn{1}{c|}{} & \multicolumn{6}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead & \sescolhead\tabularnewline + } + \def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|} + } + \def\ltstarttwo{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}% + |>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}% + |>{\raggedright}p{\sescolwidthtwo}|} + } +\fi +% +% Table design: 12 sessions +\ifnum\thesnum=12 + \setlength\sescolwidth{.102\textwidth} + \setlength\sescolwidthtwo{.102\textwidth} + \def\bodyrowone##1{##1 & & & & & & } + \def\bodyrowtwo##1{##1 & & & & & & } + \def\headerpone{% + \cline{2-7} + \multicolumn{1}{c|}{} & \multicolumn{6}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead& \sescolhead\tabularnewline + } + \def\headerptwo{% + \cline{2-7} + \multicolumn{1}{c|}{} & \multicolumn{6}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead& \sescolhead\tabularnewline + } + \def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|} + } + \def\ltstarttwo{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}% + |>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}% + |>{\raggedright}p{\sescolwidthtwo}|} + } +\fi +% +% Table design: 11 sessions +\ifnum\thesnum=11 + \setlength\sescolwidth{.102\textwidth} + \setlength\sescolwidthtwo{.125\textwidth} + \def\bodyrowone##1{##1 & & & & & & } + \def\bodyrowtwo##1{##1 & & & & & } + \def\headerpone{% + \cline{2-7} + \multicolumn{1}{c|}{} & \multicolumn{6}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead& \sescolhead\tabularnewline + } + \def\headerptwo{% + \cline{2-6} + \multicolumn{1}{c|}{} & \multicolumn{5}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead\tabularnewline + } + \def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|} + } + \def\ltstarttwo{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}% + |>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|} + } +\fi +% +% Table design: 10 sessions +\ifnum\thesnum=10 + \setlength\sescolwidth{.125\textwidth} + \setlength\sescolwidthtwo{.125\textwidth} + \def\bodyrowone##1{##1 & & & & & } + \def\bodyrowtwo##1{##1 & & & & & } + \def\headerpone{% + \cline{2-6} + \multicolumn{1}{c|}{} & \multicolumn{5}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead\tabularnewline + } + \def\headerptwo{% + \cline{2-6} + \multicolumn{1}{c|}{} & \multicolumn{5}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead\tabularnewline + } + \def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|} + } + \def\ltstarttwo{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}% + |>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|} + } +\fi +% +% Table design: 9 sessions +\ifnum\thesnum=9 + \setlength\sescolwidth{.125\textwidth} + \setlength\sescolwidthtwo{.161\textwidth} + \def\bodyrowone##1{##1 & & & & & } + \def\bodyrowtwo##1{##1 & & & & } + \def\headerpone{% + \cline{2-6} + \multicolumn{1}{c|}{} & \multicolumn{5}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead\tabularnewline + } + \def\headerptwo{% + \cline{2-5} + \multicolumn{1}{c|}{} & \multicolumn{4}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead\tabularnewline + } + \def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|} + } + \def\ltstarttwo{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}% + |>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|} + } +\fi +% +% Table design: 8 sessions +\ifnum\thesnum=8 + \setlength\sescolwidth{.161\textwidth} + \setlength\sescolwidthtwo{.161\textwidth} + \def\bodyrowone##1{##1 & & & & } + \def\bodyrowtwo##1{##1 & & & & } + \def\headerpone{% + \cline{2-5} + \multicolumn{1}{c|}{} & \multicolumn{4}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead\tabularnewline + } + \def\headerptwo{% + \cline{2-5} + \multicolumn{1}{c|}{} & \multicolumn{4}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead\tabularnewline + } + \def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|} + } + \def\ltstarttwo{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}% + |>{\raggedright}p{\sescolwidthtwo}|>{\raggedright}p{\sescolwidthtwo}|} + } +\fi +% +% Table design: 7 sessions +\ifnum\thesnum=7 + \setlength\sescolwidth{.085\textwidth} + \def\bodyrowone##1{##1 & & & & & & & } + \def\headerpone{% + \cline{2-8} + \multicolumn{1}{c|}{} & \multicolumn{7}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead & \sescolhead & \sescolhead\tabularnewline + } + \def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|} + } +\fi +% +% Table design: 6 sessions +\ifnum\thesnum=6 + \setlength\sescolwidth{.102\textwidth} + \def\bodyrowone##1{##1 & & & & & & } + \def\headerpone{% + \cline{2-7} + \multicolumn{1}{c|}{} & \multicolumn{6}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead& \sescolhead\tabularnewline + } + \def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|} + } +\fi +% +% Table design: 5 sessions +\ifnum\thesnum=5 + \setlength\sescolwidth{.125\textwidth} + \def\bodyrowone##1{##1 & & & & & } + \def\headerpone{% + \cline{2-6} + \multicolumn{1}{c|}{} & \multicolumn{5}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead + & \sescolhead\tabularnewline + } + \def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|} + } +\fi +% +% Table design: 4 sessions +\ifnum\thesnum=4 + \setlength\sescolwidth{.161\textwidth} + \def\bodyrowone##1{##1 & & & & } + \def\headerpone{% + \cline{2-5} + \multicolumn{1}{c|}{} & \multicolumn{4}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead & \sescolhead\tabularnewline + } + \def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.27\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|} + } +\fi +% +% Table design: 3 sessions +\ifnum\thesnum=3 + \setlength\sescolwidth{.2\textwidth} + \def\bodyrowone##1{##1 & & & } + \def\headerpone{% + \cline{2-4} + \multicolumn{1}{c|}{} & \multicolumn{3}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead & \sescolhead\tabularnewline + } + \def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.33\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}% + |>{\raggedright}p{\sescolwidth}|} + } +\fi +% +% Table design: 2 sessions +\ifnum\thesnum=2 + \setlength\sescolwidth{.3\textwidth} + \def\bodyrowone##1{##1 & & } + \def\headerpone{% + \cline{2-3} + \multicolumn{1}{c|}{} & \multicolumn{2}{c|}{\visumcell}\tabularnewline[-12pt] + \hline + \jsmnameheader & \sescolhead & \sescolhead\tabularnewline + } + \def\ltstartone{% + \begin{longtable}[l]{|>{\raggedright}p{0.35\textwidth}|>{\raggedright}p{\sescolwidth}|>{\raggedright}p{\sescolwidth}|} + } +\fi +}% close \inittemplates +% +% End templates + + +% +% ROUTINE FOR DYNAMIC PRESENCE TABLE +% \makeprestable{rows} +% (code for dynamic row generation courtesy of Herbert Voss +% at http://tex.stackexchange.com/a/7594) + +\newcommand\@@makeprestable[1]{% + \inittemplates + \ifx\relax#1\relax\else + % test if the input is a number + % courtesy of egreg at http://tex.stackexchange.com/a/50131 + \if\relax\detokenize\expandafter{\romannumeral-0#1}\relax + \setcounter{members}{#1}% + \else + \PackageError{jsmembertable}{% + Argument of 'makeprestable' must be\MessageBreak + a positive integer number\MessageBreak + ('#1' was given instead)}{}% + \fi + \fi + \resettabtoks + \loop\ifnum\thetabrow<\themembers\relax + \stepcounter{tabrow} + \addtabtoks{\bodyrowone{}\tabularnewline\hline}% + \repeat + \ltstartone + \headerpone + \hline + \hline + \endhead + \if@datatool% + \DTLforeach*{data}{% + \jsmt@firstname=fname,\jsmt@surname=sname}{% + \DTLiffirstrow{}{\tabularnewline\hline}% + \bodyrowone{\jsmt@surname, \jsmt@firstname}% + }% + \tabularnewline\hline + \fi% + \printtabtoks + \end{longtable} + \ifnum\thesnum>7 + \clearpage + \setcounter{tabrow}{0} + \ifx\relax#1\relax\else + % test if the input is a number + % courtesy of egreg at http://tex.stackexchange.com/a/50131 + \if\relax\detokenize\expandafter{\romannumeral-0#1}\relax + \setcounter{members}{#1}% + \else + \PackageError{jsmembertable}{% + Argument of 'makeprestable' must be\MessageBreak + a positive integer number\MessageBreak + ('#1' was given instead)}{}% + \fi + \fi + \resettabtoks + \loop\ifnum\thetabrow<\themembers\relax + \stepcounter{tabrow} + \addtabtoks{\bodyrowtwo{}\tabularnewline\hline}% + \repeat + \ltstarttwo + \headerptwo + \hline + \hline + \endhead + \if@datatool + \DTLforeach*{data}{% + \jsmt@firstname=fname,\jsmt@surname=sname}{% + \DTLiffirstrow{}{\tabularnewline\hline}% + \bodyrowtwo{\jsmt@surname, \jsmt@firstname}% + }% + \tabularnewline\hline + \fi% + \printtabtoks + \end{longtable} + \fi +} + +% Finis! +%%% |