I'd like to define acronyms via the \def command. I know that the acronym package exists, but that's too much typing (\ac{myacronym} vs. \myacronym).
The problem that I have is that for \def\myacronym{acronym expanded}, it won't have an empty space after it, so I can only use it in front of punctuation. For \def\myacronym{acronym expanded }, I cannot use it before punctuation because it always causes an empty space.
My question is: How can I detect whether punctuation comes after the acronym, so I can dynamically generate a space only if needed. Also, it would be nice to be able to detect whether there is the string ". " before my acronym, so I could make the acronym uppercase dynamically.
I guess this is kind of hard to do since those parameters are not passed to the function, but maybe somebody has an idea. Thanks for your help:)


some \myacronym\ textto produce the space when I need to. – Juan A. Navarro Aug 18 '10 at 12:36