 
       i = @mainNodes.length unless i?
       found = @setPageFill n, i, pos, emptyPages, pageNo
+      @collectPageNumbers n, i, pageNo
       if not found
        emptyPages.push pos: pos, f: n
       else

     found = false
     while n < t
      m = @mainNodes[n]
      s = @sidenoteMap[m]
      ++n
      @pageNumbers.push
       page: pageNo
       node: @map.nodes[m]
      continue unless s?
      found = true


      n = i
      pageNo++

    collectPageNumbers: (f, t, pageNo) ->
     for n in [f...t]
      m = @mainNodes[n]
      continue if not m?
      @pageNumbers.push
       page: pageNo
       node: @map.nodes[m]

    setPageFill: (f, t, pos, emptyPages, pageNo) ->
     margin = (f > START)
     first = true
