On Tue, Apr 22, 2014, Ulrich Lauther wrote: > Well of course not. A paragraph ends, e.g. when an empty line is > seen. Probably there are a whole lot of other conditions. My > understanding is that formatting takes place after macros have > been expanded; at the macro level it would be easier. So could > the macros issue some hint (in form of a pseudo comment) when they > realize that a paragraph has ended?
Signalling the end of collected paragraphs can't be done exclusively within macros because, unlike SGMLs, paragraph macros in groff generally aren't closed. That means that every macro introducing a new semantic element would have to test, at the start of the macro definition, whether paragraph collecting is currently taking place, and bring it to an end so the paragraph can be formatted. While that would work in a lot of cases, I think the better strategy would be to implement two requests, say .pb and .pe, usable within macro definitions, but also available on-the-fly in cases where the user needs to specify the block of text that constitutes a paragraph. -- Peter Schaffter http://www.schaffter.ca