Text alignment

2014-10-12 Thread Marco Bagolin
Hi all,
I can not reproduce the attached Sample1.png.
The best result I obtained is the  attached MySample1.png  with the
following code:

e,1 \trill \p \< |
 b'1 \trill|
 1
  \trill
  ^\markup {\tiny \italic \halign #2 \raise #1.5 div.}
  ^\markup {\tiny "(both trill)"}
   <<
 {b1 \trill}
 \\
 {\set Staff.ottavation = #"Half 8va (opt.)"
  \hideNotes
b4 b b b
  \unset Staff.ottavation
 }
   >>

but text "(both trill)" is not aligned with the trill symbol and "Half
8va(opt.)" font is bigger than the others. I tried some ways, but I don't
understand where is my mistake.

Please, can anyone help me?

Thank you in advance at all

Regards
Marco B.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment

2014-10-12 Thread Thomas Morley
2014-10-12 19:26 GMT+02:00 Marco Bagolin :
> Hi all,
> I can not reproduce the attached Sample1.png.
> The best result I obtained is the  attached MySample1.png  with the
> following code:

Hi Marco,

please always post a _compilable_ code, showing your problem and
matching with images you post.

-Harm

>
> e,1 \trill \p \< |
>  b'1 \trill|
>  1
>   \trill
>   ^\markup {\tiny \italic \halign #2 \raise #1.5 div.}
>   ^\markup {\tiny "(both trill)"}
><<
>  {b1 \trill}
>  \\
>  {\set Staff.ottavation = #"Half 8va (opt.)"
>   \hideNotes
> b4 b b b
>   \unset Staff.ottavation
>  }
>>>
>
> but text "(both trill)" is not aligned with the trill symbol and "Half
> 8va(opt.)" font is bigger than the others. I tried some ways, but I don't
> understand where is my mistake.
>
> Please, can anyone help me?
>
> Thank you in advance at all
>
> Regards
> Marco B.
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment

2014-10-14 Thread Thomas Morley
Hi Marco,

please always reply to all.

2014-10-13 5:40 GMT+02:00 Marco Bagolin :
> Oh, ok!
> the code of MySample1.png is the following:
>
> \version "2.18.2"
>
> \relative c''
>
> {e1 \trill \p \< |
>  b'1 \trill|
>  1
>   \trill
>   ^\markup {\tiny \italic \halign #2 \raise #1.5 div.}
>   ^\markup {\tiny "(both trill)"}
><<
>  {b1 \trill}
>  \\
>  {\set Staff.ottavation = #"Half 8va (opt.)"
>   \hideNotes
> b4 b b b
>   \unset Staff.ottavation
>  }
>>>
> R1\!
> }
>
> I'd like to reproduce exactly what you can see in Sample1.png.

Sorry to come back to you that late.

Maybe the following code does what you want:

\version "2.19.13"

\paper {
ragged-right = ##f
indent = 0
}

#(define ((add-right-to-default-script mrkp) grob)
  (let* ((stil (ly:script-interface::print grob))
 (X-offset (ly:grob-property grob 'X-offset))
 (layout (ly:grob-layout grob))
 (defs (ly:output-def-lookup layout 'text-font-defaults))
 (word-space (assoc-get 'word-space defs))
 ;(props (ly:grob-alist-chain grob defs))
 (addition
   (grob-interpret-markup
 grob
 (markup #:normal-text mrkp)))
 (combined-stil
   (ly:stencil-combine-at-edge
 stil
 X
 RIGHT
 addition
 word-space)))

combined-stil))


add-right-to-script =
#(define-event-function (parser location mrkp music)(markup? ly:music?)
  #{
\tweak #'stencil #(add-right-to-default-script mrkp)
$music
  #})

\relative c'' {
 e1 \trill \p \< |
 b'1*7/8 \trill
 s8-\tweak #'padding #1.5 ^\markup { \tiny \italic div. }
 1
   -\tweak #'padding #0.8
   \add-right-to-script
   \markup {
  %{\italic %}
  %{ \hspace #1 %}
  \fontsize #-1
  "(both trill)"
   }
   \trill
 \override Staff.OttavaBracket.style = #'solid
 \set Staff.ottavation =
   \markup
 \halign #0
 \fontsize #-1
 "Half 8va (opt.)"
 b1*7/8
 \trill
 s16. \once \hideNotes b32 |
 R1\!
 \unset Staff.ottavation
}


HTH,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Fwd: Text alignment

2014-10-14 Thread Marco Bagolin
Hi all,
I can not reproduce the attached Sample1.png.
The best result I obtained is the  attached MySample1.png  with the
following code:

\version "2.18.2"
\relative c''
{e1 \trill \p \< |
 b'1 \trill|
 1
  \trill
  ^\markup {\tiny \italic \halign #2 \raise #1.5 div.}
  ^\markup {\tiny "(both trill)"}
   <<
 {b1 \trill}
 \\
 {\set Staff.ottavation = #"Half 8va (opt.)"
  \hideNotes
b4 b b b
  \unset Staff.ottavation
 }
   >>
R1\!
}

but text "(both trill)" is not aligned with the trill symbol and "Half
8va(opt.)" font is bigger than the others.
I tried some ways, but I don't understand where is my mistake.

Please, can anyone help me?

Thank you in advance at all

Regards
Marco B.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment

2014-10-15 Thread Thomas Morley
Hi Marco,

2014-10-15 5:49 GMT+02:00 Marco Bagolin :
> Hi all,
> I can not reproduce the attached Sample1.png.
> The best result I obtained is the  attached MySample1.png  with the
> following code:
>
> \version "2.18.2"
> \relative c''
> {e1 \trill \p \< |
>  b'1 \trill|
>  1
>   \trill
>   ^\markup {\tiny \italic \halign #2 \raise #1.5 div.}
>   ^\markup {\tiny "(both trill)"}
><<
>  {b1 \trill}
>  \\
>  {\set Staff.ottavation = #"Half 8va (opt.)"
>   \hideNotes
> b4 b b b
>   \unset Staff.ottavation
>  }
>>>
> R1\!
> }
>
> but text "(both trill)" is not aligned with the trill symbol and "Half
> 8va(opt.)" font is bigger than the others.
> I tried some ways, but I don't understand where is my mistake.
>
> Please, can anyone help me?

looks like you missed my recent reply.
Please have a look at
http://lists.gnu.org/archive/html/lilypond-user/2014-10/msg00400.html
Is this of some help?

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Problems with text alignment

2015-09-23 Thread Mark Veltzer
Hello all,

I have a problem and a solution to it which does is not very stable.

My problem is that I want music sheets to be followed by their text. Since
these are
songs I arrange the text in several columns to save space. The text is RTL
(hebrew in this case).

What is the problem? I want the columns to be aligned to the right on the
screen.
I can do it but the only way I found to do it is by inserting bogus not
deterministic
number of empty columns and using 'fill-line'.

My question is this: Is there a better solution?

Attached are the input and output files.

The input file contains a more detailed description of the problem.


Cheers,
   Mark
%{

This example shows the problem of aligning text to the right in lilypond.
Without the following two empty 'right-column' entires this example
would show up with one column aligned to the right of the screen
and the other to the left (internally alight to the right)
with lots of space in between.

I am not aware of any other means to get at the result that you get
from this example which does not involved the two 'right-column' entires.

This is an unstable solution since the number of 'right-column' entries
involved is a function of the page width.

Is there a way in lilypond for a more straight forward solution to this
problem?

%}

\version "2.18.2"

\markup {
	\small {
		\fill-line {
			\right-column {
\null
			}
			\right-column {
\null
			}
			\right-column {

\box "A"
"נח - היונה כבר שבה עם עלה של זית"
"נח - תן לנו לצאת ולחזור לבית"
"כי כבר נמאסנו זה על זה"
"האריה על הממותה, הגמל על השיבוטה"
"וגם ההיפופוטם."
"פתח לרגע את הצוהר"
"ונעוף לתכלת הלבנה"
"כך עם היונה."
			}
			\null
			\right-column {

\box "A"
"נח - כמה זמן נמשיך לשוט על פני המים?"
"נח - כל החלונות סגורים כמעט חודשיים."
"וכבר אין לנו אויר"
"לאריה ולממותה לגמל ולשיבוטה"
"וגם להיפופוטם."
"פתח לרגע את הצוהר"
"ואל תוך התכלת הלבנה"
"שלח את היונה."
\null

\box "A"
"נח - מה אתה דואג, הן כבר חדל הגשם"
"נח - פתח את החלון, אולי הופיעה קשת"
"ויראו אותה כולם"
"האריה והממותה, הגמל והשיבוטה"
"וגם ההיפופוטם."
"פתח לרגע את הצוהר"
"ואל תוך התכלת הלבנה"
"שלח את היונה."
			}
		}
	}
}


problem.pdf
Description: Adobe PDF document
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Vertical Text alignment problem

2012-07-21 Thread mail
Hi,

I have some problems with the vertical alignment of text. I tried both the
halign, lower inside a markup and explicit offset commands with an
override, but I couldn't get it right. This sample shows the problem in
detail. I do want to move the two "gliss." text-strings nearly on top or
directly below the glissando itself.

version "2.14.1"

score {
new Staff {
cadenzaOn
set Score.timing = ##f

g'''4ff(

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Vertical Text alignment problem

2012-07-21 Thread Wim van Dommelen

Hi,

I have some problems with the vertical alignment of text. I tried both  
the \halign, \lower inside a \markup and explicit offset commands with  
an \override, but I couldn't get it right. This sample shows the  
problem in detail. I do want to move the two "gliss." text-strings  
nearly on top or directly below the glissando itself.


\version "2.14.1"

\score {
\new Staff {
\cadenzaOn
\set Score.timing = ##f

g'''4\ff\(
<<
{   \stemDown
f'''32[ s256 c'''32 s256 ces'''32 s256
\override NoteHead #'transparent = ##t
e''32 s256 d''32 s256 c''32 s256 a'32 s256 g'32 s256 
f'32 s256
\revert NoteHead #'transparent
d'32 s256 des'32 s256 c'32]
\stemNeutral
} \\
{   \override Glissando #'style = #'trill
\override NoteHead #'transparent = ##t
\override Stem #'transparent = ##t
\once \override Glissando #'extra-offset = #'(-0.5 . 
0.0)
\once \override TextScript #'extra-offset = #'(5.0 . 
-10.0)
			s16. g''4\glissando^\markup{ \rotate #-10 \italic \small "gliss." }  
g'8

\revert Glissando #'style
\revert NoteHead #'transparent
\revert Stem #'transparent
}
>>
\times 2/3 { bes4-.\) d-^\> e-^ }
\once \override Glissando #'style = #'trill
		e->\(\!\glissando_\markup{ \rotate #26 \halign #-2 \lower #-5  
\italic \small "gliss." } f'8[ g'--]\)

\breathe
\bar "|"
a'8.[ a'16] ~ a'16[ g' f'( g'])
}
}

It doesn't want to move as I intend to, it might be a problem wth the  
anchor, but I don't see it.


Any help is appreciated.

Regards,
Wim.




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Vertical Text alignment problem

2012-07-21 Thread wjm

Greetings,
Moving the Glissando and TextScript overrides to just before the 
relevant note seems to do the job, I think.

Note the variation of offset values to suit

You might have to set flag transparency where appropriate if/when you 
move to a newer version of LP


Hope this helps
Bill

s16.
\once \override Glissando #'extra-offset = #'(-0.5 . -0.5)
\once \override TextScript #'extra-offset = #'(7.0 . -6.5)
g''4\glissando ^\markup{ \rotate #-14 \italic \small "gliss." } g'8

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Problems with text alignment

2015-09-23 Thread David Wright
Quoting Mark Veltzer (mark.velt...@gmail.com):
> I have a problem and a solution to it which does is not very stable.
> 
> My problem is that I want music sheets to be followed by their text. Since 
> these are
> songs I arrange the text in several columns to save space. The text is RTL
> (hebrew in this case).
> 
> What is the problem? I want the columns to be aligned to the right on the 
> screen.
> I can do it but the only way I found to do it is by inserting bogus not 
> deterministic
> number of empty columns and using 'fill-line'.
> 
> My question is this: Is there a better solution?

Is the attached more what you want? It's tricky to tell as I'm not
familiar with editing RTL in emacs. (I changed the 3 As to XYZ to
distinguish the paragraphs.)

Cheers,
David.
\version "2.18.2"
\markup {
  \small {
\fill-line {
  "" % this gets pushed to the left by fill-line
  \right-align { % this gets pushed to the right by fill-line
	\concat {
	  \line {
	\right-column {
	  \box "X"
	  "נח - היונה כבר שבה עם עלה של זית"
	  "נח - תן לנו לצאת ולחזור לבית"
	  "כי כבר נמאסנו זה על זה"
	  "האריה על הממותה, הגמל על השיבוטה"
	  "וגם ההיפופוטם."
	  "פתח לרגע את הצוהר"
	  "ונעוף לתכלת הלבנה"
	  "כך עם היונה."
	}
	  }
	  "   " % this separates the columns
	  \line {
	\right-column {
	  \box "Y"
	  "נח - כמה זמן נמשיך לשוט על פני המים?"
	  "נח - כל החלונות סגורים כמעט חודשיים."
	  "וכבר אין לנו אויר"
	  "לאריה ולממותה לגמל ולשיבוטה"
	  "וגם להיפופוטם."
	  "פתח לרגע את הצוהר"
	  "ואל תוך התכלת הלבנה"
	  "שלח את היונה."
	  \null
	  \box "Z"
	  "נח - מה אתה דואג, הן כבר חדל הגשם"
	  "נח - פתח את החלון, אולי הופיעה קשת"
	  "ויראו אותה כולם"
	  "האריה והממותה, הגמל והשיבוטה"
	  "וגם ההיפופוטם."
	  "פתח לרגע את הצוהר"
	  "ואל תוך התכלת הלבנה"
	  "שלח את היונה."
	}
	  }
	}
  }
}
  }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Problems with text alignment

2015-09-24 Thread Andrew Bernard
Hi Mark,

Is this LSR snippet of use to you in this situation?

http://lsr.di.unimi.it/LSR/Item?id=765

Andrew


On 24/09/2015, 10:30, "Mark Veltzer" 
 wrote:

My problem is that I want music sheets to be followed by their text. Since 
these are
songs I arrange the text in several columns to save space. The text is RTL 
(hebrew in this case).


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Problems with text alignment

2015-09-24 Thread Mark Veltzer
Ye!

This solved the issue from me. Actually I even dropped some of the tags and
still got the result I wanted (it seems that some of them were redundant).

Thanks,
   Mark

On Thu, Sep 24, 2015 at 8:02 AM, David Wright 
wrote:

> Quoting Mark Veltzer (mark.velt...@gmail.com):
> > I have a problem and a solution to it which does is not very stable.
> >
> > My problem is that I want music sheets to be followed by their text.
> Since these are
> > songs I arrange the text in several columns to save space. The text is
> RTL
> > (hebrew in this case).
> >
> > What is the problem? I want the columns to be aligned to the right on
> the screen.
> > I can do it but the only way I found to do it is by inserting bogus not
> deterministic
> > number of empty columns and using 'fill-line'.
> >
> > My question is this: Is there a better solution?
>
> Is the attached more what you want? It's tricky to tell as I'm not
> familiar with editing RTL in emacs. (I changed the 3 As to XYZ to
> distinguish the paragraphs.)
>
> Cheers,
> David.
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Problems with text alignment

2015-09-24 Thread Mark Veltzer
The LSR snippet worked but David's solution was simpler (it required no new
function definitions).

Thank you.


Cheers,
Mark

On Thu, Sep 24, 2015 at 11:04 AM, Andrew Bernard 
wrote:

> Hi Mark,
>
> Is this LSR snippet of use to you in this situation?
>
> http://lsr.di.unimi.it/LSR/Item?id=765
>
> Andrew
>
>
> On 24/09/2015, 10:30, "Mark Veltzer" <
> lilypond-user-bounces+andrew.bernard=gmail@gnu.org on behalf of
> mark.velt...@gmail.com> wrote:
>
> My problem is that I want music sheets to be followed by their text. Since
> these are
> songs I arrange the text in several columns to save space. The text is RTL
> (hebrew in this case).
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical Text alignment problem

2012-07-21 Thread Thomas Morley
2012/7/21  :
> Hi,
>
> I have some problems with the vertical alignment of text. I tried both the
> \halign, \lower inside a \markup and explicit offset commands with an
> \override, but I couldn't get it right. This sample shows the problem in
> detail. I do want to move the two "gliss." text-strings nearly on top or
> directly below the glissando itself.

Hi,

perhaps you may want to try the following:

\version "2.14.1"

#(define (radians->degree radians)
  (/ (* radians 180) PI))

#(define ((gliss-plus-text text) grob)
  (let* ((text-stencil (grob-interpret-markup grob text))
 (spanner-stencil (ly:line-spanner::print grob))
 (left-bound-info (ly:grob-property grob 'left-bound-info))
 (y-left (cdar left-bound-info))
 (right-bound-info (ly:grob-property grob 'right-bound-info))
 (y-right (cdar right-bound-info))
 (slant (if (> y-right y-left) 1 -1))
 (spanner-stencil-x-length (interval-length (ly:stencil-extent
spanner-stencil X)))
 (spanner-stencil-y-length (interval-length (ly:stencil-extent
spanner-stencil Y)))
 (alpha (radians->degree (atan (/ spanner-stencil-y-length
spanner-stencil-x-length
 (spanner-center-X (interval-center (ly:stencil-extent
spanner-stencil X)))
 (label-center-X (interval-center (ly:stencil-extent text-stencil X

  (ly:stencil-combine-at-edge
spanner-stencil
Y UP
(ly:stencil-translate
  (ly:stencil-rotate text-stencil (* slant alpha) 0 0)
  (cons (- spanner-center-X label-center-X) 0))
(* -0.5 spanner-stencil-y-length

glissandoTextOn = \override Score.Glissando #'stencil =
#(gliss-plus-text (markup #:italic #:tiny "gliss"))
glissandoTextOff = \revert Score.Glissando #'stencil

noteHeadsOff = {
\override NoteHead #'transparent = ##t
\override NoteHead #'no-ledgers = ##t
}
noteHeadsOn = {
\revert NoteHead #'transparent
\revert NoteHead #'no-ledgers
}

\score {
\new Staff {
\cadenzaOn
\set Score.timing = ##f
\glissandoTextOn
\override Score.Glissando #'style = #'trill

g'''4\ff\(
<<
{\stemDown
f'''32[ s256 c'''32 s256 ces'''32 s256
\noteHeadsOff
e''32 s256 d''32 s256 c''32 s256 a'32 s256 g'32 s256 f'32 s256
\noteHeadsOn
d'32 s256 des'32 s256 c'32]
\stemNeutral
} \\
{
\noteHeadsOff
\override Stem #'transparent = ##t
\once \override Glissando #'extra-offset = #'(-0.5 . 0.0)
s16. g''4\glissando
g'8
\revert Glissando #'style
\noteHeadsOn
\revert Stem #'transparent
}
>>
\times 2/3 { bes4-.\) d-^\> e-^ }
\once \override Glissando #'minimum-length = #9
\once \override Glissando #'springs-and-rods =
#ly:spanner::set-spacing-rods
e->\(\!\glissando f'8[ g'--]\)
\breathe
\bar "|"
a'8.[ a'16] ~ a'16[ g' f'( g'])
}
}

%%

With one of the newer devel-version you can write it more straight-forward:


\version "2.15.39"

#(define (radians->degree radians)
  (/ (* radians 180) PI))

#(define ((gliss-plus-text text) grob)
  (let* ((text-stencil (grob-interpret-markup grob text))
 (spanner-stencil (ly:line-spanner::print grob))
 (left-bound-info (ly:grob-property grob 'left-bound-info))
 (y-left (cdar left-bound-info))
 (right-bound-info (ly:grob-property grob 'right-bound-info))
 (y-right (cdar right-bound-info))
 (slant (if (> y-right y-left) 1 -1))
 (spanner-stencil-x-length (interval-length (ly:stencil-extent
spanner-stencil X)))
 (spanner-stencil-y-length (interval-length (ly:stencil-extent
spanner-stencil Y)))
 (alpha (radians->degree (atan (/ spanner-stencil-y-length
spanner-stencil-x-length
 (spanner-center-X (interval-center (ly:stencil-extent
spanner-stencil X)))
 (label-center-X (interval-center (ly:stencil-extent text-stencil X

  (ly:stencil-combine-at-edge
spanner-stencil
Y UP
(ly:stencil-translate
  (ly:stencil-rotate text-stencil (* slant alpha) 0 0)
  (cons (- spanner-center-X label-center-X) 0))
(* -0.5 spanner-stencil-y-length

glissandoTextOn = \override Score.Glissando #'stencil =
#(gliss-plus-text (markup #:italic #:tiny "gliss"))
glissandoTextOff = \revert Score.Glissando #'stencil

noteHeadsOff = {
\override NoteHead #'transparent = ##t
\override NoteHead #'no-ledgers = ##t
}
noteHeadsOn = {
\revert NoteHead #'transparent
\revert NoteHead #'no-ledgers
}

customGlissandoTweaksOn = {
\glissandoTextOn
\override Score.Glissando #'style = #'trill
\override Score.Glissando #'bound-details #'left #'padding = #1
\override Score.Glissando #'bound-details #'right #'padding = #0.2
\override S

Re: Vertical Text alignment problem

2012-07-23 Thread wjm

> On 22 Jul 2012, at 03:53 , wjm wrote:
>
>> Greetings,
>> Moving the Glissando and TextScript overrides to just before the
>> relevant note seems to do the job, I think.
>> Note the variation of offset values to suit
>>
>> You might have to set flag transparency where appropriate if/when you
>> move to a newer version of LP
>>
>> Hope this helps
>> Bill
>>
>> s16.
>> \once \override Glissando #'extra-offset = #'(-0.5 . -0.5)
>> \once \override TextScript #'extra-offset = #'(7.0 . -6.5)
>> g''4\glissando ^\markup{ \rotate #-14 \italic \small "gliss." } g'8
>
>
On 23/07/12 20:33, Wim van Dommelen wrote:

Hi Bill,

It sure helps, it works and I'm just tweaking to fit in with the final
score. Much easier and better understandable as compared to the solution
which Thomas mailed (although that sure also works).

My conclusion is that when there is a note in between chances are the
"\once" is already eaten and not effective. I'll keep a closed look at it.

Thanks again!

Regards from a sunny Holland,
Wim.





Hi Wim,
From the Notation Reference... 5.3.3 - 5.3.4
"...
\once can be used with \override to affect only the current time step:
{
  <<
{
  \override Stem #'thickness = #3.0
  e4 e e e
} \\ {
  c4%this is default

  \once \override Stem #'thickness = #3.0
  c4%this one is changed

c c %these two revert to default
}
  >>
}
...
...
When several similar items are placed at the same musical moment, the 
\override command cannot be used to modify just one of them – this is 
where the \tweak command must be used. Items which may appear more than 
once at the same musical moment include the following:


note heads of notes inside a chord
articulation signs on a single note
ties between notes in a chord
tuplet brackets starting at the same time
..."

I'm pleased to have been of help. :)
Regards
Bill

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Text alignment under reciting tone

2008-03-27 Thread Hugh
Dear All: 

This may be a n00b question, but here goes. I'm trying to format a 
chant with several stanzas under one chant. The lyrics underneath the 
reciting tone (in this case a b-flat) insist on center-aligning 
themselves, despite all of my \left-aligns to the contrary. This gives 
the text a "christmas-tree" effect. I assume that the problem is in 
the lyrics context, but I am completely at a loss as to how to fix it, 
and the the documentation has no leads. 


Thanks for any help you can give. 


Hugh 


\version "2.10.33" 


\include "english.ly" 
\include "anglican-init.ly" 
stemon = { \override Staff.Stem #'transparent = ##f } 
stemoff = { \override Staff.Stem #'transparent = ##t } 


\score { \relative c'' 
\new Staff \with { \remove "Time_signature_engraver" } 
{ << 
\key f \major 
\new Voice = "one" { \stemoff bf \breve c2 
\bar "|" bf4 bf g a bf2 
\bar "|" } 
\new Lyrics \lyricsto "one" { 
\markup { Holy God, Creator of Heaven and } Earth. Have mer -- 
cy on 
us. } 
\new Lyrics \lyricsto "one" { 
\markup { Holy and Mighty, Redeemer of the } World. Have mer --
 cy 
on us. } 
\new Lyrics \lyricsto "one" { 
\markup { Holy Immortal One, Sanctifier of the } Faithful. 
Have mer 
-- cy on us. } 
\new Lyrics \lyricsto "one" { 
\markup { Holy, blessed and glorious Trinity, One } God. Have 
mer -- 
cy on us. } 
\set Score.timing = ##f 



} 



   \layout { raggedright = ##t } 
   \midi { } 




___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


overriding text alignment in stylesheet

2008-04-01 Thread Kieren MacMillan

[Lilypond 2.11.42]

Hi all,

I'm trying to define an orchestral stylesheet, based on the  
Barenreiter NMA soft-bound edition (Mozart KV 551, to be exact).  
Their instrument names are centered in a column, which presents no  
problem; however, the InstrumentName text itself is a center-aligned  
column if there are multiple lines in the name, e.g.


Violoncello
   e Basso

In my stylesheet, I'm trying to set this so that the \header block of  
a piece which \include-s it will not have to explicitly \center-align  
the name. However, while the first two \override lines in the  
following code work as expected, I can't find anything correct for  
the last one (to force the column of text to be centered):


\layout
{
\context
{
\Score
\override InstrumentName #'font-shape = #'italic
\override InstrumentName #'baseline-skip = #2.2
\override InstrumentName #'self-alignment-X = #0
}
}

Any hints would be appreciated.  =)

Best regards,
Kieren.


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Vertical text alignment in VoltaBracket - Bug?

2008-01-22 Thread Risto Vääräniemi
Dear All,

The volta bracket text seems to be aligned vertically based on the
topmost part of the text. In the attached image, the first bracket has
just "short" characters and the other some "taller" characters.
Therefore, their base lines are not aligned. Please, see the attached
image.

Is there a way to move just the text to make the text vertically
aligned? The Score.VoltaBracket #'extra-offset moves the whole
bracket.

Is this a bug? Should I send it to the bug mailing list?

-Risto
<>___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment under reciting tone

2008-03-27 Thread Deacon Geoffrey Horton
Try this:

\new Lyrics \lyricsto "one" {
   \once \override LyricText #'self-alignment-X = #-1 "Holy God,
Creator of Heaven and" Earth.


etc.


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment under reciting tone

2008-03-27 Thread Mats Bengtsson

Quoting Deacon Geoffrey Horton <[EMAIL PROTECTED]>:


Try this:

\new Lyrics \lyricsto "one" {
  \once \override LyricText #'self-alignment-X = #-1 "Holy God,
Creator of Heaven and" Earth.


etc.


Note that you can replace the #-1 by #LEFT, which might be easier
and more intuitive to remember.

   /Mats



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment under reciting tone

2008-03-28 Thread Deacon Geoffrey Horton
> Thanks so much, it worked perfectly -- and such quick response! I assume
> that this is somewhere in the documentation that I just didn't see.

Not in any single place that I'm aware of; you have to put it together
piece by piece. (I think I found the various pieces in replies to the
mailing list.) But there's a new version of the documentation in the
works, and perhaps it's there. If not, I can contribute a short
example to be included.


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment under reciting tone

2008-03-28 Thread Graham Percival
On Fri, 28 Mar 2008 08:41:41 -0400
"Deacon Geoffrey Horton" <[EMAIL PROTECTED]> wrote:

> > Thanks so much, it worked perfectly -- and such quick response! I
> > assume that this is somewhere in the documentation that I just
> > didn't see.
> 
> Not in any single place that I'm aware of; you have to put it together
> piece by piece. (I think I found the various pieces in replies to the
> mailing list.) But there's a new version of the documentation in the
> works, and perhaps it's there. If not, I can contribute a short
> example to be included.

LSR, please.  If it isn't included in the relevant section of the
NR when we announce the public draft, point out the snippet.

Cheers,
- Graham


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment under reciting tone

2008-03-28 Thread Valentin Villenave
2008/3/28, Graham Percival <[EMAIL PROTECTED]>:
> On Fri, 28 Mar 2008 08:41:41 -0400
>  "Deacon Geoffrey Horton" <[EMAIL PROTECTED]> wrote:
>  > Not in any single place that I'm aware of; you have to put it together
>  > piece by piece. (I think I found the various pieces in replies to the
>  > mailing list.) But there's a new version of the documentation in the
>  > works, and perhaps it's there. If not, I can contribute a short
>  > example to be included.

> LSR, please.  If it isn't included in the relevant section of the
>  NR when we announce the public draft, point out the snippet.

Hmm. Geoffrey, this snippet has been here for more than a year:
http://lsr.dsi.unimi.it/LSR/Item?id=282

(Graham: and it is, of course, tagged as "docs")

Cheers,
Valentin


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment under reciting tone

2008-03-28 Thread Deacon Geoffrey Horton
Great! I don't have to do it. Maybe it can use some more tags;
"reciting tone" might help, for example.

Geoff


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment under reciting tone

2008-03-28 Thread Hugh
Deacon Geoffrey Horton  gmail.com> writes:

> 
> Great! I don't have to do it. Maybe it can use some more tags;
> "reciting tone" might help, for example.
> 
> Geoff
> 


As the person who started this discussion, I want to apologize for not looking 
in the LSR first. The computer on which Lilypond is installed is not the 
computer in the house that is hooked up to the internet, so searching for 
things involves a couple of extra steps. This I will now put into my routine.

Thanks again!



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment under reciting tone

2008-03-28 Thread Graham Percival
On Fri, 28 Mar 2008 13:37:49 -0400
"Deacon Geoffrey Horton" <[EMAIL PROTECTED]> wrote:

> Great! I don't have to do it. Maybe it can use some more tags;
> "reciting tone" might help, for example.

Tags in LSR are not arbitrary pieces of text.  If the snippet
description doesn't contain "reciting tone", it could be added
there, but that's separate from a tag.

Cheers,
- Graham


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: overriding text alignment in stylesheet

2008-04-01 Thread Mats Bengtsson



Kieren MacMillan wrote:



or
\set Staff.instrumentName = \markup{\column {Violoncello "e Basso" }}


That's what I'd prefer.

Then I don't understand your question. What's the problem you get when you
use this approach?

Actually, what I'd *really* prefer is

\set Staff.instrumentName = "Violoncello e Basso"

and then have the stylesheet wrap the text automatically -- but that 
seems like it would likely be too difficult and error-prone.
It should be possible to write a few lines of Scheme code that do the 
equivalent

of \markup{\wordwrap ... } and then feed the result to
ly:system-start-text::print. Then, you can override the stencil property of
InstrumentName to use that function instead.

  /Mats


Cheers,
Kieren.


--
=
Mats Bengtsson
Signal Processing
School of Electrical Engineering
Royal Institute of Technology (KTH)
SE-100 44  STOCKHOLM
Sweden
Phone: (+46) 8 790 8463 
   Fax:   (+46) 8 790 7260
Email: [EMAIL PROTECTED]
WWW: http://www.s3.kth.se/~mabe
=



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: overriding text alignment in stylesheet

2008-04-01 Thread Mats Bengtsson



Kieren MacMillan wrote:

[Lilypond 2.11.42]

Hi all,

I'm trying to define an orchestral stylesheet, based on the 
Barenreiter NMA soft-bound edition (Mozart KV 551, to be exact). Their 
instrument names are centered in a column, which presents no problem; 
however, the InstrumentName text itself is a center-aligned column if 
there are multiple lines in the name, e.g.


Violoncello
   e Basso

How do you specify the multiple lines? Do you use
\set Staff.instrumentName = \markup{\center-align {Violoncello "e Basso" }}
or
\set Staff.instrumentName = \markup{\column {Violoncello "e Basso" }}

   /Mats


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: overriding text alignment in stylesheet

2008-04-01 Thread Kieren MacMillan

Hi Mats,


Do you use
\set Staff.instrumentName = \markup{\center-align {Violoncello "e  
Basso" }}


That's what I'm trying to avoid.


or
\set Staff.instrumentName = \markup{\column {Violoncello "e Basso" }}


That's what I'd prefer. Actually, what I'd *really* prefer is

\set Staff.instrumentName = "Violoncello e Basso"

and then have the stylesheet wrap the text automatically -- but that  
seems like it would likely be too difficult and error-prone.


Cheers,
Kieren.


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: overriding text alignment in stylesheet

2008-04-01 Thread Valentin Villenave
2008/4/1, Mats Bengtsson <[EMAIL PROTECTED]>:
>
>  Kieren MacMillan wrote:

> > Actually, what I'd *really* prefer is
>  >
>  > \set Staff.instrumentName = "Violoncello e Basso"

Have you tried
http://lsr.dsi.unimi.it/LSR/Item?id=383 ?

It was written by Nicolas Sceaux; see a demo here:
http://lists.gnu.org/archive/html/lilypond-user-fr/2008-02/msg00045.html

IIRC he has recently implemented this in LilyPond itself; however I
can't find it in the ChangeLog (or perhaps he just planned to?)

Cheers,
Valentin


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: overriding text alignment in stylesheet

2008-04-01 Thread Kieren MacMillan

Hi Valentin,


Have you tried
http://lsr.dsi.unimi.it/LSR/Item?id=383 ?


Et voila!  =)


IIRC he has recently implemented this in LilyPond itself; however I
can't find it in the ChangeLog (or perhaps he just planned to?)


Very cool.

Thanks! And "sorry I didn't check the LSR first"...  =\
Kieren.


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: overriding text alignment in stylesheet

2008-04-01 Thread Valentin Villenave
2008/4/1, Kieren MacMillan <[EMAIL PROTECTED]>:

>  Thanks! And "sorry I didn't check the LSR first"...  =\

Actually, I was aware of it only because of the French mailing list... :)

Cheers,
Valentin


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Text alignment center of note head

2007-06-14 Thread TiagoM

Hi

How can one align a \markup with the center of the notehead instead of it's
left edge?

Thank you.

Tiago


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical text alignment in VoltaBracket - Bug?

2008-01-22 Thread Risto Vääräniemi
Hi again,

The image I sent in my previous message was probably buggy. This one
should be OK.

-Risto
<>___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical text alignment in VoltaBracket - Bug?

2008-01-23 Thread Valentin Villenave
2008/1/22, Risto Vääräniemi <[EMAIL PROTECTED]>:
> Dear All,
>
> The volta bracket text seems to be aligned vertically based on the
> topmost part of the text. In the attached image, the first bracket has
> just "short" characters and the other some "taller" characters.
> Therefore, their base lines are not aligned. Please, see the attached
> image.

Yes, this is a known behavior.

> Is there a way to move just the text to make the text vertically
> aligned? The Score.VoltaBracket #'extra-offset moves the whole
> bracket.

You might want to try the simple hack described on
http://lsr.dsi.unimi.it/LSR/Item?id=285

Cheers,
Valentin


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment center of note head

2007-06-15 Thread Arjen Bax
TiagoM  gmail.com> writes:


> How can one align a \markup with the center of the notehead instead of it's
> left edge?

Use \halign:

\version "2.10.20"
{
  c''^\markup{\halign #0 "Centered"}
}

See
http://lilypond.org/doc/v2.10/Documentation/user/lilypond/Overview-of-text-markup-commands#Overview-of-text-markup-commands






___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment center of note head

2007-06-16 Thread Mats Bengtsson

Arjen Bax wrote:


TiagoM  gmail.com> writes:


 


How can one align a \markup with the center of the notehead instead of it's
left edge?
   



Use \halign:

\version "2.10.20"
{
 c''^\markup{\halign #0 "Centered"}
}

See
http://lilypond.org/doc/v2.10/Documentation/user/lilypond/Overview-of-text-markup-commands#Overview-of-text-markup-commands
 


In that case, I would rather propose
c''^\markup{\hcenter "Centered" }
or
\override TextScript #'self-alignment-X = #CENTER c''^"Centered"

However, if I understand correctly, the question was about the
alignment point of the note, not of the text itself. You can get
it centered on the note head by the setting:

\override TextScript #'X-offset =#(ly:make-simple-closure
 `(,+
   ,(ly:make-simple-closure (list 
ly:self-alignment-interface::centered-on-x-parent))
   ,(ly:make-simple-closure (list 
ly:self-alignment-interface::x-aligned-on-self


I recommend you to use copy/paste to insert this into your file,
since it's very critical to get all backwards quote marks and commas
correct.

  /Mats



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment center of note head

2007-06-17 Thread TiagoM



Mats Bengtsson-4 wrote:
> 
> However, if I understand correctly, the question was about the
> alignment point of the note, not of the text itself. You can get
> it centered on the note head by the setting:
> 
> \override TextScript #'X-offset =#(ly:make-simple-closure
>   `(,+
> ,(ly:make-simple-closure (list 
> ly:self-alignment-interface::centered-on-x-parent))
> ,(ly:make-simple-closure (list 
> ly:self-alignment-interface::x-aligned-on-self
> 
> I recommend you to use copy/paste to insert this into your file,
> since it's very critical to get all backwards quote marks and commas
> correct.
> 
>/Mats
> 
> 
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 

This is what I was looking for. But not yet all of it. I'd like to have the
text centered on the note head only when the text itself is centered (when
using \hcenter or \center-align or \halign #0).

Is it possible to add this \override property writen above inside a
\markup{}, just like when we change the font size: \markup {\override
#'(font-size . -5) "ABC"}?

Anyway I think the centering commands should already center the text with
the center of the notehead. is there a reason why it isn't this way?
-- 
View this message in context: 
http://www.nabble.com/Text-alignment-center-of-note-head-tf3923193.html#a11161866
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment center of note head

2007-06-17 Thread Mats Bengtsson

TiagoM wrote:


...

This is what I was looking for. But not yet all of it. I'd like to have the
text centered on the note head only when the text itself is centered (when
using \hcenter or \center-align or \halign #0).

Is it possible to add this \override property writen above inside a
\markup{}, just like when we change the font size: \markup {\override
#'(font-size . -5) "ABC"}?
 


You cannot do this setting from within a markup command,
as far as I know, but you can easily define a macro
centermarkup = {
\once \override TextScript #'self-alignment-X = #CENTER
\once \override TextScript #'X-offset =#(ly:make-simple-closure
`(,+
  ,(ly:make-simple-closure (list 
ly:self-alignment-interface::centered-on-x-parent))
  ,(ly:make-simple-closure (list 
ly:self-alignment-interface::x-aligned-on-self

}

that you can use like

c^"Left aligned" \centermarkup c^"Centered" c^"Left aligned again"

Of course you can change the macro name to something shorter
if you want to save typing.

 


Anyway I think the centering commands should already center the text with
the center of the notehead. is there a reason why it isn't this way?
 


The alignment is done by aligning a reference point tied to the
note with a reference point tied to the markup. As long as you
have left aligned markups, I hope you agree that it makes sense
to have them left aligned with the note head, i.e. the reference
point of the note head is at the left edge, so that's why the
reference point of the note is not at the center by default.

I agree that it would be a nice feature, though.

  /Mats


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment center of note head

2007-06-17 Thread TiagoM



Mats Bengtsson-4 wrote:
> 
> TiagoM wrote:
> 
>> ...
>>
>>This is what I was looking for. But not yet all of it. I'd like to have
the
>>text centered on the note head only when the text itself is centered (when
>>using \hcenter or \center-align or \halign #0).
>>
>>Is it possible to add this \override property writen above inside a
>>\markup{}, just like when we change the font size: \markup {\override
>>#'(font-size . -5) "ABC"}?
>>  
>>
> You cannot do this setting from within a markup command,
> as far as I know, but you can easily define a macro
> centermarkup = {
> \once \override TextScript #'self-alignment-X = #CENTER
> \once \override TextScript #'X-offset =#(ly:make-simple-closure
>  `(,+
>,(ly:make-simple-closure (list 
> ly:self-alignment-interface::centered-on-x-parent))
>,(ly:make-simple-closure (list 
> ly:self-alignment-interface::x-aligned-on-self
> }
> 
> that you can use like
> 
> c^"Left aligned" \centermarkup c^"Centered" c^"Left aligned again"
> 
> Of course you can change the macro name to something shorter
> if you want to save typing.
> 
>>  
>>
>>Anyway I think the centering commands should already center the text with
>>the center of the notehead. is there a reason why it isn't this way?
>>  
>>
> The alignment is done by aligning a reference point tied to the
> note with a reference point tied to the markup. As long as you
> have left aligned markups, I hope you agree that it makes sense
> to have them left aligned with the note head, i.e. the reference
> point of the note head is at the left edge, so that's why the
> reference point of the note is not at the center by default.
> 
> I agree that it would be a nice feature, though.
> 
>/Mats
> 
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 

What if there are 2 markup's on the same note, one centered aligned and the
other not? If you could \override the setting inside the markup it wouldn't
affect the non centered markup. Is there really no solution for this? Should
we ask a feature that \hcenter should be centered with the notehead's center
and not it's edge?

Tiago
-- 
View this message in context: 
http://www.nabble.com/Text-alignment-center-of-note-head-tf3923193.html#a11163281
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text alignment center of note head

2007-06-17 Thread Mats Bengtsson

TiagoM wrote:



What if there are 2 markup's on the same note, one centered aligned and the
other not? If you could \override the setting inside the markup it wouldn't
affect the non centered markup. Is there really no solution for this? Should
we ask a feature that \hcenter should be centered with the notehead's center
and not it's edge?
 


As far as I understand, this would require a major modifications
of the LilyPond implementation, so if you send a feature request
to bug-lilypond, you shouldn't expect it to implemented very soon.

  /Mats


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user