lilypond-user
[Top][All Lists]
Advanced

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

Re: Total number of pages & Logo


From: Frederik Van der Veken
Subject: Re: Total number of pages & Logo
Date: Sun, 12 Feb 2012 09:56:54 +0100

Perfect!
This is what I was looking for, many thanks!
I discovered I didn't got my logo to work because my eps file was faulty - but now it works.
And I am amazed how fast you found an answer for the total pages question - I've searched for hours before (but only on goole and the LSR, not on the user archives -> thanks for the link).
I only still don't get the if .. then to work, but I figured it's not that important.

Thanks!

Frederik

Op 10-feb.-2012, om 21:59 heeft address@hidden het volgende geschreven:

Van: Marc Hohl <address@hidden>
Onderwerp: Antw.: Total number of pages & Logo
Datum: 10 februari 2012 21:59:26 GMT+01:00


Am 10.02.2012 11:56, schrieb Frederik Van der Veken:
Hi everybody,

First I want to say thanks to the makers of Lilypond, it really is a superb program!
Fantastic layout and easy to use, it is my main music layout program now (coming from Sibelius, which I also like, but which is getting expensive and big ~  550€ and 60Gb)!

So, I've been trying for several days by now to get the layout how I want it. I succeeded almost, but got stuck at two problems:

1) I'd like to add the logo of my choir in the top left corner of the first page. I tried using \epsfile but a) it doesn't work (maybe because it is an eps generated from a tiff?) and b) it seems I have to attach it to a music element, however, I want it to be positioned always at the (exact) same spot (top left corner thus) while having it only at the first page (thus not in the header). Any ideas how to achieve this?
Have you read

http://lilypond.org/doc/v2.15/Documentation/notation/custom-headers-footers-and-titles#custom-layout-for-headers-and-footers

?

I took an example from there and modified it a bit:

\version "2.15.28"

\book {
 \paper {
   print-page-number = ##t
   print-first-page-number = ##t
   oddHeaderMarkup = \markup {
     \line {
       \on-the-fly #first-page
       \epsfile #X #10 #"testlogo.eps"
     }
   }
   evenHeaderMarkup = \oddHeaderMarkup
 }
 \score {
   \new Staff { \repeat unfold 1000 c''4 }
 }
}



2) In the top right corner, I added the score numbering I'm using in my choir. However, I'd like to also add the current page number with respect to the total number of pages, and only if there is more than one page. Until now, I got:

\version "2.15.28"
\paper {
  print-page-number = ##t
  print-first-page-number = ##t
  oddFooterMarkup = \markup \null
  evenFooterMarkup = \markup \null
  oddHeaderMarkup = \markup { \bold \fill-line { "                                             "
          \right-column { \concat { \fontsize #4 "SzM " \general-align #X #LEFT  \fontsize #5 \scoreIndex }
                \concat { \on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string "/"  \numberOfPages }
                 }
         }
  }
  evenHeaderMarkup = \oddHeaderMarkup
}

So this gives something like "SzM 411 1/2" , but I have to set \numberOfPages manually. This is not so convenient, as I generate different scores from the same code, which do not necessarily have the same number of pages (like a version for choir, and a version for piano+choir). Is there a way to auto-detect the total number of pages of a score?
And how would I incorporate "if… then" to only show the page numbering if there is more than one page (i.e. "SzM 411" instead of "SzM 411 1/1"?
I tried several things, but it never compiled (unfortunately I am not yet that strong with Scheme).
A quick search in the user archives showed at least

http://lists.gnu.org/archive/html/lilypond-user/2010-08/msg00403.html

which could be adapted to your needs.

HTH,

Marc

Thanks a lot for any replies, and sorry for the long mail (I have been freaking out the last few days trying to get it right).

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




reply via email to

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