1

In a list of linguistic example provided by gb4e, I would like to reduce the space between the label of the top level (enumerated label) and the label of the second level (label with alphabet).

I know that \labelsep2.5\p@ set the space between the label with alphabet and the example sentece as 2.5pt, and that \leftmargin\labelwidth changes the left margins of both the enumerated label and the label with alphabet.

However, I do not know how to set the space between the enumerated label and the label with alphabet. Do you have any idea to achieve this?

enter image description here

MWE

\documentclass[
]{article}
\title{Interlinear Glossing}
\author{CLRR}
\date{}

\let\mathexp=\exp % save the math definition of \exp
\usepackage{gb4e}\noautomath
\let\gbexp=\exp % save the gb4e definition of \exp
\DeclareRobustCommand{\exp}{\ifmmode\mathexp\else\expandafter\gbexp\fi}

\makeatletter

\def\@subex#1#2{%
  \settowidth{\labelwidth}{#1}%
  \itemindent\z@\labelsep#2%
  \parsep\p@ plus .5\p@ minus .5\p@%
  \labelsep2.5\p@
  \leftmargin\labelwidth%
  \advance\leftmargin#2\relax
}

\makeatother

\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\begin{exe} \judgewidth{}
  \ex 
      \begin{xlist}
  \ex [] { 
       \textbf{A variant}
  \gll \emph{Tarō=ga} \emph{Kanako=ni} \emph{hon=o} \emph{kat-ta.} \\
       T.=\textsc{nom} K.=\textsc{dat} book=\textsc{acc} buy-\textsc{past} \\
  \glt `Tarō bought a book for Kanako.' }
  \ex [] { 
       \textbf{B variant}
  \gll \emph{Tarō=ga} \emph{Kanako=ni} \emph{hon=o} \emph{kat-ta.} \\
       T.=\textsc{nom} K.=\textsc{dat} book=\textsc{acc} buy-\textsc{past} \\
  \glt `Tarō bought a book for Kanako.' }
  \end{xlist}
  \label{Japanese}
\end{exe}

\end{document}

1 Answer 1

1

I solved the problem by setting \leftmargin for the the enumerated label and that for the label with alphabet separately by label with alphabet:

\makeatletter
\def\@subex#1#2{%
  \settowidth{\labelwidth}{#1}%
  \itemindent\z@\labelsep#2%
  \parsep\p@ plus .5\p@ minus .5\p@%
  \labelsep2.5\p@
  \leftmargin\labelwidth%
  \ifnum\the\@xnumdepth=1
    \leftmargin\labelwidth
    \topsep 7\p@ plus2\p@ minus3\p@\itemsep3\p@ plus2\p@
  \else
    \leftmargin0.5\labelwidth
    \topsep 1.5\p@ plus\p@\itemsep1.5\p@ plus\p@%
    \parsep\p@ plus.5\p@ minus.5\p@%
    %\advance\leftmargin#2\relax
  \fi
  \advance\leftmargin#2\relax
}
\makeatother

You must log in to answer this question.

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