Page numbers with text

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Page numbers with text

Marco Bagolin
Hello all,
I don’t know how to personalize the page numbers of a score.

I would like to see at the left bottom of every score page the number in the following format:

n - Title of score 

Example:
1 - My Song
2 - My song
...

Please help me.

Thanks in advance.

Regards 
Marco B.
Reply | Threaded
Open this post in threaded view
|

Re: Page numbers with text

Aaron Hill
On 2020-02-06 10:02 pm, Marco Bagolin wrote:

> Hello all,
> I don’t know how to personalize the page numbers of a score.
>
> I would like to see at the left bottom of every score page the number
> in
> the following format:
>
> n - Title of score
>
> Example:
> 1 - My Song
> 2 - My song
> ...

You will need to set oddFooterMarkup [1].

[1]:
lilypond.org/doc/v2.19/Documentation/notation/custom-titles-headers-and-footers#custom-layout-for-headers-and-footers



-- Aaron Hill

Reply | Threaded
Open this post in threaded view
|

Re: Page numbers with text

Aaron Hill
On 2020-02-06 10:11 pm, Aaron Hill wrote:

> On 2020-02-06 10:02 pm, Marco Bagolin wrote:
>> Hello all,
>> I don’t know how to personalize the page numbers of a score.
>>
>> I would like to see at the left bottom of every score page the number
>> in
>> the following format:
>>
>> n - Title of score
>>
>> Example:
>> 1 - My Song
>> 2 - My song
>> ...
>
> You will need to set oddFooterMarkup [1].
>
> [1]:
> http://lilypond.org/doc/v2.19/Documentation/notation/custom-titles-headers-and-footers#custom-layout-for-headers-and-footers

Grr... stupid web browsers and their absolutely useless copy/paste
behavior.

URL was missing the http://...

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

Hopefully that works.


-- Aaron Hill

Reply | Threaded
Open this post in threaded view
|

Re: Page numbers with text

Marco Bagolin
In reply to this post by Aaron Hill
My knowledge of lilypond is not good enough...
I tried to understand the examples in the guide of lilypond but the chapter is not clear enough for me.
I am in difficult... 

Please someone can help me? 🙏🏻

Thank you all

Il giorno ven 7 feb 2020 alle 07:11 Aaron Hill <[hidden email]> ha scritto:
On 2020-02-06 10:02 pm, Marco Bagolin wrote:
> Hello all,
> I don’t know how to personalize the page numbers of a score.
>
> I would like to see at the left bottom of every score page the number
> in
> the following format:
>
> n - Title of score
>
> Example:
> 1 - My Song
> 2 - My song
> ...

You will need to set oddFooterMarkup [1].

[1]:
lilypond.org/doc/v2.19/Documentation/notation/custom-titles-headers-and-footers#custom-layout-for-headers-and-footers



-- Aaron Hill

Reply | Threaded
Open this post in threaded view
|

Re: Page numbers with text

Kevin Barry
On Fri, Feb 07, 2020 at 09:06:19PM +0100, Marco Bagolin wrote:
> My knowledge of lilypond is not good enough...
> I tried to understand the examples in the guide of lilypond but the chapter
> is not clear enough for me.
> I am in difficult...

Hi Marco,

If you add the code below to your score, does that do what you want?

\paper {
  %print-first-page-number = ##t
  oddHeaderMarkup = ##f
  evenHeaderMarkup = ##f
  oddFooterMarkup = \markup {
      \on-the-fly \print-page-number-check-first \fromproperty #'page:page-number-string
      \on-the-fly \print-page-number-check-first "- My Song"
  }
  evenFooterMarkup = \oddFooterMarkup
}

(Uncomment the print-first-page-number line if you want the number on the first
page as well)

Kevin

Reply | Threaded
Open this post in threaded view
|

Re: Page numbers with text

Noeck
In reply to this post by Marco Bagolin
Dear Marco,

is this close to what you want?

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.19.84"

\paper {
  print-first-page-number = ##t
  oddHeaderMarkup = \markup \null
  evenHeaderMarkup = \markup \null
  oddFooterMarkup = \markup \fill-line {
    \line {
      \on-the-fly \print-page-number-check-first
      \fromproperty #'page:page-number-string
      "–"
      \on-the-fly \print-page-number-check-first
      \fromproperty #'header:title
    }
  }
  evenFooterMarkup = \oddFooterMarkup
}

\header {
  title = "First Title"
}

