MantisBT - Core Inform
View Issue Details
0000258Core InformReleasing, bibliographic data, cBlorbpublic2010-08-20 16:012010-10-28 00:30
(cosmetic) Index is created incorrectly
0000258: Released web source had duplicated index when a footnote occurs in the prefatory lines (with solution)
If the prefatory lines (before the first heading) include a footnote comment then the first page of the website source contains a duplicate copy of the index in the footnote section.
"Website Source Index Test"

Release along with a website and source text.[*Footnote]

Bedroom is a room.

Chapter 1

Kitchen is a room.[*note 2]

Chapter 2

Foyer is a room.
If for some reason this doesn't reproduce the problem for you or you don't know what I'm talking about; I've made the Release folder the above example produced accessible and you can view the problem index at: [^]

On a related note, the first page is labeled "1 of 2", as is the second page. The third page is labeled "2 of 2" (i.e. the first page with the index isn't being counted but yet numbers itself).
No tags attached.
related to 0000100closed graham Releasing source text causes the "heading" span tags to be misplaced. 
txt cBlorb-inweb-patch.txt (6,433) 2010-08-26 12:01
Issue History
2010-08-20 16:01dchapesNew Issue
2010-08-21 03:04dchapesNote Added: 0000409
2010-08-23 15:29jmcgrewStatusnew => acknowledged
2010-08-24 12:17EmacsUserNote Added: 0000424
2010-08-24 12:17EmacsUserStatusacknowledged => confirmed
2010-08-25 03:35dchapesNote Added: 0000431
2010-08-25 03:40dchapesNote Edited: 0000431bug_revision_view_page.php?bugnote_id=0000431#r217
2010-08-25 08:23curiousdanniiRelationship addedrelated to 0000100
2010-08-26 12:01jmcgrewFile Added: cBlorb-inweb-patch.txt
2010-08-26 12:03jmcgrewNote Added: 0000440
2010-08-26 12:04jmcgrewPrioritylow => normal
2010-08-26 12:04jmcgrewSummaryReleased web source had duplicated index when a footnote occurs in the prefatory lines => Released web source had duplicated index when a footnote occurs in the prefatory lines (with solution)
2010-09-02 02:24grahamNote Added: 0000486
2010-09-02 02:24grahamStatusconfirmed => resolved
2010-09-02 02:24grahamResolutionopen => fixed
2010-09-02 02:24grahamAssigned To => graham
2010-10-25 21:14jmcgrewFixed in Version => 6F95
2010-10-28 00:30jmcgrewStatusresolved => closed

2010-08-21 03:04   
For what it's worth, a one line changes seems to fix this for me. In cBlorb, at 3/web - Website Maker ยง36, in the <Filter out lines for the preface> section of the write_source_line() function; I put a condition to the call to typeset_contents_listing() like so:

if (!SOURCENOTES_mode)
2010-08-24 12:17   
Confirmed, though I haven't tried the patch in 0000258:0000409.
2010-08-25 03:35   
(edited on: 2010-08-25 03:40)
I discovered and fixed several other bugs in cBlorb; rather than submit several small issues I'll just append to this issue.

I don't know how to edit the source to reproduce field above or add an attachment file to mantis issues... this modified source demonstrates all the bugs and fixes. This source is also available at [^]
"cBlorb Test"

Release along with a website and source text.[*Standard Footnote]

Bedroom is a room. [Comment with mismatched " is okay in the IDE but messes up cBlorb; note that 
it stops finding heading levels below this point and puts the rest of the source on this page.]

Chapter 1

Kitchen is a room.[*note 2]

Chapter 2

Foyer is a room.[*cBlorb gets confused by [nested comments] in footnote.]

A book is here.

A website generated with the built-in cBlorb is available at: [^]
This can be compared to the results after my changes: [^]

A patch file for the *.w inweb source is at: [^]
Note, I don't have tangle so that was generated by hand from the the following cBlorb.c patch: [^]

The problems addressed are as follows:

  • The header bug from 0000100 (not shown by this text due to the ["] bug below).
  • The bug mentioned above in this issue (although not shown due to the ["] bug).
  • Comments with mis-matched quotes ["] now handled as in the IDE.
  • Footnotes with nested [] now handled (but still must be all on one line).
  • File sizes on the index page now use kB, MB, GB, etc instead of KB, MB, GB, etc.
  • The linkcues now use the notecue span as used in the the Standard CSS and the INWEB comments instead of linknotes; this makes the cues pickup the superscript style from the default Standard CSS.
  • While I was in there I added links from the footnotes back up to their cue (you can click them in the "fixed" example but since it all should fit on a single screen you won't see much).
The page number on the first source page is still misleading and was not addressed.

2010-08-26 12:03   
I've attached the patch to this issue. (Only bug staff can do that - if you have an attachment to upload in the future, email with the file and the issue number.)
2010-09-02 02:24   
Many thanks to Dave Chapeskie for unpicking these little knots. I've adopted all of the patch except for the kB versus KB amendment: I think conventional usage is a large K, and SI be damned. (I cite, for instance, the Mac OS X Finder as evidence.) The back links from note to note-cue are a nice touch, even if they're not properly speaking a bug fix, and I've included them.