When using the expex
package, is there an elegant way to apply the same formatting to both a morpheme and its gloss? Say, for example, that I'd like to bold each prefix in my data and its gloss, like so:
This can, of course, be done by bolding the prefix and its gloss separately, as in this MWE:
\documentclass{article}
\usepackage{expex}
\begin{document}
\ex \begingl[glstyle=nlevel]
\glpreamble Niwaapamaa kimaamaa.\endpreamble
\textbf{ni-}[\textbf{1-}] % prefix and gloss bolded separately
waapam[see]
-aa[-\textsc{dir}]
\nogloss{\quad}
\textbf{ki-}[\textbf{2-}] % prefix and gloss bolded separately
maamaa[mother]
\glft `I see your mother.'
\xe
\end{document}
But the repetition of duplicate formatting commands like \textbf{ni-}[\textbf{1-}]
is inelegant. Fine for a one-off, but inefficient in a document with hundreds of glosses. Is there any way to take something like ni-[1-]
and apply the same formatting to both elements in one shot? My naive attempt was the following, which would allow the first prefix in the example above to be entered as \glprefix{ni-}{1-}
:
\newcommand{\glprefix}[2]{\textbf{#1}[\textbf{#2}]}
But it can't be that simple, because burying the two elements inside a single command prevents expex
from glossing them properly. I'm wondering if there's some kind of trickery to get around this.