fix trainee detection

This commit is contained in:
Wolfgang 2024-11-30 18:42:52 +01:00
parent 262baee0a3
commit 393ed36daf

View file

@ -35,7 +35,7 @@
\def\callsign{}
% is this for trainee logging?
% set \trainee to trainee for trainee callsign
% or to traineestroke to get \callsign/T
% or to stroketrainee to get \callsign/T
% if you define it here, trainee will not be taken from filename
\def\trainee{}
@ -72,16 +72,37 @@
}{
\StrCut{\strB}{.}\strTemp\strC
}
\newif\ifistrainee
% default is false
\istraineefalse
% add /t to callsign if filename is logsheet.CALLSIGN.stroketrainee.tex
% set istrainee to true if applicable
% strange things with detokenize needed with latex
\StrLen{\trainee}[\lenTemp]
\IfEq{\lenTemp}{0}{
\StrCut{\strC}{.}\trainee\strD
}{}
%add /t to callsign if filename is logbool.CALLSIGN.traineestroke.tex
\IfStrEq{\trainee}{\detokenize{traineestroke}}{
\def\trainee{trainee}
\IfStrEq{\trainee}{\detokenize{trainee}}{
\istraineetrue
}{
\IfStrEq{\trainee}{\detokenize{stroketrainee}}{
\istraineetrue
\edef\callsign{\callsign/T}
}{}
}
}{
\IfStrEq{\trainee}{trainee}{
\istraineetrue
}{
\IfStrEq{\trainee}{stroketrainee}{
\istraineetrue
\edef\callsign{\callsign/T}
}{}
}
}
% default scale if there is no callsign (\wmfontscale\paperwidth)
\FPset\wmfontscale{0.25}
@ -137,11 +158,11 @@
\FPeval\tablelinesPlusFour{round(tablelines + 4, 0)}
% add +OP on trainee sheet
\IfStrEq{\trainee}{\detokenize{trainee}}{
\ifistrainee
\def\locationOp{Location+OP}
}{
\else
\def\locationOp{Location}
}
\fi
% add content of table, create #2 times #1/#2 rows, #1/#2 including two header rows
\prgNewFunction \makerows{mm} {