[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Figure/Table bug (Was: Non-floating figures in lout 3.06)

From: Valeriy E. Ushakov
Subject: Figure/Table bug (Was: Non-floating figures in lout 3.06)
Date: Fri, 29 Sep 1995 01:18:22 +0300 (MSK)


I stuble across this bug today and after some investigation can offer
a fix to it. Sorry for not stumbling over this bug for so long time
since you posted your question :-).

On Wed, 20 Sep 1995 address@hidden wrote:

> ... how can I adjust the space between two figures that have been
> placed one after another (they're not next to each other in the
> source file, they've just floated to the top of the same page)?
> There looks to be almost none and they're pretty cramped.

Sigh. There's a subtle bug in `dl' layout. I found it when two tables
came together at one page. The code for tables and figures is
identical (up to s/Figure/Table/g), so this bug affects both. I can
offer an explanation, but this is just my humble opinion.

def @TableList right x
              @NumberMarker @TableNum
    //        @TablePlace
    //@TopGap @TableList @Next x

That's ok. But @NumberMarker is @Null!!! Now let's follow the
rewriting rules when two figures/tables meet together:

          @NumberMarker @TableNum
//        @TablePlace
//@TopGap @TableList @Next x

This is rewritten to 

          @NumberMarker @TableNum
//        @TablePlace
//@TopGap @NumberMarker @Next @TableNum # <--- the bug is here !!!
//        @TablePlace
//@TopGap @TableList @Next @Next x

Now recall that @NumberMarker is @Null. Reffer to section 3.21 of
expert guide.:

| This symbol (@Null) provides a convenient way to remove unwanted
| concatenation symbols. If there is a concatenation symbol preceding
| @Null, the @Null and the concatenation symbol are both deleted.
| Otherwise, if there is a following concatenation symbol, it and the
| @Null are both deleted. Otherwise, @Null becomes an empty object.
| These rules apply to a fully parenthesized version of the
| expression.

And as described in the previous excerpt, lout happily deletes
//@TopGap and following @Null (@NumberMarker).

Well, the fix is simple: protect //@TopGap with another //
concatenation that will disappear together with @Null. Patch follows.
It fix this bug in @TableList and @FigureList.

*** dl  Tue Jul 25 07:22:53 1995
--- /usr/local/share/lout/include/dl    Thu Sep 28 21:26:06 1995
*** 3410,3414 ****
!                       @NumberMarker @FigureNum
            //          @FigurePlace
            //@TopGap   @FigureList @Next x
--- 3410,3414 ----
!           //          @NumberMarker @FigureNum
            //          @FigurePlace
            //@TopGap   @FigureList @Next x
*** 3521,3525 ****
!                       @NumberMarker @TableNum
            //          @TablePlace
            //@TopGap   @TableList @Next x
--- 3521,3525 ----
!           //          @NumberMarker @TableNum
            //          @TablePlace
            //@TopGap   @TableList @Next x

> I have various small @Figures (all included eps files) that I'd like
> to anchor to the spot in the document they're included, rather than
> having them float to the top of the next page. Possible?

@Figure and @Table just carry their bodies to the @TopPlace, add
caption and send this caption to the table of contents. If you can
sacrifice captions just place your @Tab's and @Fig's into displays.

Best regards!

SY, Uwe.
Valeriy E. Ushakov (aka Uwe)            |       Zu Grunde kommen
address@hidden                         |       Ist zu Grunde gehen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]