epsfile include question

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

epsfile include question

Henrik Frisk-3
Two questions about the \epsfile statement that I can't find in the documentation:

1. Is it not possible to move the eps graphic? I have tried \raise without success.

2. Is it possible to scale the size of the graphic? (It strikes me now that it may be scaled with the global-staff-size - haven't checked that...)

Thanks for any input.

/henrik frisk


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

Re: epsfile include question

Han-Wen Nienhuys-2
Henrik Frisk wrote:
> Two questions about the \epsfile statement that I can't find in the documentation:
>
> 1. Is it not possible to move the eps graphic? I have tried \raise without success.

You can't move scripts wholesale with \raise. See

http://www.lilypond.org/doc/v2.4/Documentation/user/out-www/lilypond/Text-markup.html

Graham,

Where did this information go in the 2.6/2.7 manual?

> 2. Is it possible to scale the size of the graphic? (It strikes me now that it may be scaled with the global-staff-size - haven't checked that...)
>
> Thanks for any input.

No, but I can add it as a sponsored feature, if you like.


--

Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
  -- Code for Music Notation
http://www.lilypond-design.com



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

Re: epsfile include question

Henrik Frisk
Han-Wen Nienhuys <[hidden email]> wrote:

> Henrik Frisk wrote:
> > Two questions about the \epsfile statement that I can't find in the documentation:
> > 1. Is it not possible to move the eps graphic? I have tried \raise
> > without success.
>
> You can't move scripts wholesale with \raise. See
>
> http://www.lilypond.org/doc/v2.4/Documentation/user/out-www/lilypond/Text-markup.html
>
> Graham,
A few lines fell out of my first post. I have tried a number of commands apart from \raise which obviously doesn't work. As far as I understand, \translate would be one possible way to move the graphic and I can move it sideways but not up or down. IOW the following moves it to the right but not up:

\markup { \translate #(cons 2 5) \epsfile #"eps/nssffff.eps" }


>
> Where did this information go in the 2.6/2.7 manual?
>
> > 2. Is it possible to scale the size of the graphic? (It strikes me now that it may be scaled with the global-staff-size - haven't checked that...)
> > Thanks for any input.
>
> No, but I can add it as a sponsored feature, if you like.
>

Yeah, well, how much?

/henrik frisk


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

Re: epsfile include question

Mats Bengtsson-6


Henrik Frisk wrote:

> Han-Wen Nienhuys <[hidden email]> wrote:
>
>
>>Henrik Frisk wrote:
>>
>>>Two questions about the \epsfile statement that I can't find in the documentation:
>>>1. Is it not possible to move the eps graphic? I have tried \raise
>>>without success.
>>
>>You can't move scripts wholesale with \raise. See
>>
>>http://www.lilypond.org/doc/v2.4/Documentation/user/out-www/lilypond/Text-markup.html
>>
>>Graham,
>
> A few lines fell out of my first post. I have tried a number of commands apart from \raise which obviously doesn't work. As far as I understand, \translate would be one possible way to move the graphic and I can move it sideways but not up or down. IOW the following moves it to the right but not up:
>
> \markup { \translate #(cons 2 5) \epsfile #"eps/nssffff.eps" }

The example from the 2.4 manual doesn't work out of the box in 2.6.
You have to replace the "" with " " or \hspace #1.0 to give \raise
some object to raise relative to. Of course, a better alternative is
probably to increase the padding:
\once \override TextScript #'padding = #3.0
c^\markup{...}

    /Mats




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

Re: epsfile include question

Henrik Frisk
Mats Bengtsson <[hidden email]> wrote:

>
>
> Henrik Frisk wrote:
> > Han-Wen Nienhuys <[hidden email]> wrote:
> >
> >>Henrik Frisk wrote:
> >>
> >>>Two questions about the \epsfile statement that I can't find in the documentation:
> >>>1. Is it not possible to move the eps graphic? I have tried \raise
> >>>without success.
> >>
> >>You can't move scripts wholesale with \raise. See
> >>
> >>http://www.lilypond.org/doc/v2.4/Documentation/user/out-www/lilypond/Text-markup.html
> >>
> >>Graham,
> > A few lines fell out of my first post. I have tried a number of
> > commands apart from \raise which obviously doesn't work. As far as I
> > understand, \translate would be one possible way to move the graphic
> > and I can move it sideways but not up or down. IOW the following
> > moves it to the right but not up:
> > \markup { \translate #(cons 2 5) \epsfile #"eps/nssffff.eps" }
>
> The example from the 2.4 manual doesn't work out of the box in 2.6.
> You have to replace the "" with " " or \hspace #1.0 to give \raise
> some object to raise relative to. Of course, a better alternative is
> probably to increase the padding:
> \once \override TextScript #'padding = #3.0
> c^\markup{...}
>
>     /Mats
Well, here we go! That's something that works.
Thank you!

/henrik


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

Re: epsfile include question

Graham Percival-2
In reply to this post by Han-Wen Nienhuys-2

On 24-Aug-05, at 3:17 AM, Han-Wen Nienhuys wrote:
> You can't move scripts wholesale with \raise. See
>
> http://www.lilypond.org/doc/v2.4/Documentation/user/out-www/lilypond/ 
> Text-markup.html
>
> Graham,
>
> Where did this information go in the 2.6/2.7 manual?

As Mats said, this trick no longer works, so I removed it.  I've added  
info with
new tricks (#'padding, and using \hspace #0 to create an "anchor"  
point).

Will
\markup{ \hspace #0 \raise #3 "high text" }
continue to work in the future?  When we noticed that "" \raise and " "  
\raise
didn't work, there was a discussion about whether the whitespace should
work in the same in future versions; you didn't want to commit to doing  
that.
Is \hspace #0 a stable construct?  (if not, could we have a \null markup
command that _is_ stable, and does the same thing as \hspace #0 ?)

Cheers,
- Graham



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

Re: epsfile include question

stk
In reply to this post by Henrik Frisk-3
Henrik Frisk wrote:

> 1. Is it not possible to move the eps
> graphic? I have tried \raise without success.

> . . . I have tried a number of commands
> apart from \raise . . .

>   \markup { \translate #(cons 2 5) \epsfile #"eps/nssffff.eps" }

In the LilyPond 2.6.0 manual, section 8.1.7 says that \raise, \lower,
and \translate cannot be used to displace entire scripts.  But then in
section 11.2.3 (around the middle of that section), there is an
explanation of a trick to get around that limitation:  writing

   \markup { ""  \translate #'(2.0  .  5.0) "foo bar" }

would place the empty string ("") where Lily wants it, but then the
string "foo bar" would be placed 2 units to the right of, and 5 units
above, that empty string, so that in effect "foo bar" would wind up
being placed where you wanted it.  On that basis, it would be worth
trying

  \markup { ""  \translate #'(2.0  .  5.0) \epsfile #"eps/nssffff.eps" }

to see if that gives you the displacement you want.

-- Tom



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

Re: epsfile include question

Graham Percival-2

On 24-Aug-05, at 10:39 PM, [hidden email] wrote:
> In the LilyPond 2.6.0 manual, section 8.1.7 says that \raise, \lower,
> and \translate cannot be used to displace entire scripts.  But then in
> section 11.2.3 (around the middle of that section), there is an
> explanation of a trick to get around that limitation:  writing
>
>    \markup { ""  \translate #'(2.0  .  5.0) "foo bar" }

Thanks for pointing that out!  Unfortunately it doesn't work, but it
_does_ work if you replace "" with
#:hspace 0

I've updated the manual in CVS.

Cheers,
- Graham



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

Re: epsfile include question

Henrik Frisk-3
In reply to this post by stk
[hidden email] wrote:

> Henrik Frisk wrote:
>
> > 1. Is it not possible to move the eps
> > graphic? I have tried \raise without success.
>
> > . . . I have tried a number of commands
> > apart from \raise . . .
>
> >   \markup { \translate #(cons 2 5) \epsfile #"eps/nssffff.eps" }
>
> In the LilyPond 2.6.0 manual, section 8.1.7 says that \raise, \lower,
> and \translate cannot be used to displace entire scripts.  But then in
> section 11.2.3 (around the middle of that section), there is an
> explanation of a trick to get around that limitation:  writing
>
>    \markup { ""  \translate #'(2.0  .  5.0) "foo bar" }
>
> would place the empty string ("") where Lily wants it, but then the
> string "foo bar" would be placed 2 units to the right of, and 5 units
> above, that empty string, so that in effect "foo bar" would wind up
> being placed where you wanted it.  On that basis, it would be worth
> trying
>
>   \markup { ""  \translate #'(2.0  .  5.0) \epsfile #"eps/nssffff.eps" }
>
> to see if that gives you the displacement you want.
>
> -- Tom

Well, after some fiddling around with this, this is how it works in the score I am currently working on with LilyPond 2.7.7 on OSX.

\markup { ""  \translate #'(2.0  .  5.0) "foo bar" } => no effect
\markup { " "  \translate #'(2.0  .  5.0) "foo bar" } => displaced as intended

In both cases the single white space string can be replaced by \hspace #0.0 . Same goes for \raise

This is what Mats pointed out in his reply, and I think that the example in 11.2.3, that I used as reference, this should be changed. I assume the same is true if you define it as a scheme macro in which case this example from 11.2.3 will not work as intended (haven't tried it...):

#(def-markup-command (character layout props name) (string?)
  "Print the character name in small caps, translated to the left and
  top.  Syntax: \\character #\"name\""
  (interpret-markup layout props
   (markup "" #:translate (cons -3 1) #:smallcaps name)))

Thank you all for the help.

/henrik


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

Re: epsfile include question

Han-Wen Nienhuys-2
In reply to this post by Graham Percival-2
Graham Percival wrote:
> Is \hspace #0 a stable construct?  (if not, could we have a \null markup
> command that _is_ stable, and does the same thing as \hspace #0 ?)

Yes, I think that a \null markup would be a sensible idea. I've added it
to CVS.

--

Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
  -- Code for Music Notation
http://www.lilypond-design.com



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