Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can one delete or undefine macros in Context? Is there a difference if i've used \def or \define to create a macro?

share|improve this question

1 Answer

up vote 3 down vote accepted

Why do you want to do 'undefine' a macro? Depending on what you want, try:

\let\macro\undefined

or

\let\macro\donothing

It does not matter whether you used \def or \define

share|improve this answer
1  
Note that the first is canonical Tex from Knuth (except that he uses the equals sign: \let\macro=\undefined) and is the preferred way to do it. – Charles Stewart Mar 1 '11 at 10:32
1  
The second (\donothing is just a more descriptive synonym of \relax) is better if you do not want code that uses \macro to fail. I am guessing that the OP wants to ignore some ConTeXt environments, \startsomething ... \stopsomething. In that case, it is better to set them to \donothing rather than \undefined. – Aditya Mar 1 '11 at 15:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.