Skip to content

Commit

Permalink
fixes build.sh and scoresheet macros
Browse files Browse the repository at this point in the history
  • Loading branch information
LeroyR committed Dec 3, 2024
1 parent 4d89d39 commit ca71d5a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 26 deletions.
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ IMAGE=docker.io/texlive/texlive:TL2022-historic

if command -v podman >/dev/null 2>&1
then
podman run --rm --net=none -w /data/ -v`pwd`:/data -e TERM=xterm-256color $IMAGE make all
podman run --rm --net=none -w /data/ -v`pwd`:/data -e TERM=xterm-256color $IMAGE make rulebook scoresheets
else
docker run --rm --user="$(id -u):$(id -g)" --net=none -w /data/ -v`pwd`:/data -e TERM=xterm-256color $IMAGE make all
docker run --rm --user="$(id -u):$(id -g)" --net=none -w /data/ -v`pwd`:/data -e TERM=xterm-256color $IMAGE make rulebook scoresheets
fi

58 changes: 34 additions & 24 deletions setup/macros_scoresheets.tex
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
% The Default Timelimit for the Test
\newcommand{\timelimit}{5}

% Show Special Penalties & Bonuses
\newcommand{\specialPenBonus}{true}

% Sets the total penalty for not showing up
\newcommand{\notattendingpenalty}{500}

Expand Down Expand Up @@ -109,6 +112,7 @@
% scoresheet (default is \global\attempts)
% - timelimit Integer. Timelimit in minutes
% - continue Not implemented
% - specialpenbonus Boolean. Toggles the "Special Penalties & Bonuses"
% - datarecording Boolean. Toggles the "Data Recording"
% item under Special penalties and standard
% bonuses
Expand Down Expand Up @@ -281,6 +285,7 @@
attempts = \attempts,
timelimit = \timelimit,
continue = true,
specialpenbonus = \specialPenBonus,
datarecording = \dataRecordingBonus,
datarecordingpc = \dataRecordingBonusPercentage,
datarecordingbonus = 0,
Expand All @@ -298,6 +303,7 @@
attempts/.estore in = \scorelistAttempts,
timelimit/.estore in = \scorelistTimelimit,
continue/.estore in = \scorelistContinue,
specialpenbonus/.estore in = \scorelistSpecialPenBonus,
datarecording/.estore in = \scorelistDataRecording,
datarecordingpc/.estore in = \scorelistDataRecordingPercentage,
datarecordingbonus/.estore in = \scorelistDataRecordingBonus,
Expand Down Expand Up @@ -423,7 +429,7 @@
\newcommand{\scorePerTry}{%
\\%
\ifShortScoresheet{}{%
\ifthenelse{ \attempts > 1 }{%
\ifthenelse{ \scorelistAttempts > 1 }{%
\textbi{Score per try} &%
\textit{\thecurrTestScoreTotalWithoutBonus} &%
\attemptScoreLines{\scorelistAttempts}%
Expand Down Expand Up @@ -518,33 +524,37 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Special penalties & bonuses %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\scoreheading{Special Penalties \& Bonuses}
\ifthenelse{ \equal{\scorelistSpecialPenBonus}{true} }{

% not showing up penalty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\penaltyitem{\notattendingpenalty}{Not attending \ifShortScoresheet{(see sec.~\ref{rule:not_attending})}{}}

\scoreheading{Special Penalties \& Bonuses}

% require signal for door opening %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthenelse{ \equal{\scorelistStartButton}{true} }{
\penaltyitem{\scorelistStartButtonPenalty}{Using alternative start signal %\ifShortScoresheet{(see sec.~\ref{rule:start_signal})}
{}}
}{}
% not showing up penalty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\penaltyitem{\notattendingpenalty}{Not attending \ifShortScoresheet{(see sec.~\ref{rule:not_attending})}{}}

% data recording bonus %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthenelse{%
\thecurrDataRecordingBonus>0 \AND %
\equal{\scorelistDataRecording}{true}%
}{%
\bonusitem{\thecurrDataRecordingBonus}{Contributing with recorded data ($\frac{\sum gathered~points}{max~points} \times$) \ifShortScoresheet{(see sec.~\ref{rule:datarecording})}{}}%
}{}%
% require signal for door opening %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthenelse{ \equal{\scorelistStartButton}{true} }{
\penaltyitem{\scorelistStartButtonPenalty}{Using alternative start signal \ifShortScoresheet{(see sec.~\ref{rule:start_signal})}{}}
}{}

% outstanding performance bonus %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthenelse{%
\value{currOutstandingBonus}>0 \AND %
\equal{\scorelistOutstanding}{true}%
}{%
\bonusitem{\thecurrOutstandingBonus}{Outstanding performance~\ifShortScoresheet{(see sec.~\ref{rule:outstanding_performance})}{}}%
}{}%
%
% data recording bonus %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthenelse{%
\thecurrDataRecordingBonus>0 \AND %
\equal{\scorelistDataRecording}{true}%
}{%
\bonusitem{\thecurrDataRecordingBonus}{Contributing with recorded data ($\frac{\sum gathered~points}{max~points} \times$) \ifShortScoresheet{(see sec.~\ref{rule:datarecording})}{}}%
}{}%

% outstanding performance bonus %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthenelse{%
\value{currOutstandingBonus}>0 \AND %
\equal{\scorelistOutstanding}{true}%
}{%
\bonusitem{\thecurrOutstandingBonus}{Outstanding performance~\ifShortScoresheet{(see sec.~\ref{rule:outstanding_performance})}{}}%
}{}%
%

}{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Other Items %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down

0 comments on commit ca71d5a

Please sign in to comment.