bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Importing the ToC into LaTeX


From: Stefan-W. Hahn
Subject: Re: Importing the ToC into LaTeX
Date: Sun, 29 May 2016 11:52:16 +0200
User-agent: Mutt/1.5.24 (2015-08-30)

Mail von Thomas Morley, Sat, 28 May 2016 at 21:31:28 +0200:

Hi Thomas,

> >> My original problem is, that I haven't found a way to print a book with
> >> lilypond where I begin with a front page, an empty page on the left and the
> >> first page on the right. If switching on double sided page 1 should get an
> >> extra amount of space on the left. But this is not working.
> >
> > Not sure I understand, could you provide an example?
> 
> 2016-05-28 16:52 GMT+02:00 Stefan-W. Hahn <address@hidden>:
> > Mail von Thomas Morley, Thu, 26 May 2016 at 21:39:22 +0200:
> >
> > Hello,
> >
> > just to close the item. The last answer helps to solve my orignal problem
> > generating a two sided book with a title page. It seems not possible to have
> > page one on the right sight with indent on the left.
> 
> Would have been nice to adress my understanding problem ;)

Sorry for this.

I try it again:
- My first problem was to get the first page with pagenumber 1 on the right
  with indent on the left. But this two-sided together with a title page
  without page-numbering.
- I tried some things and came then to the documentation with the table of
  content put to a toc file to read this in plain latex. Together with
  lilypond-book this doesn't work, because lilypond book is giving a non
  predictible name to the file it is working on, so the name of the toc file
  to include is not predictible. Together with the formatting of the toc
  content which was not interpretable by LaTeX, I have been stuck.
- The solution came with your hint:
  
\book {
  \paper {
    #(set-paper-size "a4")
    #(define (page-post-process layout pages) (oly:create-toc-file layout 
pages))
    ragged-right = ##f
    print-all-headers = ##f
    print-page-number = ##t
    print-first-page-number = ##f
    first-page-number = 0
    oddFooterMarkup = \markup {
      \fill-line {
        \on-the-fly \first-page \fill-line { \small \italic \fromproperty 
#'header:copyright }
      }
    }
    evenFooterMarkup = \oddFooterMarkup

    bookTitleMarkup = \markup {
      \vspace #10
      \fontsize #8 {
      \column {
        \fill-line { \fromproperty #'header:composer }
        \vspace #1
        \fill-line { \larger \bold \fromproperty #'header:title }
        \fill-line { \smaller \bold \fromproperty #'header:subtitle }
        \fill-line { \smaller \bold \fromproperty #'header:subsubtitle }
      }}
    }
  }
  \header {
    composer = "Composer"
    title = "Title"
    subtitle = \markup \column { \center-align { "Subtitle" } }
    copyright = "Copyright"
  }
  \bookpart { \pageBreak }
}

\book {
  \paper {
    #(set-paper-size "a4")
    two-sided = ##t 
    binding-offset = 1\cm
    ragged-right = ##f
    print-all-headers = ##f
    print-page-number = ##t
    print-first-page-number = ##t
    oddFooterMarkup = \markup {
      \fill-line {
        \on-the-fly \last-page \fill-line { \small \fromproperty 
#'header:tagline }
      }
    }
    evenFooterMarkup = \oddFooterMarkup

    tocItemMarkup = \tocItemWithDotsMarkup

    tocTitleMarkup = \markup \huge \column {
      \fill-line { \null "Inhaltsverzeichnis" \null }
      \hspace #1
    }
  }

  \bookpart {
     \tocItem \markup \with-color #red "First score"
     \score {
       {
         \someNotes
         \tocItem \markup \fontsize #3 "Some particular point in the first 
score"
       }
     }
  }
  \bookpart { \markuplist \table-of-contents }
}

With this I get to pdf files. One with the titlepage and th eother with the
notes in double sided with first page on the right and indent on the left.

> Is this you're looking for?:

Yours seem to work too, with one exception: I got an extra vertical space 
between the
title (page number) an the first score.


Thanks for your help.
With kind regards,
Stefan

-- 
Stefan-W. Hahn                          It is easy to make things.
                                        It is hard to make things simple.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]