\DeclareOption{naustrian}{\def \exsheetgerman{}}
\DeclareOption{showanswers}{\def \exsheetshowanswers{}}
\DeclareOption{exam}{\def \exsheetexam{}}
+\DeclareOption{nostudentinfo}{\def \exsheetnostudentinfo{}}
+\DeclareOption{nogradeinfo}{\def \exsheetnogradeinfo{}}
\PassOptionsToClass{a4paper}{article}
\@ifundefined{exsheetgerman}{
\usepackage[american]{babel}
- \usepackage[american]{isodate}
\newcommand{\theexercise}{Exercise}
\newcommand{\thepoint}{Point}
\newcommand{\thepoints}{Points}
\newcommand{\theof}{of}
}{%
\usepackage[ngerman]{babel}
- \usepackage[german]{isodate}
\newcommand{\theexercise}{Aufgabe}
\newcommand{\thepoint}{Punkt}
\newcommand{\thepoints}{Punkte}
\newcommand{\theof}{von}
}
+\usepackage[useregional]{datetime2}
+
\RequirePackage{xifthen,geometry,fancyhdr,enumitem,comment,amssymb}
\newcounter{exsheet2@pointsum}
\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
+\DTMsavenow{exsheet2@today}
+\renewcommand{\date}[1]{\olddate{#1}\DTMsavedate{exsheet2@today}{#1}}
+
\geometry{a4paper,textwidth=16cm,textheight=23cm}
\@semester
}
\fancyhead[C]{%
- {\isodate \today}
+ {\DTMsetdatestyle{iso}\DTMusedate{exsheet2@today}}
}
\fancyhead[R]{%
\@auth\\
}
\@ifundefined{exsheetexam}{}{%
\fancyfoot[R]{%
- \tiny nounce: \arabic{examnonce}
+ \tiny nonce: \arabic{examnonce}
}
}
}
{\LARGE \bf \@title}
\vspace*{1cm}
- {\large \bf \@course\ (\@semester)}
+ {
+ \large\bf%
+ \@course
+ \ifthenelse{\equal{\@semester}{}}{}{ (\@semester)}
+ }
\vspace*{1cm}
\hrule
\vspace*{1em}
- \today\\
+ {\DTMusedate{exsheet2@today}} \\
\vspace*{1em}
\@curriculum \\
\@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}
}
}