pandoc-ling
pandoc-ling copied to clipboard
Grammaticality judgements not aligned in interlinear examples when targeting Linguex
When targeting Linguex, grammaticality judgements are not aligned in interlinear examples.
See the output for example (4.12c) on page 10 of https://github.com/cysouw/pandoc-ling/blob/main/docs/readme_linguex.pdf
I think it's because the filter is outputting the interlinear lines for Linguex using \gll, etc., with the judgment intervening.
https://github.com/cysouw/pandoc-ling/blob/a9eae71593c0d12e3db68342d0c7e22ec2b23deb/docs/readme_linguex.tex#L595-L599
However the Linguex docs point out that judgments won't be aligned unless using \exg. or \ag., etc instead of \ex. \gll (see the bottom of page 3 and top of page 4 of their docs):
Likewise, writing \ex.\gll instead of \exg. will have the effect of not prefixing the grammaticality judgment.
I'm guessing that the decision to use \gll with the filter was to support preambles, however, as Linguex doesn't support them using \exg, etc. Is that right?
After looking through the linguex source, it looks like \gll could be replaced with \newgll, which is what they use internally to check for grammatically judgments before the gloss lines in \exg., ag., and \bg..
Doing so fixes the alignment, but only for the judgments they test for: *, ?, #, and % (according to the linguex docs).
So the example in readme.md with :–) still won't work.
To test it out, I created an MWE using the output for example (4.12) in docs/readme_linguex.tex, but changed \gll to \newgll and changed the the grammaticality judgment to *:
\documentclass[12pt]{article}
\usepackage{linguex}
\begin{document}
\ex. \label{ex4.12} Completely superfluous preamble, but it works
\ldots{}
\a. Mixing single line examples with interlinear examples.
\b. This is of course highly unusal. Just for this example, let's add
some extra material in this example.
\b. Dutch (Germanic) Note the grammaticality judgement!
\newgll *\emph{Deze} \emph{zin} \emph{is}
\emph{(dit~is~test)} \emph{nederlands.} \\
\textsc{dem} sentence \textsc{aux} ~ dutch. \\
\glt `This sentence is dutch.'
\b.
\newgll \emph{Deze} \emph{tweede} \emph{zin} \emph{heeft} \emph{geen}
\emph{header.} \\
\textsc{dem} second sentence have.\textsc{3sg}.\textsc{pres} no
header. \\
\glt `This second sentence does not have a header.'
\end{document}