On Mon, Nov 15, 2010 at 08:41:20PM -0500, Richard Heck wrote:
> On 11/15/10 7:09 PM, Enrico Forestieri wrote:
> >On Tue, Nov 16, 2010 at 12:01:59AM +0100, Jean-Marc Lasgouttes wrote:
> >>Le 15 nov. 10 à 23:48, Enrico Forestieri a écrit :
> >>>See attached patch. This solves the problem of the extra line after
> >>>\end{split}, but the code should be audited for other occurrences
> >>>of extra newlines.
> >>>
> >>>I think we could also use this method for properly ending math
> >>>environments on a new line (i.e., y=x\] vs y=x\n\]) without fear
> >>>of introducing spurious empty lines.
> >The attached patch achieves that goal. All closing \end{mathenv}
> >environments now occur at the beginning of a line without risk of
> >empty lines.
> >
> Crazy question: Would it be possible to add an ASSERT somewhere that
> made sure we don't try to output newlines raw? For devel builds only, of
> course, but it's hard to see what else will make really sure someone never
> messes this up.

I think it would suffice never outputting \n directly but always using
pendingNewline(true) whenever a newline is needed (except, maybe, when
one is sure that two consecutive newlines are not possible).

-- 
Enrico

Reply via email to