how to override of TextScript.stencil into a tweak

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

how to override of TextScript.stencil into a tweak

Ryan Michael
I have the following snippet

%%%%%%%%%%%%%%%%%%%%%%%%%%
\time 4/4 
 \once \override TextScript.stencil =
    #(make-stencil-boxer 0.1 0.3 ly:text-interface::print)
r1\fermata-\markup{\teeny "wait for viola cue"}\stopTextSpan^"B"
%%%%%%%%%%%%%%%%%%%%%%%%%%%

However the above applies a stencil boxer to the markup below the staff in addition to the string "B". I would only like to add the stencil boxer to the letter "B" above the staff. I understand that I should use a tweak except when I try the above in the Tweak syntax, I get an error. 
Thanks!
Ryan.

--
ॐ नमः शिवाय

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: how to override of TextScript.stencil into a tweak

Mark Knoop-4
At 00:27 on 03 Jun 2016, Ryan Michael wrote:

>I have the following snippet
>
>%%%%%%%%%%%%%%%%%%%%%%%%%%
>\time 4/4
> \once \override TextScript.stencil =
>    #(make-stencil-boxer 0.1 0.3 ly:text-interface::print)
>r1\fermata-\markup{\teeny "wait for viola cue"}\stopTextSpan^"B"
>%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
>However the above applies a stencil boxer to the markup below the
>staff in addition to the string "B". I would only like to add the
>stencil boxer to the letter "B" above the staff. I understand that I
>should use a tweak except when I try the above in the Tweak syntax, I
>get an error. Thanks!

Well, you don't mention what you tried. This seems to work:

{
r1\fermata
-\tweak TextScript.stencil #(make-stencil-boxer 0.1 0.3 ly:text-interface::print)
-\markup { \teeny "wait for viola cue" }
\stopTextSpan
^"B"
}

--
Mark Knoop

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: how to override of TextScript.stencil into a tweak

Simon Albrecht-2
In reply to this post by Ryan Michael
On 03.06.2016 09:27, Ryan Michael wrote:
> I would only like to add the stencil boxer to the letter "B" above the
> staff.

Just guessing: Perhaps the "B" should be a rehearsal mark anyway instead
of a text script? See
<http://lilypond.org/doc/v2.18/Documentation/notation/bars#rehearsal-marks>.
Rehearsal marks can be boxed much easier, there’s a snippet for that on
the same page.

Best, Simon

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: how to override of TextScript.stencil into a tweak

Jacques Menu Muzhic
Hello Ryan,

Does:

{
  r1\fermata
  -\tweak TextScript.stencil #(make-stencil-boxer 0.1 0.3 ly:text-interface::print)
  -\markup { \teeny "wait for viola cue" }
  \stopTextSpan
  -\tweak TextScript.stencil #(make-stencil-boxer 0.1 0.3 ly:text-interface::print)
  ^"B »
}

do what you want?

JM

> Le 3 juin 2016 à 09:52, Simon Albrecht <[hidden email]> a écrit :
>
> On 03.06.2016 09:27, Ryan Michael wrote:
>> I would only like to add the stencil boxer to the letter "B" above the staff.
>
> Just guessing: Perhaps the "B" should be a rehearsal mark anyway instead of a text script? See <http://lilypond.org/doc/v2.18/Documentation/notation/bars#rehearsal-marks>. Rehearsal marks can be boxed much easier, there’s a snippet for that on the same page.
>
> Best, Simon
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: how to override of TextScript.stencil into a tweak

Ryan Michael
Thank you Mark's snippet (And probably the other's which were almost equivalent) worked for me!


On Fri, Jun 3, 2016 at 1:04 AM, Jacques Menu Muzhic <[hidden email]> wrote:
Hello Ryan,

Does:

{
  r1\fermata
  -\tweak TextScript.stencil #(make-stencil-boxer 0.1 0.3 ly:text-interface::print)
  -\markup { \teeny "wait for viola cue" }
  \stopTextSpan
  -\tweak TextScript.stencil #(make-stencil-boxer 0.1 0.3 ly:text-interface::print)
  ^"B »
}

do what you want?

JM

> Le 3 juin 2016 à 09:52, Simon Albrecht <[hidden email]> a écrit :
>
> On 03.06.2016 09:27, Ryan Michael wrote:
>> I would only like to add the stencil boxer to the letter "B" above the staff.
>
> Just guessing: Perhaps the "B" should be a rehearsal mark anyway instead of a text script? See <http://lilypond.org/doc/v2.18/Documentation/notation/bars#rehearsal-marks>. Rehearsal marks can be boxed much easier, there’s a snippet for that on the same page.
>
> Best, Simon
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user




--
ॐ नमः शिवाय

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user