lilypond-user
[Top][All Lists]
Advanced

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

Re: opus conflict


From: Thomas Morley
Subject: Re: opus conflict
Date: Mon, 1 May 2017 01:05:21 +0200

2017-04-30 23:09 GMT+02:00 Mark Stephen Mrotek <address@hidden>:
> [...] I have very limited knowledge as to how to customize (write Lilypond), 
> [...]

So here a little tutorial about writing custom book/scoreTitleMarkup

%%%%%
(1)
%%%%%

book/scoreTitleMarkup are predefined/customized markups. They need to be
defined in \paper.
This is done in exp. 1, but set to false (##f). So it will never print anything.
(Just to get the basics)

%% exp. 1

\paper {
  bookTitleMarkup = ##f
  scoreTitleMarkup = ##f
}

\header { title = "TITLE-1" } %% not called

{ c'1 }


%%%%%
(2)
%%%%%

Usually book/scoreTitleMarkup contains settings for dedication, title, subtitle,
subsubtitle, composer, poet, meter, arranger, piece and opus.

Let's try to set them as static literals in bookTitleMarkup. I.e. we use strings
which will not be called from the \header
(Keeping scoreTitleMarkup = ##f)

%% exp. 2

\paper {
  bookTitleMarkup =
    \markup
      \column {
            dedication
            title
            subtitle
            subsubtitle
            composer
            poet
            meter
            arranger
            piece
            opus
      }

  scoreTitleMarkup = ##f
}

\header { title = "TITLE-1" } %% not called

{ d'1 }

%%%%%
(3)
%%%%%

This ofcourse most simple and not very nice. Let's do some formatting.
I.e. distribute them over the whole line-width, some as single markup, some in
the same line.

%% exp. 3

\paper {
  bookTitleMarkup =
    \markup
      \column {
            %% 8 lines, all done with fill-line
            \fill-line { dedication } %% center
            \fill-line { title } %% center
            \fill-line { subtitle } %% center
            \fill-line { subsubtitle } %% center
            \fill-line { poet composer } %% center
            \fill-line { \null opus } %% right
            \fill-line { meter arranger } %% left - right
            \fill-line { piece \null } %% left
      }

  scoreTitleMarkup = ##f
}

\header { title = "TITLE-1" } %% not called

{ e'1 }

%%%%%
(4)
%%%%%

Though eventually we want some settings to be called from a score-header.
As an example we go for subtitle and piece.

We delete them from bookTitleMarkup and define them in scoreTitleMarkup.

%% exp. 4

\paper {
  bookTitleMarkup =
    \markup
      \column {
            %% 8 lines, all done with fill-line
            \fill-line { dedication } %% center
            \fill-line { title } %% center
            \fill-line { subtitle } %% center
            \fill-line { subsubtitle } %% center
            \fill-line { poet composer } %% center
            \fill-line { \null opus } %% right
            \fill-line { meter arranger } %% left - right
      }

  scoreTitleMarkup =
    \markup
      \column {
            %% 8 lines, all done with fill-line
            \fill-line { subtitle } %% center
            \fill-line { piece \null } %% left
      }
}

\header { title = "TITLE-1" } %% not called

{ e'1 }

{ f'1 }

%%%%%
(5)
%%%%%

Let's change it to call the values from \header.

We need to insert a fromproperty-markup and take the name of the header-setting
preceded by #'header:

%% exp. 5

\paper {
  bookTitleMarkup =
    \markup
      \column {
            \fill-line { \fromproperty #'header:dedication } %% center
            \fill-line { \fromproperty #'header:title } %% center
            \fill-line { \fromproperty #'header:subtitle } %% center
            \fill-line { \fromproperty #'header:subsubtitle } %% center
            \fill-line {
                  \fromproperty #'header:poet \fromproperty #'header:composer
            } %% center
            \fill-line { \null \fromproperty #'header:opus } %% right
            \fill-line {
                  \fromproperty #'header:meter \fromproperty #'header:arranger
            } %% left - right
      }

  scoreTitleMarkup =
    \markup
      \column {
            \fill-line { \fromproperty #'header:subtitle } %% center
            \fill-line { \fromproperty #'header:piece \null } %% left
      }
}

\header { title = "TITLE-1" } %% called

\score {
  { e'1 }
  \header {
      piece = "PIECE-1"
    subtitle = "SUBTITLE-1"
  }
}

\score {
  { f'1 }
  \header {
      piece = "PIECE-2"
    subtitle = "SUBTITLE-2"
  }
}


%%%%%
(6)
%%%%%

Currently no fontsize-markup is applied. We let it as an exercise for the
reader.

Also, print-all-headers will take no effect.
If custom book/scoreTitleMarkups are used, then they should be tailored to
measure. So no real need for it.

%%%%%
(7)
%%%%%

Ofcourse some points in the above tutorial are omitted or simplified.
Please ask if something is not clear.
Also, it is possible to do even more...



Cheers,
  Harm



reply via email to

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