lilypond-user
[Top][All Lists]
Advanced

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

Re: Overriding header fonts in a template


From: Harris, Jeff
Subject: Re: Overriding header fonts in a template
Date: Thu, 2 Oct 2014 17:34:05 -0700

Abraham,

Thanks for the help.

Creating a new header block is working, it does seem to work better when the variables are defined before they are used. The issue with this is that I don't know what header elements will be used for the next engraving.

The bookTitleMarkup looks like it is more robust, easier to change everything in one spot, but I'm not seeing any changes. Lilypond reports no errors. Frescobaldi helped me with the font name, so I know that is spelled correctly.

\version "2.18.0"
\language "english"
\include "../publisherCSS.ly"        % bookTitleMarkup stanza
\include "../letterpaper.ly"         % sets letter paper & margins
\include "music.ly"                  % sets header and music variables
\score { \new ChoirStaff << ... >> } % throws everything together for output

Is there something else I need to do to tell lilypond that I am re-definng bookTitleMarkup?

--
This signature file intentionally left blank.

On Thu, Oct 2, 2014 at 3:38 PM, tisimst <address@hidden> wrote:
On Thu, Oct 2, 2014 at 4:16 PM, Jeff Harris [via Lilypond] <[hidden email]> wrote:
I am trying to modify header fonts for the requirement of a publisher.

I would rather not use text markup commands in the header, as it's not
simple to change multiple works at the same time.

I would much rather put the style changes in an external file, so they can
all be changed at the same time if requirements change. I'm using an
external file for paper size and margin, and staff size, so I would prefer
to put overrides in the same place.

Is it possible to put header font-name and font-size overrides in an
external file and how? Maybe some sort of lilypond css?

I tried this but the re-defining of title and other header data didn't work
for me.

\version "2.18.0"
%\header { %% remove header block to turn title into a variable
   title = "Song Title"
   ...
%}
... (\PartMusic and \PartWords definitions }
\header {
   title = \markup { \override #'(font-name . 'Nimbus')
            \title }
}
\score { \new ChoirStaff << ... >> }

Jeff,

Here are two ways to do this:

%%%%%%%%%%

"publisherCSS.ly"

%%%%%

\version "2.18.0"

\header {
  title = \markup { \override #'(font-name . 'Nimbus') \myTitle }
}

%%%%%%%%%%

"publisherScore.ly"

%%%%%

\version "2.18.0" 

myTitle = "Song Title" 
\include "publisherCSS.ly"     <--- must come AFTER myTitle definition

\PartMusic and \PartWords definitions 

\score { \new ChoirStaff << ... >> } 

%%%%%%%%%%

Or, have you tried modifying bookTitleMarkup? Here's how I would do it (this is just a slight modification to the default found in "titling-init.ly"):

%%%%%%%%%%

"publisherCSS.ly"

%%%%%

\version "2.18.0"

bookTitleMarkup = \markup {
  \override #'(baseline-skip . 3.5)
  \column {
    \fill-line { \fromproperty #'header:dedication }
    \override #'(baseline-skip . 3.5)
    \column {
      \fill-line {
        \huge \larger \larger \bold
\override #'(font-name . "Nimbus") <------ Added override here!
        \fromproperty #'header:title
      }
      \fill-line {
        \large \bold
        \fromproperty #'header:subtitle
      }
      \fill-line {
        \smaller \bold
        \fromproperty #'header:subsubtitle
      }
      \fill-line {
        \fromproperty #'header:poet
        { \large \bold \fromproperty #'header:instrument }
        \fromproperty #'header:composer
      }
      \fill-line {
        \fromproperty #'header:meter
        \fromproperty #'header:arranger
      }
    }
  }
}

%%%%%%%%%%

See if either of those work for you.

HTH,
Abraham


View this message in context: Re: Overriding header fonts in a template
Sent from the User mailing list archive at Nabble.com.

_______________________________________________
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]