bugGNU TeXmacs - Bugs: bug #36301, Unstable typesetter flip-flops...


You are not allowed to post comments on this tracker with your current authentication level.

bug #36301: Unstable typesetter flip-flops forward references

Submitted by:  Sam Liddicott <samjam>
Submitted on:  Wed 25 Apr 2012 01:54:26 PM UTC  
Category: TypesetterPriority: 5 - Normal
Item Group: ErrorStatus: Wont Fix
Privacy: PublicAssigned to: Joris van der Hoeven <vdhoeven>
Originator Name: Open/Closed: Open
Release: Release: None
Fixed Release: NoneFixed Release: 

Fri 23 Jun 2017 05:56:33 PM UTC, comment #4:

I fear that this bug is somewhat hard to prevent. It seems like trying to meet several contradictory constraints at the same time. So I guess that some flip-flopping at such occasions should be allowed, as long as it does not induce any segfaults. We might wish to issue a warning though.

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Thu 26 Apr 2012 07:42:33 AM UTC, comment #3:

Trimming the document, it seems like there may be two possible triggers

1. The trigger may be a single trailing paragraph on the page.

On the following update it seems to remember to avoid the trailing paragraph and tighten the spacing.

On the following typeset it either forgets why it did that or finds things to squashed and so the paragraph ends up alone again.

2. Page headers.

I insert a label start of a chunk and also at the end of the chunk. I then compare the page numbers that the labels occur on. If the page numbers are not the same, then I <set-this-page-header|...> to be identical to the chunk header.

This allows chunks that span a page break to have a code header on the new page (instead of the page header).

I figured this should be safe as I don't change the size of the page header (I thought).

But if I don't set the page header, then the problem does not occur.

The implication that in a run of pages up to a page break, setting the page header for a single page in the run can affect typesetting.

I need a way to set the page header without changing it's size.

I altered the code that sets the page header to be:

and the problem still occurs, so I need to find out if setting the page header triggers any particular typesetting effects or actions.

Sam Liddicott <samjam>
Project Member
Wed 25 Apr 2012 02:20:46 PM UTC, comment #2:

Opening another window onto the same view/buffer (even at page 1) prevents the flip-flopping.


Closing the extra window doesn't re-start flip-flopping unless document-update-all is done.

Sam Liddicott <samjam>
Project Member
Wed 25 Apr 2012 02:06:16 PM UTC, comment #1:

I'm still doing more investigation on this, I post it here as a discussion point.

Sam Liddicott <samjam>
Project Member
Wed 25 Apr 2012 01:54:26 PM UTC, original submission:

See the attached document (and stylesheet).

It has professional typesetting algorithm set.

At the bottom of page 26 there is a forward reference to 27a

Look at the top of page 27, the chunk is called 26f but should be 27a.

Click on Tools->Update->Styles

Now the chunk from the top of 27 has moved to the bottom of page 26 and should be called 26f but is now called 27a.

We can talk about the mechanism for a macro working out what page it is on (it inserts a label and then reads the binding to get the page number), but that's not the point; it would work if the paragraph didn't keep switching around.

The label business aside, if the paragraphs keep flipping around then there is a good chance that a new edition of an article or book that fixes a spelling on the last page could have other paragraphs on different pages than the previous revision.

Most interestingly as I try to document this I find that exporting a pdf makes the layout stable for a few iterations (or maybe until I do "document->update-all") at which point it becomes unstable again.

I will try and find a workaround for reseting counters each page, but the issue here is the flip flopping.

I realise that sometimes use of a reference whose label changes size can materially affect the typesetting if the label text size changes as the page number changes, e.g. 99 to 100, but that isn't happening here as far as I can tell.

Sam Liddicott <samjam>
Project Member


Attached Files
file #25734:  fangle.ts added by samjam (44KiB - text/vnd.trolltech.linguist - pdfs show the different layouts from page 26 onwards.)
file #25735:  fangle.tm added by samjam (324KiB - text/texmacs - pdfs show the different layouts from page 26 onwards.)
file #25736:  fangle-1.pdf added by samjam (867KiB - application/pdf - pdfs show the different layouts from page 26 onwards.)
file #25737:  fangle-2.pdf added by samjam (867KiB - application/pdf - pdfs show the different layouts from page 26 onwards.)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by vdhoeven (Posted a comment)
  • -unavailable- added by samjam (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 23 Jun 2017 05:56:33 PM UTCvdhoevenItem GroupNone=>Error
      StatusNeed Info=>Wont Fix
      Assigned toNone=>vdhoeven
    Wed 25 Apr 2012 02:23:39 PM UTCsamjamStatusNone=>Need Info
    Wed 25 Apr 2012 01:54:26 PM UTCsamjamAttached File-=>Added fangle.ts, #25734
      Attached File-=>Added fangle.tm, #25735
      Attached File-=>Added fangle-1.pdf, #25736
      Attached File-=>Added fangle-2.pdf, #25737

    Back to the top

    Powered by Savane 3.1-cleanup1