From: Stefan Huber Date: Thu, 3 Nov 2022 09:37:59 +0000 (+0100) Subject: exsheet2: Support final exams, like bachelors X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=1c1a1c631f8ffadf6b0f9d48756d6c4732719a29;p=exsheet.git exsheet2: Support final exams, like bachelors Final exams, like bachelor exams, to do not certain infos on the titlepage, like fill-ins for student names, grades or duration. Allow to turn them off. Add a demo for bachelor exams. --- diff --git a/exsheet2-demo-bapruefung.tex b/exsheet2-demo-bapruefung.tex new file mode 100644 index 0000000..1cac776 --- /dev/null +++ b/exsheet2-demo-bapruefung.tex @@ -0,0 +1,50 @@ +% grep begin{exercise} exsheet2-demo-klausur-en.tex | sed 's/^.*\[\(.*\)\]/\1/' | awk ' { s += $1 } END { print s } ' +\documentclass[exam,nostudentinfo,nogradeinfo,german]{exsheet2} + +\usepackage{fontspec} + + + +\title{BA Prüfung (Max Student)} +\course{Microcontroller} +\curriculum{ITS-B} + +\date{2022-10-21} +%\semester{SS 2022} + +\author{Stefan Huber} +\institute{Department IT} +\school{FH Salzburg} + + +\instructions{% +\textbf{Hilfsmittel:} +Es ist ein nicht-programmierbarer Taschenrechner erlaubt. Darüber hinaus sind +keine Hilfsmittel gestattet. + +\bigskip + +\textbf{Hinweise:} +Die Vervielfältigung und Verbreitung, auch auszugsweise, ist nur nach +vorheriger, schriftlicher Zustimmung erlaubt. Die Erstellung von Privatkopien +unterliegt §\,42\ UrhG. + +\begin{center} + Alles Gute! +\end{center} +} + + + +\begin{document} + +\maketitle + + +\begin{exercise} + Erläutern Sie das Gravitationsgesetz von Newton. +\end{exercise} + + + +\end{document} diff --git a/exsheet2.cls b/exsheet2.cls index 250ea65..7124b45 100644 --- a/exsheet2.cls +++ b/exsheet2.cls @@ -13,6 +13,8 @@ \DeclareOption{naustrian}{\def \exsheetgerman{}} \DeclareOption{showanswers}{\def \exsheetshowanswers{}} \DeclareOption{exam}{\def \exsheetexam{}} +\DeclareOption{nostudentinfo}{\def \exsheetnostudentinfo{}} +\DeclareOption{nogradeinfo}{\def \exsheetnogradeinfo{}} \PassOptionsToClass{a4paper}{article} @@ -96,16 +98,16 @@ \def\@auth{} \renewcommand{\author}[1]{\def\@auth{#1}\def\@author{#1}} -\def\@institute{\ } +\def\@institute{} \newcommand{\institute}[1]{\def\@institute{#1}} -\def\@school{\ } +\def\@school{} \newcommand{\school}[1]{\def\@school{#1}} -\def\@duration{\ } +\def\@duration{} \newcommand{\duration}[1]{\def\@duration{#1}} -\def\@instructions{\ } +\def\@instructions{} \newcommand{\instructions}[1]{\def\@instructions{#1}} \let\olddate\date @@ -187,7 +189,11 @@ {\LARGE \bf \@title} \vspace*{1cm} - {\large \bf \@course\ (\@semester)} + { + \large\bf% + \@course + \ifthenelse{\equal{\@semester}{}}{}{ (\@semester)} + } \vspace*{1cm} \hrule @@ -205,18 +211,25 @@ \@institute \\ \@school \\ - \vspace*{1cm} - \theduration: \@duration + \ifthenelse{\equal{\@duration}{}}{}{% + \vspace*{1cm} + \theduration: \@duration + } \end{center} \vspace{4em} \@instructions \vfill - \makestudentinfo - \vspace{3em} - \makegradeinfo + \ifthenelse{\isundefined{\exsheetnostudentinfo}}{% + \makestudentinfo + }{} + + \ifthenelse{\isundefined{\exsheetnogradeinfo}}{% + \vspace{3em} + \makegradeinfo + }{} \end{titlepage} } }