I was thinking about doing something crazy, namely, I want to define a "newcommand" by


so that later in text mode I can just do \alpha instead of $\alpha$ (The actual macro will have \xspace in it, but let's ignore that.).

The question is, how do I let the system know, when it replace \alpha by \ensuremath{\alpha} to use the "built-in" macro \alpha, instead of the renewed one, and thus not stuck in an infinite loop?

Or, is there a way to make sure the macro only "expand" once?

  • Don't moan when you find that the result of \alpha-\beta is different from what you'd expected. There's no reason why math symbold should be used in text without proper markup. – egreg Feb 20 '13 at 7:36
  • Well, that's what I expected, so I will take care. You see lots of the time people want to write \alpha-male or \epsilon-neighborhood, \delta-ball etc. And there is no easy solution for that. – h__ Feb 20 '13 at 8:13
  • For alpha-male, you can always write it in full text. For \epsilon-neighborhood, you really should write it with dollars : see for example the difference between $\epsilon$'-neighborhood (expansion of your macro) and $\epsilon'$-neighborhood (what you probably want to write). The point is : if it is always the same math symbol with the same text, you can encapsulate all in a macro. But if it may vary, you should stick with math markup. You can also see tex.stackexchange.com/questions/34830/…. – T. Verron Feb 20 '13 at 8:21
  • @T.Verron I understand that primes are funny and will take care of that. I will put it in math mode whenever it is not a single letter. – h__ Feb 20 '13 at 8:27
  • 1
    @hyh Yes, there is an easy solution for that: $\alpha$-male. But, since it's a technical term in a non mathematical field, probably \alphamale with a proper definition would be preferable. – egreg Feb 20 '13 at 8:46

I'm not sure why you would want to do this, but here's how anyway


Your queried approach would result in an infinite loop. The \let essentially makes an alias for the former meaning of \alpha which will allow you to redefine it later.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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