2

I'm using gb4e for my linguistics examples. Is there any way to have one line that is not vertically aligned before the \gll or \glll line? I'd like to write a line of phonetic transcription (i.e. actual pronunciation) but it shouldn't be vertically aligned with the words and their glosses.

A MWE is something like this:

\documentclass[a4paper]{article}  
\usepackage{fontspec,xunicode}  
\usepackage{gb4e}    
\begin{document}  
\begin{exe}  
\ex  
[hok'waqayX̣] %this is where it doesn't work  
\glll hu    =k'wa   qayX\\  
    hu =k'wa    qayX\\  
    go =QUOT Mink\\  
\glt  `Mink went'  
\end{exe}  
\end{document} 

and I'd like it to look like:

(1)[hok'waqayX̣]  
    hu =k'wa qayX  
    hu =k'wa qayX  
    go =QUOT Mink  
    `Mink went'

1 Answer 1

2

The simplest way to do this is to put the phonetic transcription in the \ex line and then introduce your glossed example with a numberless \sn line.

The main reason why your sample document doesn't work is that the \ex command is looking for a [ for the grammaticality judgement; you need to protect the [ in the phonetic transcription by enclosing the transcription in { ... }.

With no modification, there is a slight space between the transcription line and the rest of the example, which is the standard space between numbered examples. If you don't like that, I've added code to remove it (just uncomment the code). I also removed the xunicode package which does not need to be loaded by the user anymore.

\documentclass[a4paper]{article}  
\usepackage{fontspec}
\usepackage{etoolbox}
\usepackage{gb4e}
% Uncomment this code to decrease spacing between \ex and following \sn
%\makeatletter
%\patchcmd{\@subex}{\itemsep3}{\itemsep1}{}{}  
%\makeatother

\begin{document}  
\begin{exe}  
\ex{[hok'waqayX̣]} % If an example line begins with [ it must be enclosed in braces 
\sn{\glll hu    =k'wa   qayX\\  
    hu =k'wa    qayX\\  
    go =QUOT Mink\\  
\glt  `Mink went' } 
\end{exe} 


\end{document} 

With no spacing adjustment:

no spacing adjustment

With spacing adjustment:

with spacing adjustment

3
  • Thank you. (Apologies for my late reply.) It worked great, except when I tried the part you commented out, it gives me an error, that ! Argument of \@subex has an extra } .
    – renoh
    Jan 20, 2016 at 1:21
  • @renoh Are you sure you commented out all three lines? The posted code compiles properly for me.
    – Alan Munn
    Jan 20, 2016 at 2:39
  • I forgot to add the etoolbox package. It now works great. Thank you!
    – renoh
    Jan 20, 2016 at 10:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .