1

As you can see in the image below, when using glwordalign=center, the punctuation in \gla counts as part of the word. As a result, \glb and \glc are centered not just on the word but also on the punctuation. How can I prevent the punctuation from being counted as part of the word so that only the words align but the punctuation is still there in its proper place? enter image description here

Here is the MWE:

\documentclass{book}        
\usepackage{expex}    
\lingset{glwordalign=center}

\begin{document}    
\exdisplay
\begingl
  \gla "aaaaa aaaaaaa!" aaaa aaaa aaaa... //      
  \glb bbbbb bbbbbbb bbbb bbbb bbbb //      
  \glc ccccc ccccccc cccc cccc cccc //      
\endgl
\xe    
\end{document}

P.S. ignore the wrong starting quotation mark.

3

You can use the \nogloss macro to mark unglossed elements in the \gla line, plus the @ to remove the space. Note that the spaces around the @ are required.

\documentclass{book}        
\usepackage{expex}    
\lingset{glwordalign=center}

\begin{document}    
\exdisplay
\begingl
  \gla \nogloss{``} @ aaaaa aaaaaaa @ \nogloss{!''} aaaa aaaa aaaa @ \nogloss{\ldots} //      
  \glb bbbbb bbbbbbb bbbb bbbb bbbb //      
  \glc ccccc ccccccc cccc cccc cccc //      
\endgl
\xe    
\end{document}

output of code

  • That looks nice. Can that be automated for a long document so that I don't have to do it in line? – AML Jul 28 '17 at 18:02
  • @AML Not trivially, if at all. It would involve making the punctuation marks active characters and then mapping them to the \nogloss macro. I would ask a separate question about that. – Alan Munn Jul 28 '17 at 18:04
  • Good idea. Question created here: tex.stackexchange.com/questions/383756/… – AML Jul 28 '17 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.