The table of contents seems to list its items by the order in which they
were evaluated by the parser, and not by where they actually appear in the
book... Is there a way to avoid this?

for example, even though partB comes AFTER partA in the book, and the PAGES
in the table of contents are right, partB comes listed first in the TOC
which is very annoying, simply because it was evaluated first.

\version "2.18.2"

partB =
\bookpart {
  \tocItem "PART B"
  \new Staff {
    c4 d e f
  }
}

partA =
\bookpart {
  \tocItem "PART A"
  \new Staff {
    c4 d e f
  }
}

\book {
  \bookpart {
    \markuplist \table-of-contents
    \paper {
      tocTitleMarkup = \markup \center-column {
        \italic "Contents"
        \vspace #0.3
      }
      tocItemMarkup = \markup {
        \fill-with-pattern
        #1 #RIGHT "  .  "
        \fromproperty #'toc:text
        \fromproperty #'toc:page
      }
    }
  }
  \bookpart { \partA }
  \bookpart { \partB }
}

thanks for any help.

Freddy
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to