I'm certain I have read that
xspace can cause more problems than it solves. But I cannot find anything to that effect either on this site or the web. Are there any drawbacks or risks associated with it?
|show 2 more comments|
I originally implemented
The original version used a very simple nested test for following punctuation, but it could get the test wrong in some (well rather a lot really) of cases. Morten made the tests a lot better so the current version makes the correct choice in more cases and is more easily customised) however making the tests more complicated highlights the problem with this kind of package.
The rule in TeX is really quite simple, after a command name that uses letters (as opposed to single character command names using non-letters such as
So, if you find it useful, fine, it's there. But personally I wouldn't recommend it.
It has been mentioned on the site before, however, it seems to me that it can have its place here. You can define your commands in such a way that you can't forget the space at all. This is done by defining:
(you can't use
You can test yourself that the space in
which means exactly what it says: You defined
However, the best thing to do is not to define shorthands like