Thank you for the help I received with this problem.

I have finally had time to get back to the project, and have ended up with:

\paper {
  inner-margin = 30\mm
  outer-margin = 30\mm
  print-page-number = ##f
  tocTitleMarkup = \markup {
    \vspace #10
    \fontsize #6
    \column {
      \fill-line { \null "Contents" \null }
      \vspace #2
    }
  }
  tocItemMarkup = \markup \fontsize #5 \fill-line {
    \override #'(line-width . 80)
    \tocItemWithDotsMarkup
  }
}
\markuplist \override #'(baseline-skip . 5) \table-of-contents

Lower down on the same page are a couple of paragraphs of text.

The table of contents is now much as I want it, although I am not keen
on the amount of space between the end of the row of dots and the
page-number itself - to me, it seems excessive.  But this is a small
matter and I can live with it.

I dare say that the above markup could be more logically arranged: there
was a fair amount of trial and error that went on before I got a
successful result, even with the help from the list!

David


> I have not used a Table of Contents before, and I am having some
> difficulty in getting the result I want.  I have 2 problems.
> 
> 1) I would like to have a dotted line between the title and the page
> number in each line.  But if I use
> 
> tocItemMarkup = \tocItemWithDotsMarkup
> 
> then there does not seem to be a way of formatting the text the way I
> want to (larger font etc.).
> 
> As an alternative I have tried defining tocItemMarkup including
> 
> \fill-with-pattern #1 #RIGHT .
> 
> This results in a space between the dots
> and the page number; I get a similar result with
> \fill-with-pattern #1 #CENTER .
> 
> 2) The table of contents appears at the top of a page which already has
> a couple of paragraphs of text on it.  This page is defined as a
> separate \bookpart, and has its own \paper block setting a wider
> 'inner-margin' and 'outer-margin' than I use for the actual scores.
> 
> I would like the table of contents to have wider margins still, but a
> second \paper block on the same page does not work, and changing
> 'indent' effectively only increases the right margin.  I have tried
> experimenting with a \hspace before and after the contents of the line,
> e.g.
> 
> tocItemMarkup = \markup \fontsize #5 \fill-line {
>   \hspace #1 { \fill-with-pattern #1 #RIGHT .
>   \fromproperty #'toc:text \fromproperty #'toc:page } \hspace #1 }
> 
> but this just doesn't work.  (Please forgive my feeble attempts at using
> markup, which I still find rather cryptic!)
> 
> David




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

Reply via email to