Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\exi \gll in langsci-gb4e breaks justification #154

Open
kopeckyf opened this issue Jun 10, 2024 · 3 comments
Open

\exi \gll in langsci-gb4e breaks justification #154

kopeckyf opened this issue Jun 10, 2024 · 3 comments

Comments

@kopeckyf
Copy link
Contributor

When a row of examples contains an \exi that also contains a \gll, the justification is messed up. This error is not in gb4e and seems to have been introduced (without intention/knowledge) in langsci-gb4e.

MWE:

\documentclass{article}

\usepackage{langsci-gb4e}
\usepackage{lipsum}

\begin{document}
\begin{exe}
	\ex \lipsum[1]
	\exi{}
	\gll Lorem Ipsum Dolor\\
	     Lorem Ipsum Dolor\\	
	\ex \lipsum[2]
\end{exe}
\end{document}

Output:

grafik

@kopeckyf
Copy link
Contributor Author

Note that this issue does not arise if the \exi does not contain a gll:

\documentclass{article}

\usepackage{langsci-gb4e}
\usepackage{lipsum}

\begin{document}
\begin{exe}
	\ex \lipsum[1]
	\exi{} Hello World
	\ex \lipsum[2]
\end{exe}
\end{document}

grafik

@kopeckyf
Copy link
Contributor Author

kopeckyf commented Jun 10, 2024

Issue appears to be unrelated to \exi. Likely culprit is improper grouping in the definition of \gll:

\def\gll%                  % Introduces 2-line text-and-gloss.
   {\raggedright%
     \bgroup %\begin{flushleft}
     \ifx\@gsingle1%
	 \def\baselinestretch{1}\@selfnt\fi
    \bgroup
    \twosent
}

The \raggedright here is not grouped and should be placed after \bgroup. But it's not clear why \raggedright is needed here as it is not in use in \glll. Testing will reveal whether \raggedright should be deleted here.

@kopeckyf
Copy link
Contributor Author

It seems that the intention of \raggedright was to solve some overflowing issues, so these overflowing issues need to be kept in mind when \raggedright is removed/grouped/replaced with a better solution/...

Original commit: 046dca9 by @Glottotopia (?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant