4
votes
1answer
102 views

How to check if it is the first time or last time a macro has been used in ConTeXt?

I have some text in my document which appears repeatedly many times throughout the document, so I have defined a custom macro, e.g.: \define\mymacro{ \section{A} There is some text. ...
7
votes
2answers
672 views

How to check if a value is not equal using TeX conditionals?

I have a value defined in a macro, e.g.: \mymacro{apple} I need to check if a value does not equal a string, e.g.: IF #1 NOT EQUAL TO "apple" THEN PRINT "It is not a apple, it is #1." FI I ...