lilypond-user
[Top][All Lists]
Advanced

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

[layout tweaks] 1. fill-line


From: Germain G. Ivanoff-Trinadtzaty
Subject: [layout tweaks] 1. fill-line
Date: Mon, 18 Jun 2007 16:09:56 +0200


Dear all,
 
I'm having trouble with tweaking the layout of non-musical notation.
Dozens of try/retry sequences didn't get LilyPond to do the job.
 
First, I point you at this unexpected feature :
%%%%%%%%%%%%%%% begin %%%%%%%%%%%%%%%
%%% The following code outputs <title> and <subtitle> at
%%% different horizontal shifts
\version "2.11.26" %(windows)
\header
{
 title = \markup \normalsize \fill-line { "azerty" }
 subtitle = \markup \normalsize { "azerty" }
}
\score {c''}
\layout{}
%%%%%%%%%%%%%%% end %%%%%%%%%%%%%%%
 
Now, the job :
. <index>, <title>, <subtitle> : variable length strings.
. I want to get <title> and <subtitle> centered on the page,
while <index> is placed on the left of <title>.
. I could not place <index> at a _fixed_ position from the _variable_
position of <title>'s first character.
. I could not even place <index> at a _fixed_ position from the _fixed_
left margin of the page.

%%%%%%%%%%%%%%% begin BROKEN source %%%%%%%%%%%%%%%
\version "2.11.26" %(windows)
\header
{
 title = \markup \normalsize
 {
  %{
  %% doesn't compile
  \once \override #'(line-width . 60)
  \right-align "№ 210" % index
  %}
 
  %% doesn't work
  \override #'(left-margin . 40)
  "№ 210"  % index
  \override #'(left-margin . 18) % can't use \revert ?
 
  \fill-line { \center-align
  {
   "azerty" % title
   "azerty" % subtitle
  }}
 }
}
\score {c''}
\layout{}
%%%%%%%%%%%%%%% end BROKEN source %%%%%%%%%%%%%%%

For now, I use the following (unsatisfying) trick as a stopgap :
 
%%%%%%%%%%%%%%% begin source %%%%%%%%%%%%%%%
\version "2.11.26" %(windows)
\header
{
 title = \markup \normalsize \fill-line
 {
  \hcenter-in #40 "№ 210"  % index
  \center-align
  {
   "azerty" % title
   "azerty" % subtitle
  }
  \hcenter-in #40 ""
 }
}
\score {c''}
\layout{}
%%%%%%%%%%%%%%% end source %%%%%%%%%%%%%%%
 
Any piece of advice ?
 
Thanks,
Germain

reply via email to

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