lilypond-user
[Top][All Lists]
Advanced

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

Re: Front pages


From: Caio Barros
Subject: Re: Front pages
Date: Wed, 14 Feb 2018 13:34:28 -0200

Hey Mark,

Is there a way of adding a front page with graphics, title etc to a
Lilypond book, with the numbering starting at 1 on the first other
book page?


I'm not sure what exactly you want to accomplish here. Where do you want the numbering to appear? Is your question also about how to create a title page?

Maybe my approach to that problem can help you. What I normally do is to create a "cover.ly" file with all the elements I need (title, composer, graphics, etc.), and then, in a separate file, I organize the music inside \bookpart blocks. This avoids that lilypond prints the default  header, but requires a bit caution. For instance:

---- cover.ly

\version "2.19.46"

\paper {
    bookTitleMarkup = ""
    scoreTitleMarkup = ""
  }

 \markup  {
  \vspace #20
  \fill-line {
    \fontsize #12 \title }
}

\markup  {
  \vspace #2
  \fill-line {
    \fontsize #5 \instrument }
}

\markup  {
  \vspace #5
  \fill-line {
    \fontsize #8 \composer }
}

\markup {
  \vspace #3
  \fill-line {
    \fontsize #6 \poet }
}

\markup  {
  \vspace #5
  \fill-line {
    \fontsize #2 \italic \dedication }
}

\markup {
  \vspace #4
  \fill-line {
    \fontsize #4 \date }
}

\pageBreak

---- mainfile.ly

\version "2.19.46"

%% Notice we have to add the header elements as variables

title = "My piece"
subtitle = "it has a cover page!"
composer = "Me"
date = "2018"
dedication = "To Mr. Someone"
instrument = "Piano"
poet = ""

\header {
  %% and now we just call the variables we just created
  title = \title
  subtitle = \subtitle
  composer = \composer
  date = \date
  dedication = \dedication
  instrument = \instrument
  arranger = ""
}

\bookpart {
  %\include "cover.ly"
  %{  \markup {}
  \pageBreak
  \paper {
    print-page-number = ##f
    oddHeaderMarkup = ##f
    evenHeaderMarkup = ##f 
    bookTitleMarkup = ""
    scoreTitleMarkup = ""
  %}
}

\paper {
  first-page-number = #0 %this avoids counting the cover as page 1
  #(include-special-characters)  
  bottom-margin = 1.5\cm
}

\bookpart {
  \paper {
    oddHeaderMarkup = \markup {
      \fill-line {
        \on-the-fly \not-part-first-page
        \fill-line { \fromproperty #'page:page-number-string \null }
        \null
      }
    }
    evenHeaderMarkup = \markup {
      \fill-line {
        \null \fromproperty #'page:page-number-string
      }
    }
  }
  \score {
    \new Staff {
\relative c'{ c }
}
  }
}

Caio

reply via email to

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