Closed stefan11 closed 4 years ago
This is a minimal working example: \documentclass{article} % creates too much space between \zl and \eal \usepackage{langsci-gb4e} % this worked perfectly well. %\usepackage{langsci-gb4e-2018}
\begin{document}
Some text. Bla bla.
\eal
\ex[]{
\gll Der Mann hilft dem Kind.\\
the man helps the child\\
\glt `The man helps the child.'
}
\ex[]{
\gll Er gibt ihr das Buch.\\
he gives her the book\\
\glt `He gives her the book.'
}
\ex[]{
\gll Er wartet auf ein Wunder.\\
he waits on a miracle\\
\glt `He is waiting for a miracle.'
}
\zl
\eal
\ex[*]{
\gll Der Mann hilft er.\\
the man helps he\\
}
\ex[*]{
\gll Er gibt ihr den Buch.\\
he gives her the book\\
}
\zl
Some more text. Bla bla.
\end{document}
what happens if you remove \zl\eal
? What happens if you replace \zl\eal
with \z\ea
?
I can try, but it would be logically wrong and it would require changes in all my books.
Removing \zl\eal
resulted in:
This also removed the example numbers.
\z\ea
is also strange:
Felix send me some such suggestions earlier. This may work but it is semantically wrong. \eal opens a braket (\ea list) and \zl closes a bracket (\z list). Everything else is confusing.
The history of langsci-gb4e cannot be reconstructed in this repo, but it is available from here: https://github.com/langsci/CTAN/commit/9caf17798130a7985832fb4688583d87911f0868#diff-93912ba18b400eb7d866acc14c99f29f lines 347-410
The definitions of \eal
and \zl
appear unchanged AFAICS. (Note that there were three definitions of eal
, but that seems irrelevant.)
We can distinguish two conditions, which trigger differential insertion of vertical space
\ex
and \ex
a smaller amount is inserted\zl
and \eal
(or between \end{exe}
and \begin{exe}
, which is the same) a larger amount is inserted. This difference makes some semantic sense as it allows to group examples according to their relatedness.
It is possible to achieve the desired behaviour with
\eal
\ex[]{
\gll Der Mann hilft dem Kind.\\
the man helps the child\\
\glt `The man helps the child.'
}
\ex[]{
\gll Er gibt ihr das Buch.\\
he gives her the book\\
\glt `He gives her the book.'
}
\ex[]{
\gll Er wartet auf ein Wunder.\\
he waits on a miracle\\
\glt `He is waiting for a miracle.'
}
\end{xlist}
\ex
\begin{xlist}
\ex[*]{
\gll Der Mann hilft er.\\
the man helps he\\
}
\ex[*]{
\gll Er gibt ihr den Buch.\\
he gives her the book\\
}
\zl
, which is arguably ugly and opaque. A better solution would be
\begin{exe}
\ex
\begin{xlist}
\ex[]{
\gll Der Mann hilft dem Kind.\\
the man helps the child\\
\glt `The man helps the child.'
}
\ex[]{
\gll Er gibt ihr das Buch.\\
he gives her the book\\
\glt `He gives her the book.'
}
\ex[]{
\gll Er wartet auf ein Wunder.\\
he waits on a miracle\\
\glt `He is waiting for a miracle.'
}
\end{xlist}
\ex
\begin{xlist}
\ex[*]{
\gll Der Mann hilft er.\\
the man helps he\\
}
\ex[*]{
\gll Er gibt ihr den Buch.\\
he gives her the book\\
}
\end{xlist}
\end{exe}
If you prefer shorthands, you can use
\ea
\ea[]{
\gll Der Mann hilft dem Kind.\\
the man helps the child\\
\glt `The man helps the child.'
}
\ex[]{
\gll Er gibt ihr das Buch.\\
he gives her the book\\
\glt `He gives her the book.'
}
\ex[]{
\gll Er wartet auf ein Wunder.\\
he waits on a miracle\\
\glt `He is waiting for a miracle.'
}
\z
\ex
\ea[*]{
\gll Der Mann hilft er.\\
the man helps he\\
}
\ex[*]{
\gll Er gibt ihr den Buch.\\
he gives her the book\\
}
\z
\z
Please, this is not practicable. The semantics of \eal and \zl is pretty clear it worked for years. Why should one add \ea in the middle of something? We want to teach people to use this. I could not remember the setting above let alone explain this enthusiastically to somebody. And what would be a reason not to reestablish a state in which there is not too much space between the examples?
The behaviour is caused by a \nopagebreak
in the definition of exe
. If you remove this, the vertical space will become less. Still, the vertical space between
\end{xlist}\end{exe}\begin{exe}\ex\begin{xlist}
will be larger than the vertical space between
\end{xlist}\ex\begin{xlist}
.
This is also the case with the 2018 langsci-gb4e.sty version.
Oh. Wow. Thanks! Why does \nopagebreak
cause the insertion of space. This seems to be a deeper bug ...
Will this be fixed in the main class?
This was the same code in the previous edition of the book. Unfortunately, I cannot compile under texlive 2019 any longer, so I do not know whether this is related to tex or to our class.