Re: Scheme: Is there a ... - Doc error? & other stuff

2008-02-07 Thread Risto Vääräniemi
On 06/02/2008, Mats Bengtsson wrote:
> See http://lists.gnu.org/archive/html/bug-lilypond/2006-01/msg00163.html
> Now that we recently have renamed some properties and predefined macros
> in 2.11.37 and coming 2.11.38, in order to get a more unified naming,
> maybe it's time to bring up my old proposal.

Yes! Either one of these options would suit me fine as long as their
functionalities are consistent.

Any other comments? :-)

-Risto


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


Re: Scheme: Is there a ... - Doc error? & other stuff

2008-02-06 Thread Mats Bengtsson

See http://lists.gnu.org/archive/html/bug-lilypond/2006-01/msg00163.html
Now that we recently have renamed some properties and predefined macros
in 2.11.37 and coming 2.11.38, in order to get a more unified naming,
maybe it's time to bring up my old proposal.

However, you are right that there is no \center markup command, so there's
an error in the documentation.

  /Mats

Risto Vääräniemi wrote:

Dear All,

I'm sorry if this arrives twice. My Gmail is behaving a bit strangely
today. This one is improved a bit from the previous one.

On 05/02/2008, Mats Bengtsson wrote:
  

I have already answered that question in my previous email:



Yes you did, thanks. I'm sorry. I just couldn't believe that scheme
could create these new names "by itself". :-)

  

 >see the end of "Markup construction in Scheme".



One thing though ... about the document section you mentioned. It
recommends using make-center-markup. I wonder if that should be
make-center-align-markup? The latter works as well as make-line-markup
and make-column-markup but the make-center-markup doesn't (at least if
used in the example code I posted earlier).

Another thing: I wonder why \right-align is implemented as it is, i.e.
no support for a list of markups. If I create a \column or use
\center-align with multiple strings or markups the texts are printed
"with line feeds". If I use \right-align instead the texts are set on
one line on top of each other. I have to use baseline-skip to get them
properly printed. Is this behaviour needed by some other function or
could it be modified to match \center-align?

Anyway, below you can find the code I cooked up if someone is
interested in it. It was pretty straightforward to use the
\center-align as a template. Thanks again, Mats and Bert.

-Risto

%%%
\version "2.11.37"

#(define-markup-command (right-align layout props args) (markup-list?)
  "Put @code{args} in a centered column."
  (let* ((mols (interpret-markup-list layout props args))
 (cmols (map (lambda (x) (ly:stencil-aligned-to x X RIGHT)) mols)))
(stack-lines -1 0.0 (chain-assoc-get 'baseline-skip props) cmols)))


#(define-markup-command (instruments layout props markups) (markup-list?)
  (interpret-markup layout props
(markup (make-right-align-markup markups) )))

{
\set Staff.instrumentName = \markup \instruments { Soprano Alto }
c'1
}
%%%
  


--
=
Mats Bengtsson
Signal Processing
Signals, Sensors and Systems
Royal Institute of Technology
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: Scheme: Is there a ... - Doc error? & other stuff

2008-02-06 Thread Risto Vääräniemi
Dear All,

I'm sorry if this arrives twice. My Gmail is behaving a bit strangely
today. This one is improved a bit from the previous one.

On 05/02/2008, Mats Bengtsson wrote:
> I have already answered that question in my previous email:

Yes you did, thanks. I'm sorry. I just couldn't believe that scheme
could create these new names "by itself". :-)

>  >see the end of "Markup construction in Scheme".

One thing though ... about the document section you mentioned. It
recommends using make-center-markup. I wonder if that should be
make-center-align-markup? The latter works as well as make-line-markup
and make-column-markup but the make-center-markup doesn't (at least if
used in the example code I posted earlier).

Another thing: I wonder why \right-align is implemented as it is, i.e.
no support for a list of markups. If I create a \column or use
\center-align with multiple strings or markups the texts are printed
"with line feeds". If I use \right-align instead the texts are set on
one line on top of each other. I have to use baseline-skip to get them
properly printed. Is this behaviour needed by some other function or
could it be modified to match \center-align?

Anyway, below you can find the code I cooked up if someone is
interested in it. It was pretty straightforward to use the
\center-align as a template. Thanks again, Mats and Bert.

-Risto

%%%
\version "2.11.37"

#(define-markup-command (right-align layout props args) (markup-list?)
  "Put @code{args} in a centered column."
  (let* ((mols (interpret-markup-list layout props args))
 (cmols (map (lambda (x) (ly:stencil-aligned-to x X RIGHT)) mols)))
(stack-lines -1 0.0 (chain-assoc-get 'baseline-skip props) cmols)))


#(define-markup-command (instruments layout props markups) (markup-list?)
  (interpret-markup layout props
(markup (make-right-align-markup markups) )))

{
\set Staff.instrumentName = \markup \instruments { Soprano Alto }
c'1
}
%%%


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


Re: Scheme: Is there a ... - Doc error?

2008-02-06 Thread Risto Vääräniemi
On 05/02/2008, Mats Bengtsson wrote:
> I have already answered that question in my previous email:

Yes you did, thanks. I'm sorry. I just couldn't believe that scheme
could create these new names "by itself". :-)

>  >see the end of "Markup construction in Scheme".

One thing though ... about the document section you mentioned. It
recommends using make-center-markup. I wonder if that should be
make-center-align-markup? The latter works as well as make-line-markup
and make-column-markup but the make-center-markup doesn't (at least if
used in the example code I posted earlier).

-Risto


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