Hello,

I was wondering if anyone had suggestions for a text formatting challenge
I've been unable to solve.

The format I like to use for header markup (for pages after page 1) is to
have the page number centered with em dashes around it, and then split the
title, with half on the left and half on the right.

The following code is what I am using, but I am not very happy with it.

The issues I'd like to solve are:

  o How do I get the left/right sides of the title to right/left align next
to the page number?  I am doing it with literal spaces, but this is very
unsatisfactory.

  o How do I get an actual em dash rather than use "--"?   I know that the
code is \char ##x2014, but I cannot figure out how to use that in this
header \on-the-fly context.

  o Is there a way to encapsulate this in a function, so I can just say
something like:
\setSplitTitle "Example: Split" "Centered Title"


\version "2.18.2"

\header {
    title = \markup { \fontsize #2 \bold "Example: Split Centered Title" }
}

\paper {
    print-page-number = ##t
    print-first-page-number = ##f
    oddHeaderMarkup = \markup {
      \fill-line {
        \on-the-fly #print-page-number-check-first
        \fromproperty #'header:poet
        \on-the-fly #print-page-number-check-first
        "                                         Split Centered --"
        \on-the-fly #print-page-number-check-first
        \fromproperty #'page:page-number-string
        \on-the-fly #print-page-number-check-first
        "-- Title                                                  "
        \on-the-fly #print-page-number-check-first
        \fromproperty #'header:composer
      }
    }
    evenHeaderMarkup = \oddHeaderMarkup
}

\book {
  \score {
    \new Staff {
      \relative c' { c1 \pageBreak c }
    }
  }
}



Thanks,

David Elaine Alt
415 . 341 .4954                                           "*Confusion is
highly underrated*"
ela...@flaminghakama.com
self-immolation.info
skype: flaming_hakama
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to