fix trainee detection
This commit is contained in:
parent
262baee0a3
commit
393ed36daf
47
logsheet.tex
47
logsheet.tex
|
@ -35,7 +35,7 @@
|
||||||
\def\callsign{}
|
\def\callsign{}
|
||||||
% is this for trainee logging?
|
% is this for trainee logging?
|
||||||
% set \trainee to trainee for trainee callsign
|
% 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
|
% if you define it here, trainee will not be taken from filename
|
||||||
\def\trainee{}
|
\def\trainee{}
|
||||||
|
|
||||||
|
@ -68,21 +68,42 @@
|
||||||
\StrCut{\jobname}{.}\strA\strB
|
\StrCut{\jobname}{.}\strA\strB
|
||||||
\StrLen{\callsign}[\lenTemp]
|
\StrLen{\callsign}[\lenTemp]
|
||||||
\IfEq{\lenTemp}{0}{
|
\IfEq{\lenTemp}{0}{
|
||||||
\StrCut{\strB}{.}\callsign\strC
|
\StrCut{\strB}{.}\callsign\strC
|
||||||
}{
|
}{
|
||||||
\StrCut{\strB}{.}\strTemp\strC
|
\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]
|
\StrLen{\trainee}[\lenTemp]
|
||||||
\IfEq{\lenTemp}{0}{
|
\IfEq{\lenTemp}{0}{
|
||||||
\StrCut{\strC}{.}\trainee\strD
|
\StrCut{\strC}{.}\trainee\strD
|
||||||
}{}
|
\IfStrEq{\trainee}{\detokenize{trainee}}{
|
||||||
|
\istraineetrue
|
||||||
%add /t to callsign if filename is logbool.CALLSIGN.traineestroke.tex
|
}{
|
||||||
\IfStrEq{\trainee}{\detokenize{traineestroke}}{
|
\IfStrEq{\trainee}{\detokenize{stroketrainee}}{
|
||||||
\def\trainee{trainee}
|
\istraineetrue
|
||||||
\edef\callsign{\callsign/T}
|
\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)
|
% default scale if there is no callsign (\wmfontscale\paperwidth)
|
||||||
\FPset\wmfontscale{0.25}
|
\FPset\wmfontscale{0.25}
|
||||||
|
|
||||||
|
@ -137,11 +158,11 @@
|
||||||
\FPeval\tablelinesPlusFour{round(tablelines + 4, 0)}
|
\FPeval\tablelinesPlusFour{round(tablelines + 4, 0)}
|
||||||
|
|
||||||
% add +OP on trainee sheet
|
% add +OP on trainee sheet
|
||||||
\IfStrEq{\trainee}{\detokenize{trainee}}{
|
\ifistrainee
|
||||||
\def\locationOp{Location+OP}
|
\def\locationOp{Location+OP}
|
||||||
}{
|
\else
|
||||||
\def\locationOp{Location}
|
\def\locationOp{Location}
|
||||||
}
|
\fi
|
||||||
|
|
||||||
% add content of table, create #2 times #1/#2 rows, #1/#2 including two header rows
|
% add content of table, create #2 times #1/#2 rows, #1/#2 including two header rows
|
||||||
\prgNewFunction \makerows{mm} {
|
\prgNewFunction \makerows{mm} {
|
||||||
|
|
Loading…
Reference in a new issue