3

I'm using the gb4e for labeling examples in a semantic paper. The examples come with a specific context, and I want to mention that under this specific context, there are at least 2 felicitous answers. What I want is sth like:

(36) Context: It's raining outside.

A: It's a really nice weather today. --> instead of a.

B: Yes, you are right. --> instead of b.

B': Yes, but it is so hot. --> instead of c.

B'': No, you are wrong. --> instead of d.

(no spaces among these subexamples)

I understand by using other packages, e.g. linguex I can resolve the problem, but I was wondering if I can change any setting in the gb4e package to continue using it.

Thanks so much!

Here is the MWE (Sorry if the format looks terrible):

    \documentclass[12pt]{article}
     \usepackage{gb4e}
    \begin{exe}
    \ex Context: It's raining outside. 
    \begin{xlist}
    \ex[A:] It's a really nice weather today. 
    \ex[B:] Yes, you are right.
    \ex[B':] Yes, but it is so hot.
    \ex[B'':] No, you are wrong.
    \end{xlist}
    \end{exe}
    \end{document}
1
  • welcome to tex.stack... Can you provide a MWE of what you tried?
    – MadyYuvi
    Jun 26, 2019 at 10:57

2 Answers 2

2

If you're going to be doing this a lot, I would create a modified version of the gb4e \exi command to line up everything properly. I've called this \exk, and its corresponding \sn version, \snk. This is preferable to redefining \exi itself.

\documentclass{article}
\usepackage{gb4e}
\makeatletter
\newcommand\exk[1]{\item[{\makebox[1.5em][l]{#1}}]\@ifnextchar [{\@exj}{}}
\newcommand\snk{\exk{}}
\makeatother
\begin{document}
\begin{exe}
\ex Context: It’s raining outside.
\begin{xlist}
\exk{A:}{It's a really nice weather today.}
\exk{B:}{Yes, you are right.}
\exk{B’:}{Yes, but it is so hot.}
\exk{B’’:}{No, you are wrong.}
\snk{Some example}
\end{xlist}
\end{exe}
\end{document}

output of code

0

For providing custom example identifiers you can use \exi{<identifier>}, as explained in Section 1.2 (page 4) of the gb4e manual. Identifiers are not left aligned by default, so you could consider using B0, B1, B2 to make them all the same width (although in linguistics most people probably use the prime notation).

MWE:

\documentclass[12pt]{article}
\usepackage{gb4e}
\begin{document}
\begin{exe}
\ex Context: It's raining outside. 
\begin{xlist}
\exi{A:} It's a really nice weather today. 
\exi{B:} Yes, you are right.
\exi{B':} Yes, but it is so hot.
\exi{B'':} No, you are wrong.
\end{xlist}
\end{exe}
\end{document}

Result:

enter image description here

You must log in to answer this question.

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