[texhax] strange behavior of amsmath

jfbu jfbu at free.fr
Thu Dec 12 09:04:33 CET 2013


Le 12 déc. 2013 à 00:43, Reinhard Kotucha <reinhard.kotucha at web.de> a écrit :

> Hi,
> I would expect that the fleqn option of amsmath has only an impact on
> horizontal glue.
> 
> Curiously, if the fleqn option is active, there is extra vertical glue
> below the first formula of each paragraph and below the first formula
> following ordinary text.
> 
> Here is a minimal example:
> 
> <testfleqn.tex.gz>
> You get correct vertical spacing if you comment out the line
> containing "[fleqn]".  The relevant part of the amsmath source code
> looks quite innocent.  I can reproduce the problem with TeX Live 2003
> too, the oldest TL release I've currently installed.
> 
> The vertical bar in the test file is an argument of \smash, hence
> both, its height and depth is zero.  Its sole purpose is to make the
> extra glue more visible.
> 
> Please also note that "some text" in the test file doesn't start a new
> paragraph.
> 
> Where does the extra vertical space come from?  I doubt that it's
> deliberate. 
> 
> Regards,
>  Reinhard
> 
> -- 

Examining the log with showoutput reveals that with [fleqn] the first
formulas use of each block uses \abovedisplayskip and \belowdisplayskip
and the others \abovedisplayshortskip and \belowdisplayshortskip,

whereas without [fleqn] all use \abovedisplayshortskip and \belowdisplayshortskip

at least this is the probable location of the extra vertical glue, then
I have not looked at the amsmath code yet to find the spot where this
is is decided,

Regards
Jean-Francois




More information about the texhax mailing list