I am searching for a way to automatically format appropriate parts of a gb4e
morpheme-by-morpheme gloss in small caps.
I use small caps in the gloss line to mark out functional material; that is, everything apart from the lexical root is formatted in small caps, as in the picture.
Currently, I produce this by adding \textsc
every time I want to have small caps. Thus, the example in the picture is generated by the following code:
%typeset in XeLaTeX for the Turkish characters to show correctly; but this is not what's at stake
\documentclass{article}
\usepackage{gb4e}
\begin{document}
\begin{exe}
\ex \gll Hasan-Ø [uşağ-ın oda-yı temizle-me-sin]-i söyle-di-Ø. \\
Hasan-\textsc{Nom} servant-\textsc{Gen} room-\textsc{Acc} clean-\textsc{NFNom-3Sg-Acc} say-\textsc{Past-3Sg} \\
\glt `Hasan said that the servant should clean the room.'
\end{exe}
\end{document}
Note the five occurrences of \textsc
in the gloss line; it's this repetition that I'd like to avoid. I'm looking for a way to tell gb4e
to format the appropriate chunks of the gloss line into small caps every time I need to generate a gloss. I assume this would involve fiddling with the package macros, but I'm not sure how to implement this.
In terms of defining the environment where I would need small-capitalisation to apply, I can define it as follows. It is the gloss line only, understood (in the simplest case) as the string between the two occurrences of \\
within the example
environment defined by \begin{exe}
and \end{exe}
. Within this domain, small-capitalisation should affect whatever sits between a dot or dash (which are the symbols separating morphemes) and a whitespace.
Having to add \textsc
multiple times is only a minor annoyance, so it wouldn't break my heart to find that what I'm asking for is misguided. But it would be nice to have this automation.
\let\eachwordtwo=\textsc
. The catch is that you only want the gloss labels in small caps, not the translations...leipzig
. It is designed specifically for linguistic gloss abbreviations, and along with handling the small caps, it also lets you easily create abbreviations lists.