lilypond-devel
[Top][All Lists]
Advanced

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

Re: extending ly2dvi


From: Werner LEMBERG
Subject: Re: extending ly2dvi
Date: Sun, 11 Aug 2002 01:05:17 +0200 (CEST)

> > Well, here is an example.

BTW, I've sent two versions of my mail.  Only the longer one is the
right one.  Sorry for the confusion.

> > Since you won't add variables to macros, I *have* to use m4 or
> > something similar to avoid extremely unreadable ly files.  Other
> > suggestions how to handle this are highly welcome.
> 
> I can't tell for sure that this is the problem, but it seems that
> your file contains too many things that lily doesn't handle
> well.

Hmm, moving text items around, this is, applying `extra-offset' to
TextScript grobs, will always be necessary.  This is definitely *not*
a problem of lily.

> Focusing on each problem, problem for problem could eliminate
> perhaps 90% of the instructions.  Writing the rest in full is not so
> much a burden then.

I don't think so.  Here is my complete suite of macros I've used for
beautifying a song written by me:

  define([TextVShift],
         [\property Voice.TextScript \set #'extra-offset = #'(0 . $1)])
  TextNoShift = \property Voice.TextScript \revert #'extra-offset
  define([DynamicVShift],
         [\property Voice.DynamicText \set #'extra-offset = #'(0 . $1)])
  DynamicNoShift = \property Voice.DynamicText \revert #'extra-offset

  TextItalic = \property Voice.TextScript \set #'font-shape = #'italic
  TextNormal = \property Voice.TextScript \revert #'font-shape

  LyricLeft = \property Lyrics . LyricText \set #'extra-offset = #'(-1 . 0)
  LyricNormal = \property Lyrics . LyricText \revert #'extra-offset

  HyphenLeft = \property Lyrics . LyricHyphen \set #'extra-offset = #'(-1 . 0)
  HyphenNormal = \property Lyrics . LyricHyphen \revert #'extra-offset

  BeamNotShort = \property Voice.Beam \override #'beamed-stem-shorten = #'(0 
-0.5)
  BeamNormal = \property Voice.Beam \revert #'beamed-stem-shorten

  StemNotShort = \property Voice.Stem \override #'stem-shorten = #'(0 0)
  StemNormal = \property Voice.Stem \revert #'stem-shorten

  define([SustainVShift],
         [\property Staff.SustainPedalLineSpanner \set #'padding = #$1])
  SustainNoShift = \property Staff.SustainPedalLineSpanner \revert #'padding


Only the `xxxLeft' macros (which will disappear as soon as LilyPond
can handle arbitrary TeX strings better) do work around some
deficiencies of lily.


    Werner




reply via email to

[Prev in Thread] Current Thread [Next in Thread]