diff --git a/logsheet.tex b/logsheet.tex index a6345ba..ee87c31 100644 --- a/logsheet.tex +++ b/logsheet.tex @@ -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{} @@ -68,21 +68,42 @@ \StrCut{\jobname}{.}\strA\strB \StrLen{\callsign}[\lenTemp] \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] \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} - \edef\callsign{\callsign/T} + \StrCut{\strC}{.}\trainee\strD + \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} {