summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tuda-ci/tudaexercise.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tuda-ci/tudaexercise.cls')
-rw-r--r--Master/texmf-dist/tex/latex/tuda-ci/tudaexercise.cls57
1 files changed, 41 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/tuda-ci/tudaexercise.cls b/Master/texmf-dist/tex/latex/tuda-ci/tudaexercise.cls
index f5538a691b1..af03d0092b0 100644
--- a/Master/texmf-dist/tex/latex/tuda-ci/tudaexercise.cls
+++ b/Master/texmf-dist/tex/latex/tuda-ci/tudaexercise.cls
@@ -1,4 +1,4 @@
-%% This is file `tudaexercise.cls' version 3.03 (2020/09/19),
+%% This is file `tudaexercise.cls' version 3.04 (2020/10/05),
%% it is part of
%% TUDa-CI -- Corporate Design for TU Darmstadt
%% ----------------------------------------------------------------------------
@@ -26,8 +26,8 @@
%%
%% ============================================================================
%%
-\def\fileversion{3.03}
-\def\filedate{2020/09/19}
+\def\fileversion{3.04}
+\def\filedate{2020/10/05}
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\ProvidesExplClass{tudaexercise}
@@ -53,22 +53,42 @@
\RequirePackage{environ}
-\def\solution{\ptxcd_ex_solutionheader:}
-\def\endsolution{}
+\newenvironment{solution}{}{}
+\newenvironment{solution*}{}{}
\cs_new:Nn \ptxcd_setup_solution: {
\bool_if:NTF \l_ptxcd_ex_solution_bool {
\def\solution{\ptxcd_ex_solutionheader:}
\def\endsolution{}
+ \expandafter\def\csname solution*\endcsname{\ignorespaces}
+ \expandafter\let\csname endsolution*\endcsname\endsolution
}{
\RenewEnviron{solution}{
\if_false:
\BODY
\fi:
}
+ \RenewEnviron{solution*}{
+ \if_false:
+ \BODY
+ \fi:
+ }
}
}
+\ptxcd_setup_solution:
+
+\prg_new_conditional:Nnn \__ptxcd_if_solution: {T,F,TF} {
+ \bool_if:NTF \l_ptxcd_ex_solution_bool
+ {\prg_return_true:}
+ {\prg_return_false:}
+}
+
+\let\IfSolutionT \__ptxcd_if_solution:T
+\let\IfSolutionF \__ptxcd_if_solution:F
+\let\IfSolutionTF \__ptxcd_if_solution:TF
+
+
%Message Declaration for option processing
\msg_new:nnn{tudaexercise} {titlepage-option-disabled} {
You~set~the~titlepage~option~to~#1.\\
@@ -168,21 +188,21 @@
\bool_new:N \l_ptxcd_ex_subtask_fallback_bool
\keys_define:nn {ptxcd/task}{
- points .int_set:N = \l_ptxcd_ex_points_int,
+ points .int_set:N = \l_ptxcd_ex_task_points_int,
points .initial:n = 0,
- credit .tl_set:N = \l_ptxcd_ex_credit_tl,
+ credit .tl_set:N = \l_ptxcd_ex_task_credit_tl,
credit .initial:n =,
solution .meta:nn ={ptxcd/exercise}{solution=#1},
}
\keys_define:nn {ptxcd/subtask} {
- credit .tl_set:N = \l_ptxcd_ex_credit_tl,
+ credit .tl_set:N = \l_ptxcd_ex_subtask_credit_tl,
credit .initial:n =,
- points .int_set:N = \l_ptxcd_ex_points_int,
+ points .int_set:N = \l_ptxcd_ex_subtask_points_int,
points .initial:n = 0,
title .tl_set:N = \l_ptxcd_ex_title_tl,
title .initial:n =,
- unknown .code:n = \bool_set_true:N \l_ptxcd_ex_subtask_fallback_bool \tl_clear:N \l_ptxcd_ex_credit_tl \int_zero:N \l_ptxcd_ex_points_int,
+ unknown .code:n = \bool_set_true:N \l_ptxcd_ex_subtask_fallback_bool \tl_clear:N \l_ptxcd_ex_subtask_credit_tl \int_zero:N \l_ptxcd_ex_subtask_points_int,
}
\keys_define:nn {ptxcd/exercise/headline} {
@@ -246,9 +266,9 @@
}
#4
\tl_if_in:nnT {#1} {task} {
- \tl_if_empty:NTF \l_ptxcd_ex_credit_tl
- {\pointformat{\l_ptxcd_ex_points_int}}
- {\creditformat{\l_ptxcd_ex_credit_tl}}
+ \tl_if_empty:cTF{l_ptxcd_ex_#1_credit_tl}
+ {\pointformat{\tl_use:c {l_ptxcd_ex_#1_points_int}}}
+ {\creditformat{\tl_use:c {l_ptxcd_ex_#1_credit_tl}}}
}
\rule[-\dp\strutbox]{0pt}{\dp\strutbox}\par}\nointerlineskip
\skip_vertical:n {\ptxcd_titlerule_sep: -\dp\strutbox}
@@ -443,6 +463,12 @@
contents=\raisebox{\depth}{\box_use:N \ptxcd_headrule_box},
]{TUDa.exercise.head.above.line}
\ofoot[\pagemark]{\pagemark}
+ \ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{TUDa.exercise.foot.even}
+ \ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{TUDa.exercise.foot.odd}
+ \ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{TUDa.exercise.foot.oneside}
+ \ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{plain.TUDa.exercise.foot.even}
+ \ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{plain.TUDa.exercise.foot.odd}
+ \ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{plain.TUDa.exercise.foot.oneside}
}
\DeclarePageStyleAlias{TUDa}{TUDa.exercise}
@@ -621,7 +647,8 @@
\RequirePackage{graphicx}
%%hyperref
-\usepackage{hyperref}
+\PassOptionsToPackage{pdfusetitle}{hyperref}
+\RequirePackage{hyperref}
\hypersetup{hidelinks, unicode}
\providecaptionname{ngerman, german}{\sheetname}{Übungsblatt}
@@ -689,10 +716,8 @@
\cs_undefine:N \task
\NewDocumentEnvironment{task}{om}{
- \begingroup
\IfNoValueF{#1}{\keys_set:nn {ptxcd/task}{#1}}
\@task{#2}
- \endgroup
}{}
\cs_set_eq:cN {task*} \task