Re: [NTG-context] How to test the emptyness of a variable?
Thank you very much Aditya, now it works. As you said, the trick was to use \doiftextelse{}{}{} function as test of emptyness function, and \labeltext{chapter} instead of \currentstructurelabel as variable for the test because the latter was never found empty, even when it was. Thus the right code for me is: \define[1] \MyConversion{\doifelse{\currentsectioncountervalue}{1}{\doiftextelse{\labeltext{chapter}}{ONE}{#1}}{#1}} \defineconversion[MyConversion][\MyConversion] \setuphead[chapter][conversion=MyConversion] \starttext \setuplabeltext[chapter=] \chapter{Cool} \chapter{Cat} \chapter{Mouse} \setuplabeltext[chapter=CHAPTER~] \setupheadnumber[chapter][0] \chapter{Cool} \chapter{Cat} \chapter{Mouse} \stoptext
participants (1)
-
Géry Ogam