\score {
  \new Staff { a'1 \break g'1 \pageBreak f'1 }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

I am not sure why I need the \print-page-number-check-first and if the
\fill-line { \line { … } } is the cleanest solution. But I guess the
rest of it comes close.

Best,
Joram


Reply | Threaded
Open this post in threaded view
|

Re: Page numbers with text

Noeck
… and if you want this footer on every page, you can have it shorter:


  oddFooterMarkup = \markup \fill-line {
    \line {
      \fromproperty #'page:page-number-string
      "–"
      \fromproperty #'header:title
    }
  }

Best,
Joram

Reply | Threaded
Open this post in threaded view
|

Re: Page numbers with text

Marco Bagolin
Thank you all,
all solutions are good, but I don't know why the copyright field on the first page does not appear.

My code is the following:

\version "2.18.2"
....
....
....
\paper {
  print-first-page-number = ##t
  oddHeaderMarkup = ##f
  evenHeaderMarkup = ##f
  oddFooterMarkup = \markup {
      \on-the-fly \print-page-number-check-first \fromproperty #'page:page-number-string
      \on-the-fly \print-page-number-check-first \italic "- My Song - arr. by M. Bagolin (2020)"
  }
  evenFooterMarkup = \oddFooterMarkup
}

\header {
title = \markup \override #'(font-name . "Arial Black") \fontsize #+4 { \bold  "My song" }
copyright = \markup
\override #'(font-name . "Palatino Linotype")
\override #'(baseline-skip . 2)
\center-column { \fontsize #-4
{ \bold
{
\line { " " }
"Arranged by M. B. (2020)"
"ALL RIGHTS RESERVED"
}
}
      }
}
...
...
...

Il giorno ven 7 feb 2020 alle ore 21:44 Noeck <[hidden email]> ha scritto:
… and if you want this footer on every page, you can have it shorter:


  oddFooterMarkup = \markup \fill-line {
    \line {
      \fromproperty #'page:page-number-string
      "–"
      \fromproperty #'header:title
    }
  }

Best,
Joram

Reply | Threaded
Open this post in threaded view
|

Re: Page numbers with text

Kevin Barry
On Sun, Feb 09, 2020 at 09:01:48AM +0100, Marco Bagolin wrote:
> Thank you all,
> all solutions are good, but I don't know why the copyright field on the
> first page does not appear.

Because your code redefines footers, they no longer include the
copyright field, so it has to be added back in. Does this code do what
you want?

\version "2.21.0"

\paper {
  print-first-page-number = ##t
  oddHeaderMarkup = ##f
  evenHeaderMarkup = ##f
  oddFooterMarkup = \markup {
    \overlay {
      \line {
        \on-the-fly \print-page-number-check-first \fromproperty #'page:page-number-string
        \on-the-fly \print-page-number-check-first \italic "- My Song - arr. by M. Bagolin (2020)"
      }
      \fill-line { \on-the-fly #part-first-page \fromproperty #'header:copyright }
    }
  }
  evenFooterMarkup = \oddFooterMarkup
}

\header {
  title = \markup \override #'(font-name . "Arial Black") \fontsize #+4 { \bold  "My song" }
  copyright = \markup
  \override #'(font-name . "Palatino Linotype")
  \override #'(baseline-skip . 2)
  \center-column {
    \fontsize #-4
    { \bold
      {
        \line { " " }
        "Arranged by M. B. (2020)"
        "ALL RIGHTS RESERVED"
      }
    }
  }
}


\score {
  \repeat unfold 800 c'2
}

Kevin

Reply | Threaded
Open this post in threaded view
|

Re: Page numbers with text

Marco Bagolin
Perfect, thank you. 

Il giorno mar 11 feb 2020 alle 21:53 Kevin Barry <[hidden email]> ha scritto:
On Sun, Feb 09, 2020 at 09:01:48AM +0100, Marco Bagolin wrote:
> Thank you all,
> all solutions are good, but I don't know why the copyright field on the
> first page does not appear.

Because your code redefines footers, they no longer include the
copyright field, so it has to be added back in. Does this code do what
you want?

\version "2.21.0"

\paper {
  print-first-page-number = ##t
  oddHeaderMarkup = ##f
  evenHeaderMarkup = ##f
  oddFooterMarkup = \markup {
    \overlay {
      \line {
        \on-the-fly \print-page-number-check-first \fromproperty #'page:page-number-string
        \on-the-fly \print-page-number-check-first \italic "- My Song - arr. by M. Bagolin (2020)"
      }
      \fill-line { \on-the-fly #part-first-page \fromproperty #'header:copyright }
    }
  }
  evenFooterMarkup = \oddFooterMarkup
}

\header {
  title = \markup \override #'(font-name . "Arial Black") \fontsize #+4 { \bold  "My song" }
  copyright = \markup
  \override #'(font-name . "Palatino Linotype")
  \override #'(baseline-skip . 2)
  \center-column {
    \fontsize #-4
    { \bold
      {
        \line { " " }
        "Arranged by M. B. (2020)"
        "ALL RIGHTS RESERVED"
      }
    }
  }
}


\score {
  \repeat unfold 800 c'2
}

Kevin