Extracting Linguistic examples from a Latex document

Lingues is one of the most popular packages used among linguists. It has a nice feature to extract a handout. But, what I wanted was to get just the examples (excluding the subsections).

This macro solves the problem.
It works for examples with glosses, as well as without glosses.

Extract_Linguex.kmmacros (5.1 KB)

Improved the line breaks based on @JMichaelTX's suggestion

Extract_Linguex 0.2.kmmacros (5.1 KB)