denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Allow Line/Page Break in Middle of measure


From: Richard Shann
Subject: Re: [Denemo-devel] Allow Line/Page Break in Middle of measure
Date: Thu, 09 Feb 2017 10:08:04 +0000

On Thu, 2017-02-09 at 09:41 +0000, Joe Wilkinson wrote:
> OK

The context for this I'll paste here:

> > Incidentally, in either case, If I scroll forwards from the
> PREVIOUS 
> > note the first directive that is found is the Line Break, followed
> by 
> > the Allow Line/Page Break. Which doesn't make much sense to me.
> 
> I can't get this to happen - it is the behavior you get when the
> x-position of the objects has been calculated wrongly, which used to
> happen a lot when the calculations were a side-effect of drawing the
> staff. But I fixed that a few years back.
> Can you work out exactly how to get it to happen (starting with
> File->New ...)?
> 

So you are stepping forwards from the PREVIOUS note and finding the
order of the objects the reverse of the order of insertion in the
script ...


> Open Denemo
> New
> Add 3 bars of crotchets
> Edit button to use code:
> 
> (d-AllowLineBreak 'non-interactive)
> (d-LineBreak 'non-interactive)
> 
> move to 7th crotchet and press button
> 2 screens (just 2!) about layout and specificity
> 
> What is produced is attached as barBreak.denemo.
> Despite the Line Break being before the AllowLineBreak.... the typeset 
> window shows that the measure is broken halfway through bar 2.

The order of the objects of bar 2 is indeed
1/4 note, 1/4 note, LineBreak directive, AllowLineBreak directive, 1/4
note, 1/4 note.

The reason for that order is that the first line of your script inserts
the AllowLineBreak directive while the cursor is on the third 1/4 note
of the bar, and so it is inserted before the third 1/4 note, then the
second line inserts the LineBreak directive while the cursor is on the
AllowLineBreak directive and so this is inserted before the
AllowLineBreak directive. (Insert is *always* before the object that the
cursor is on, unless the cursor is in the appending position).

As far as LilyPond is concerned the order is immaterial, because both
occur at the same "moment", that is, the same time in the music. The
upshot is that LilyPond typesets a line break after the second and
before the third 1/4 note because it has an invisible barline there and
a request to break the line on that invisible barline.

> 
> Intriguing or just frustrating??

just a consequence of the semantics of "Insert" in Denemo (and text
editors, of course, on which it is modelled). Insert means insert before
the object that the cursor is currently on.

Richard





reply via email to

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