4

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?

  • 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. – user16581 Jul 13 '13 at 20:27
6

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}
  • thanks. I could have sworn I had read the manual already ;-) – user16581 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
2

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

  • 2
    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
  • 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
  • Also, agreed @AlanMunn. This solution definitely is not that elegant. I should have looked at the documentation... Haha. – Adam Liter Jul 13 '13 at 21:40

Your Answer

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