# Words not vertically aligned in gb4e glosses when underlined

I'm glossing my linguistic examples with gb4e and am having some problems with alignment. The language I am working with uses underlines in its orthography, and the morpheme that my paper focuses on requires an underlined g... alas.

When I attempt to put an underlined g into a gloss line, the word which contains the g receives different line spacing than the rest of the words on its line, making it look incredibly out of place (especially if I have three glossing lines, two of which contain the g). This affects almost all of my examples. Is there a way to force a particular line spacing for the glossed sections that will remain unaffected by underlines on characters with descenders?

Here is an example.

\documentclass{article}

\usepackage{gb4e}
\newcommand{\Gitg}{\underline{g}}

\begin{document}
\begin{exe}
\ex \glll   Guhu'mhl wan \Gitg ant John.\\
guxw-'m=hl wan  \Gitg an=t John\\
shoot-1pl.ii=det deer GAN=det John\\
\glt    \emph{John and I shot the deer.}
\end{exe}
\end{document}


Ideally a solution would be compatible with cgloss as I'm also using \hfill for right-aligned references. Using cgloss has no impact on this issue.

• assuming there will always be something else on the affected line(s), you might try \smash{\underline{g}} to get rid of the extra depth. (this gets rid of the height as well, which is why you always want something else on the line.) – barbara beeton Jul 5 '13 at 20:36
• A solution might be to slightly increase the interline skip in a \glll section. – egreg Jul 5 '13 at 22:11
• \smash works, thank you! But it does kind of leave the underline protruding a bit into the line below, so increasing the padding between lines instead (or as well) seems like the best option. How do I do that? I've been trying to find the appropriate variable to change but I'm pretty new to this and it's eluding me. – diboogit Jul 6 '13 at 1:19

Here are two ways:

\documentclass{article}

\usepackage{gb4e}

% Solution 1: expand the interline space in \glll
\usepackage{etoolbox}
\newcommand{\Gitg}{\underline{g}}

% Solution 2: smash the underline
%\newcommand{\Gitg}{\leavevmode\smash{\underline{g}}\vphantom{g}}

\begin{document}

\begin{exe}
\ex \glll   Guhu'mhl wan \Gitg ant John.\\
guxw-'m=hl wan  \Gitg an=t John\\
shoot-1pl.ii=det deer GAN=det John\\
\glt    \emph{John and I shot the deer.}\\
\emph{John and I shot the deer.}
\end{exe}
\end{document}


As you noticed, the solution with smashing the underline may make lines bump into each other. With the slight increase of the interline skip this doesn't happen.

I've added a second \glt line to show that the enlargement is confined to the \glll lines.