I am using the expex package to give a word-by-word translation in English of examples from foreign languages. Because word-by-word translations can be sometimes quite long and abstract, it is conventional in linguistics to use a set of agreed-upon abbreviations. For instance, the term ergative' is abbreviated aserg'. Furthermore, I want this abbreviation to be in small caps, so I defined a new command as below.
\newcommand{\gERG}{\textsc{erg}}
The issue is that when I use the newly defined command, the word-by-word alignment is messed up. Compare an example without the new command and one with.
\ex \begingl
\gla word word word //
\glb word.\textsc{erg} word word //
\glft Translation. //
\endgl \xe
This gives me, as expected, an example with a line of abbreviations that are aligned as follows.
(1) word word word
word.ERG word word
Translation.
But if I use my newly defined abbreviation as follows,
\ex \begingl
\gla word word word //
\glb word.\gERG word word //
\glft Translation. //
\endgl \xe
I get something messy as in (2).
(2) word word word
word.ERGword word
Translation.
If I put {} around every word, it solves the issue but that wastes time and kind of defeats the purpose of having abbreviations in the first place.
How to make sure that the newly defined command behaves?
Thanks.
leipzigpackage, which provides commands for all the gloss abbreviations in the Leipzig Glossing Rules, plus allows you to create your own. But even with that package, you will still need to use\Erg{}in order to avoid the problem you mention here. You can use punctuation to end the command (\Erg-nounor\Erg.\Sg{}), but you have to be careful, especially when copying and pasting, to make sure all the word-final commands have something to terminate the command. – Jason Zentz Oct 03 '17 at 19:45