[l2h] intertext bug (and possible fix)

Ross Moore Ross Moore <ross@ics.mq.edu.au>
Sat, 2 Dec 2000 16:42:37 +1100 (EST)


> Using \intertext{...} within an amsmath align or align* environment seems
> to be broken. E.g.,
> 
> The following diff on styles/more_amsmath.perl seems to fix these
> problems:
> 
> David Rourke
> 
> *** more_amsmath.perl.orig	Thu Nov 30 16:29:56 2000
> --- more_amsmath.perl	Thu Nov 30 16:42:22 2000
> ***************
> *** 474,481 ****
>   	(s/$next_pair_pr_rx/$text = $2;''/e)
>   	||(s/$next_pair_rx/$text = $2;''/e));
>       $post = $_; $post =~ s/(^\s*|\s*$)//go;
> !     $text = &translate_environments(&translate_commands($text))

Oops; that is definitely the wrong way around.

> !     $text = &translate_commands(&translate_environments($text))
>   	if ($text =~ /\\/);

>   	    if (/\\intertext/) {
>   		local($extra_row);
> ! 		($extra_row,$_) = &process_intertext($numbered,$_);

> ! # changed der, always give extra an cell span to the intertext, as
> ! # a cell is always allocated for an equation number on a normal line, even
> ! # if align* is used.
> ! 		($extra_row,$_) = &process_intertext(1,$_);
>   		$return .= $extra_row;

Yes, this seems to be correct.
I haven't tested it with every possible alignment environment,
but it is definitely an improvement with some of them.


Thanks very much for finding this.
I have committed appropriate changes to the CVS repository at Bayreuth.

Cheers,

	Ross Moore

> 
> 
>