I use linguex and I don't want my examples to be separated from their interlinear gloss and translation by a page break. Currently I have to check the PDF output and use the package needspace, but obviously this is a chore/bore.
\needspace{4\baselineskip}
Keeps the next 3 lines together.
Is there any way of telling LaTeX not to split linguex examples across two pages, ever?
Clarification: I don't want it to keep sub-examples a. b. c. together.
Edit: adding a new command such as in the response to this same question in gb4e is not a solution to this question - I have already stated that the solution should not involve returning to each example environment manually. The solution for gb4e is undesirable as it would involve finding each already written example, but also because it changes line spacing slightly to the old gb4e style. It also involves the addition of a command to each linguex example, making it a less than elegant solution to a global problem within the document's style. There might be a solution in adding the \nobreak command to the package somehow, but as of now, there is no solution.
What I mean is that a linguex example looks like this:
\documentclass{article}
\usepackage{linguex}
\usepackage{leipzig}
\usepackage{lipsum}
\def\glt{\nobreak}
\begin{document}
\lipsum[1-5]
\exg. y cath-od\\
{\Art} cat-{\Pl}\\
`the cats'
Some text about cats.
\end{document}
whereas the solution proposed would be this:
\exg. y cath-od\\
{\Art} cat-{\Pl}\\
\glt `the cats'
and I want my examples to stay as they were because 1) don't want to edit them all by hand 2) inelegant solution to a straightforward issue.


gb4eandlinguexuse the same glossing macros (cgloss4e) this is a duplicate. – Alan Munn Aug 03 '16 at 14:11linguexdoes not use a command for its translation line, meaning I would have to go in and change all the hundreds of\exg.examples manually, which I have already stated that I do not want to do. I was talking about having to insert\needspacemanually, but\nobreakonly offers a similar solution so I think it's clear that it is undesirable. Would it help if I showed the layout of alinguexexample or should we assume respondents know the package basics? – Laua Aug 05 '16 at 15:57linguexshould have done was define\gltto do whatever it liked and keep the markup. The spacing issue is just a matter of removing the\vskipfrom the definition of\glt. Butlinguexby design eschews markup and so as a result you have no way to know that the translation line is a translation line. – Alan Munn Aug 05 '16 at 16:11\transinlinguexexamples too (iirc), so not just an issue of editing the newly defined command. – Laua Aug 05 '16 at 16:26