lilypond-user
[Top][All Lists]
Advanced

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

Re: Markup and stencil formatting questions


From: Olivier Biot
Subject: Re: Markup and stencil formatting questions
Date: Thu, 20 Dec 2012 00:53:17 +0100

On Thu, Dec 20, 2012 at 12:15 AM, Eluze <address@hidden> wrote:
shutterfreak wrote
> I don't know, all I wanted was to "fix" the baseline skips at start and
> end
> of line-wrapped text sections by adding this "construct" at start and end
> of each "text section". Probably this is not eh way to go.

I'm not sure this meets your needs:

-use \vspace #number
-set the baseline-skip before the \column(s) - if e.g. you want the /German
/column with a huge distance and the /English/ column to be narrower you can
re-define them:

here's a small example:

         \override #'(baseline-skip . 5.8) \columns {
           \override #'(baseline-skip . 11.8) \column {
           \wordwrap { Wird ganz in der zweiten Position gespielt. }
           \vspace #5 }
            \column { \wordwrap { \italic { Jouer entièrement à la 2°
position. } } }
           \override #'(baseline-skip . 1.8) \column { \wordwrap { Play
entirely in the 2nd position 2nd position 2nd position 2nd position 2nd
position 2nd position. } }
         }
        \line { \with-color #red { C Dur. {\italic Do majeur.} C major. } }
      }
    }

Okay, I have been experimenting with baseline-skip. If you look at the attached image, then I am able to adjust [A] and [B] but not [C] or the bottom 2 lines. Here's the markup snippet illustrating this - see inline comments:

%% BEGIN snippet
\markup {
  \fill-line {
    \rounded-box {
      % This override works AFTER the \column element (see [A] in attached image):
      \override #'(baseline-skip . 4) \column {
        \box {
          \fill-line {
            \bold "N° 25. Minuetto"
            \line { \concat { \override#'(word-space 0)  {\with-color #blue "Nemo Ignoto" " (" \with-color #(rgb-color 1 .5 0) "Opus 3.14"  ")" } } }
          }
        }
        \fill-line {
          % This override works INSIDE the (\box) elements in the \columns; if set smaller then the baseline may be irregular if text protrudes above/below the extent of a lowercase 'x' or 'n' (try e.g. setting it to 1):
          \override #'(baseline-skip . 2.5) \columns {
            \box { \wordwrap { n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n } }
            \box { \wordwrap { \italic { T Q f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n  } } }
            \box { \wordwrap { . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  } }
          }
        }
        \fill-line {
          % This override works INSIDE the (\box) elements in the \columns (see [B] in attached image):
          \override #'(baseline-skip . 5.8) \columns {
            % This override works INSIDE this \box element only:
            \override #'(baseline-skip . 3.8) \box { \justify { n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n  } }
            \box { \justify { \italic { f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n  } } }
            \box { \justify { . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  } }
          }
        }
        % This override works INSIDE the (\box) elements in the \columns:
        \override #'(baseline-skip . 5.8) \line {
          \columns {
            \box { \wordwrap { \with-color #(rgb-color 1 .5 0) {n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n \strut } } }
            \box { \wordwrap { \italic { f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n f n  } } }
            \box { \wordwrap { . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   } }
          }
        }
        % Neither override does something:
        \override #'(baseline-skip . 5.8) \box { \override #'(baseline-skip . 5.8) \line { \with-color #(rgb-color .8 .2 .2) { A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . } } }
        \override #'(baseline-skip . 8) \line { \with-color #red { C Dur. {\italic Do majeur.} C major. } }
      }
    }
  }
}
%% END snippet

Best regards,

Olivier

Attachment: LilyPond 2.16.1 text alignment 2.png
Description: PNG image


reply via email to

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