Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When there is an example with a number more than three digits, the free translation line is too far to the left in gb4e examples.

\documentclass{article}
\usepackage{gb4e,cgloss4e}
\begin{document}

    \begin{exe}
        \exi{(10.159)} \gll    b\'u \`a k\H{o} k\`am t\`aha k\'{\i}    \\
            cl2 {\sc ds} (b)hold (a)break (a)scatter cl7      \\
    \glt    ``They broke it off.'' (Missong)
    \z
\end{document}

enter image description here

Has anyone dealt with this problem before?

share|improve this question
    
Can you please post a MWE. I am not able to get your code to compile. –  Adam Liter Jul 13 '13 at 20:12
1  
@Adam i cleaned up the code to make it a MWE. thanks. –  jlovegren Jul 13 '13 at 20:27
add comment

2 Answers 2

up vote 5 down vote accepted

From the gb4e- documentation:

All example-list commands have an optional argument which allows you to set the labelwidth to, e.g., the widest label to come (...). So, \begin{exe}[(234)] will set the labelwidth to the width of “(234)”—which is also the default. (...) The default labelwidth for the exe- environment can also be changed globally by issuing a \exewidth{<string>} command in the preamble of your document

So, for your example, both of the following work (I also suggest to use small-caps as already demonstrated by Adam in his answer, as well as separate the language name from the translation with \hfill unless explicitly required otherwise):

\documentclass{article}
\usepackage{gb4e,cgloss4e}
\begin{document}

    \begin{exe}[(10.159)]
        \exi{(10.159)} \gll    b\'u \`a k\H{o} k\`am t\`aha k\'{\i}    \\
            \textsc{cl}2 \textsc{ds} (\textsc{b})hold (\textsc{a})break (\textsc{a})scatter \textsc{cl}7      \\
    \glt    ``They broke it off.'' \hfill (Missong)
    \z
\end{document}

or

\documentclass{article}
\usepackage{gb4e,cgloss4e}
    \exewidth{(10.159)}
\begin{document}

    \begin{exe}
        \exi{(10.159)} \gll    b\'u \`a k\H{o} k\`am t\`aha k\'{\i}    \\
            \textsc{cl}2 \textsc{ds} (\textsc{b})hold (\textsc{a})break (\textsc{a})scatter \textsc{cl}7  \\
    \glt    ``They broke it off.'' \hfill (Missong)\\
    \z
\end{document}
share|improve this answer
    
thanks. I could have sworn I had read the manual already ;-) –  jlovegren Jul 13 '13 at 21:09
    
On top of using \hfill, I find it's usually prettiest to have the language name on the first line. This is possible by doing \hfill \raisebox{2\baselineskip}[0][0]{(Missong)}. –  Emiel Jul 13 '13 at 23:25
add comment

This is a bit of a hack, but you can achieve the output that you want by adding the translation line as an unnumbered example with the optional judgment argument empty:

\documentclass{article}

\usepackage{gb4e}

\begin{document}

\begin{exe}

\exi{(10.159)}{\label{exArgStructAb60e2}
\gll    b\'u \`a k\H{o} k\`am t\`aha k\'{\i} \\
        \textsc{cl}2 \textsc{ds} (\textsc{b})hold (\textsc{a})break (\textsc{a})scatter \textsc{cl}7 \\}
\sn[]{``They broke it off.'' (Missong)}

\end{exe}

\end{document}

enter image description here

And, if, for whatever reason you need the main example to have a judgment, you can also use this approach, which is another hack, more than anything:

\begin{exe}

\exi{(10.159)}[*]{\label{exArgStructAb60e2}
\gll    b\'u \`a k\H{o} k\`am t\`aha k\'{\i} \\
        \textsc{cl}2 \textsc{ds} (\textsc{b})hold (\textsc{a})break (\textsc{a})scatter \textsc{cl}7 \\}
\sn[\hphantom{000*}]{``They broke it off.'' (Missong)}

\end{exe}

enter image description here

share|improve this answer
1  
Maybe an \hphantom is better than guessing how many ~ are necessary. It seems that \sn[\hphantom{000*}] does the trick. –  egreg Jul 13 '13 at 20:29
    
Thanks for the tip, @egreg. I've updated my answer. –  Adam Liter Jul 13 '13 at 20:34
1  
Although this works, since gb4e provides a mechanism for specifying the label width, I think JakobMST's answer is to be preferred. –  Alan Munn Jul 13 '13 at 21:08
1  
On the other hand, Adam's solution shows small caps in the appropriate places, which I glossed over (no pun intended). –  JakobMST Jul 13 '13 at 21:21
    
@JakobMST +1 for the 'inadvertent' pun! –  Adam Liter Jul 13 '13 at 21:40
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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