lilypond-user
[Top][All Lists]
Advanced

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

Re: TextLine help needed


From: Alex Loomis
Subject: Re: TextLine help needed
Date: Tue, 7 Jan 2014 22:32:35 -0500

How likely is the content to change? You could make that in LaTeX and include it in LaTeX from an eps file, but even as I'm typing it that seems like a very clunky way of doing things to me... I'll sleep on it and see if I can come up with anything.


On Sat, Jan 4, 2014 at 2:54 PM, Kieren MacMillan <address@hidden> wrote:
Hello all,

Please consider the snippet included below this email.

1. Is there a better way to “hang indent” the stage-direction, so that the left parenthesis sits a little to the left of the “left margin” of the text? I played around with \halign and \hspace until I was blue in the face…

2. What would be the best way to get all the texts on a single system to be top aligned?

3. Is there a[n easy] way to make this whole (e.g.) three-column blob a spanner that would automatically sit “centered” over (e.g.) two measures, without affecting the underlying “note spacing”? I would love a function where I could specify a number of measures — which might or might not be only rests (like these) — and have the block of text columns place itself accordingly.

Thanks!
Kieren.
__________________________

%%%%  SNIPPET BEGINS

\version "2.17.97"
\language "english"

\layout {
  \context {
    \type "Engraver_group"
    \name "TextLine"
    \consists "Axis_group_engraver"
    \consists "Text_spanner_engraver"
    \consists "Text_engraver"
    \override TextScript.baseline-skip = #2.25
    \override TextScript.self-alignment-Y = #UP
    \textLengthOn
    \override VerticalAxisGroup.staff-affinity = #DOWN
    \override VerticalAxisGroup.remove-empty = ##t
    \override VerticalAxisGroup.remove-first = ##t
    \override VerticalAxisGroup.nonstaff-nonstaff-spacing =
        #'((basic-distance . 4) (minimum-distance . 2) (padding . 2) (stretchability . 0.5))
    \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
        #'((basic-distance . 4) (minimum-distance . 2) (padding . 2) (stretchability . 0.5))
    keepAliveInterfaces = #'( text-interface )
  }
  \context {
    \Score
    \accepts TextLine
  }
}

#(define-markup-command (mm-feed layout props amount) (number?)
(let ((o-s (ly:output-def-lookup layout 'output-scale)))
  (ly:make-stencil "" '(0 . 0) (cons 0 (abs (/ amount o-s))))))

#(define-markup-command (put-mm layout props dir amount arg)
(ly:dir? number? markup?) (interpret-markup layout props
  (markup #:put-adjacent Y dir arg #:mm-feed amount)))

#(define-markup-command (dialogue layout props charname text) (markup? markup-list?)
  #:properties ((column-width 24)
                (bline-skip 2.375)
                (char-skip 2.5)
                (f-size 10.5))
  (interpret-markup layout props
    #{ \markup
           \abs-fontsize #f-size
           \override #`(baseline-skip . ,bline-skip)
           \line {
               \bold \concat { #charname : }
               \hspace #1
               \override #`(line-width . ,column-width)
                   \put-mm #DOWN #char-skip \wordwrap #text } #}))

#(define-markup-command (stage-direction layout props text) (markup-list?)
  #:properties ((column-width 24)
                (bline-skip 2.375)
                (char-skip 2.5)
                (f-size 10.5))
  (interpret-markup layout props
    #{ \markup
           \abs-fontsize #f-size
           \override #`(baseline-skip . ,bline-skip)
           \override #`(line-width . ,column-width)
           \put-mm #DOWN #char-skip
           \translate #'(1 . 0) \wordwrap { \halign #1.5 ( \hspace #-0.4 \italic #text \hspace #-0.5 ) } #}))

FTE_FairyTaleEnding_global = {
  %%  intro
    R1 \break
    \repeat "volta" 1 { R1 \noBreak R1 }
}

FTE_FairyTaleEnding_script = {
  %%  intro
    s1^\markup \italic { Lights up on JILL. }
    s2^\markup \column {
        \dialogue COP { Number one, step forward and state your name. }
        \dialogue WOLF { Harry James Furble. }
    }
    s2^\markup \column {
        \dialogue COP { Harry Furble, a.k.a. ‘Wolf’, a.k.a. ‘Big Bad Wolf’, a.k.a. ‘Grandma’… Turn to your right. }
    }
    s1^\markup \column {
        \stage-direction { The BIG BAD WOLF turns to the right. }
        \dialogue COP { Step back. }
        \override #'(column-width . 34) \stage-direction { The BIG BAD WOLF steps back into the line-up. }
    }
}

\score {
  <<
    \new TextLine << \FTE_FairyTaleEnding_global \FTE_FairyTaleEnding_script >>
    \new Staff \FTE_FairyTaleEnding_global
  >>
}


%%%%  SNIPPET ENDS

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