Markup beyond the final barline

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

Markup beyond the final barline

Urs Liska-3

Hi all, this is more out of curiousity.

Markups can't flow beyond the end of a score (horizontally) and widen the score if necessary:

\version "2.19.82"

{
  c'1 -"This is a long text that widens the score because it can't protrude."
  c'1
}

Is there a possibility to override this behaviour so that the score is just spaced naturally and the markup just goes as long as it needs?

Urs


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

Re: Markup beyond the final barline

Mark Knoop-4
At 08:44 on 15 Mar 2019, Urs Liska wrote:

> Hi all, this is more out of curiousity.
>
> Markups can't flow beyond the end of a score (horizontally) and widen
> the score if necessary:
>
> \version "2.19.82"
>
> {
>    c'1 -"This is a long text that widens the score because it can't protrude."
>    c'1
> }
>
> Is there a possibility to override this behaviour so that the score is
> just spaced naturally and the markup just goes as long as it needs?

Hi Urs, I've achieved this in the past by overriding the final barline stencil, combining it with a spacer markup to push it to the left.

--
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: Markup beyond the final barline

Andrew Bernard
In reply to this post by Urs Liska-3
Hi Urs,

Any good?

\version "2.19.82"

{
  c'1
  -\markup {
    \with-dimensions #'(0 . 0) #'(2 . 0)
    "This is a long text that widens the score because it can't protrude."
  }
}

Andrew


On Fri, 15 Mar 2019 at 19:45, Urs Liska <[hidden email]> wrote:

Hi all, this is more out of curiousity.

Markups can't flow beyond the end of a score (horizontally) and widen the score if necessary:

\version "2.19.82"

{
  c'1 -"This is a long text that widens the score because it can't protrude."
  c'1
}

Is there a possibility to override this behaviour so that the score is just spaced naturally and the markup just goes as long as it needs?

Urs

_______________________________________________
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: Markup beyond the final barline

Urs Liska-3
In reply to this post by Mark Knoop-4
Hi Mark,

Am 15.03.19 um 10:08 schrieb Mark Knoop:

> At 08:44 on 15 Mar 2019, Urs Liska wrote:
>> Hi all, this is more out of curiousity.
>>
>> Markups can't flow beyond the end of a score (horizontally) and widen
>> the score if necessary:
>>
>> \version "2.19.82"
>>
>> {
>>     c'1 -"This is a long text that widens the score because it can't protrude."
>>     c'1
>> }
>>
>> Is there a possibility to override this behaviour so that the score is
>> just spaced naturally and the markup just goes as long as it needs?
> Hi Urs, I've achieved this in the past by overriding the final barline stencil, combining it with a spacer markup to push it to the left.


Hm, I'm afraid this is too specific for my use case. Another workaround
I could imagine would be using \stopStaff and spacer rests after the
final barline. But I'd be interested in a more general solution where
LilyPond would just ingore the markup for the spacing of the score.

Urs


>
> --
> Mark Knoop
>
> _______________________________________________
> 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: Markup beyond the final barline

Urs Liska-3
In reply to this post by Andrew Bernard
Hi Andrew,

Am 15.03.19 um 10:14 schrieb Andrew Bernard:
> \version "2.19.82"
>
> {
>   c'1
>   -\markup {
>     \with-dimensions #'(0 . 0) #'(2 . 0)
>     "This is a long text that widens the score because it can't protrude."
>   }
> }

Perfect! Both from the result and conceptually exactly what I was
looking for.

Best
Urs


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

Re: Markup beyond the final barline

Alexander Kobel-2
In reply to this post by Urs Liska-3
Hi Urs, hi all,

sorry, I accidentally deleted the thread just before some hint came to
my mind, so this is not a "proper" reply.

\with-dimensions came to my mind as well, but it's not without
drawbacks. Somewhat more cumbersome to use, but also *somewhat* more
robust is to use a TextSpanner. (N.B.: for both approaches, apparently
there's no way to check whether the markup runs beyond the line-length
or even the page, and force a line break before the note with the markup
if necessary.) Compare the following approaches:

\version "2.19.82"

{
   c'1-\markup {
     \with-dimensions #'(0 . 0) #'(2 . 0)
     "This is a long text that widens the score because it can't protrude."
   }
   c,1
}

{
   \once \override TextSpanner.style = #'none
   \once \override TextSpanner.bound-details.left.text
     = \markup \upright "This is a long text that widens the score
because it can't protrude."
   c'1_\startTextSpan
   c,1\stopTextSpan
}


As to why a TextSpanner is dealt with differently, and whether a similar
handling is possible for TextScripts too, I don't know (and didn't try
to find out).

\textLengthOff and \override Score.PaperColumn.keep-inside-line = ##f
don't cut it, as you might already know.
I searched for the keep-inside-line, hoping that it would, and found
http://lilypond.org/doc/v2.19/Documentation/notation/writing-text, where
I noticed that the "decresc." in the "Dynamics text spanner prefix"
selected snippet protrudes over the margin.


HTH,
Alex


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

smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Markup wrap at the end of the line

edes
In reply to this post by Urs Liska-3

el 2019-03-15 a las 09:44 Urs Liska escribió:

> Markups can't flow beyond the end of a score (horizontally) and widen
> the score if necessary:
>
> \version "2.19.82"
>
> {
>    c'1 -"This is a long text that widens the score because it can't
> protrude." c'1
> }
>
> Is there a possibility to override this behaviour so that the score is
> just spaced naturally and the markup just goes as long as it needs?


a related but different question: how can i make a markup wrap at the end
of the line?

i have a longish markup on a note (like "poco a poco rallentando blah blah
blah....)" and when it's on the last bar of a line, the measure is
unacceptably stretched.

i think to remember i once saw how to allow breakable markups, but i
either imagined it or it's somewhere i can't find...




--



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

Re: Markup wrap at the end of the line

Andrew Bernard
Hi edes,

Well, if absolute line breaking is not important in your score, you could always put a break in front of the bar with the long text. In terms of engraving, which to me is all about clarity for musicians to read, you don't see many examples of this, as it is indeed hard to read a note then read the next line for rest of the directive and then start the next line. I'd be looking at better ways of laying out. Or you could perhaps just stack the long instruction vertically with several lines in a column. If you are doing this on a page break it would not be good, I think!

Sorry, not the specific answer to your question.

Andrew


On Sun, 17 Mar 2019 at 03:04, edes <[hidden email]> wrote:

a related but different question: how can i make a markup wrap at the end
of the line?


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

Re: Markup wrap at the end of the line

Andrew Bernard
In reply to this post by edes
Hi edes,

Look at LSR 829. This is exactly your case, and what I was saying, The line break is such that the very long text is all on one line. I believe this is the conventional way to handle this.

Andrew



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

Re: Markup wrap at the end of the line

Shevek
In reply to this post by Andrew Bernard
I agree that when a long markup stretches the measure at the end of a line, it suggests that there may be better ways of laying out the line breaks.

Perhaps there should be a penalty for stretched measures due to markup in Lilypond's line breaking algorithm?

Saul

On Sat, Mar 16, 2019, 6:34 PM Andrew Bernard <[hidden email]> wrote:
Hi edes,

Well, if absolute line breaking is not important in your score, you could always put a break in front of the bar with the long text. In terms of engraving, which to me is all about clarity for musicians to read, you don't see many examples of this, as it is indeed hard to read a note then read the next line for rest of the directive and then start the next line. I'd be looking at better ways of laying out. Or you could perhaps just stack the long instruction vertically with several lines in a column. If you are doing this on a page break it would not be good, I think!

Sorry, not the specific answer to your question.

Andrew


On Sun, 17 Mar 2019 at 03:04, edes <[hidden email]> wrote:

a related but different question: how can i make a markup wrap at the end
of the line?

_______________________________________________
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: Markup wrap at the end of the line

edes
In reply to this post by Andrew Bernard

el 2019-03-17 a las 11:33 Andrew Bernard escribió:

> Sorry, not the specific answer to your question.

hi, thank you for your answer, and excuse my delayed response.

leaving aside considerations if what i'm asking for is a good practice or
not, should i understand that there's no way to allow a line break in a
markup?



--



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

Re: Markup wrap at the end of the line

edes
In reply to this post by Shevek

el 2019-03-16 a las 19:23 Saul Tobin escribió:

> I agree that when a long markup stretches the measure at the end of a
> line, it suggests that there may be better ways of laying out the line
> breaks.
>
> Perhaps there should be a penalty for stretched measures due to markup in
> Lilypond's line breaking algorithm?

it seems to me that this should be taken into account, definitely.
specially if everyone agrees in the previous statement.




--


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

Re: Markup wrap at the end of the line

David Kastrup
edes <[hidden email]> writes:

> el 2019-03-16 a las 19:23 Saul Tobin escribió:
>
>> I agree that when a long markup stretches the measure at the end of a
>> line, it suggests that there may be better ways of laying out the line
>> breaks.
>>
>> Perhaps there should be a penalty for stretched measures due to markup in
>> Lilypond's line breaking algorithm?
>
> it seems to me that this should be taken into account, definitely.
> specially if everyone agrees in the previous statement.

Agreement does not buy a whole lot when there is nobody who can or will
do the job.  There are a number of LilyPond subsystems where the
existing expertise is mostly in the hands or rather heads of programmers
who are mostly withdrawn from active development.

I have taken efforts in some regions to restructure code and operation
in manners that have quite a lower barrier to entry (in my opinion) but
of course the short-term effects are such that the main source of
expertise is myself which does not exactly increase the robustness
against resource starvation.

There have also been several refactoring projects by several people who
have used that opportunity as a launch pad into more extensive changes
but the process tends to have drained their energy to a degree where
larger followup projects were not really within the scope of what they
ended up to be able to invest themselves in.

Breaking LilyPond's code more open to manipulation here, in a first step
to C++ programming but ultimately also open to adaptation in Scheme,
would certainly be desirable.

--
David Kastrup

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

Re: Markup wrap at the end of the line

Urs Liska-3
In reply to this post by edes

Am 29.03.19 um 15:19 schrieb edes:
> el 2019-03-17 a las 11:33 Andrew Bernard escribió:
>
>> Sorry, not the specific answer to your question.
> hi, thank you for your answer, and excuse my delayed response.
>
> leaving aside considerations if what i'm asking for is a good practice or
> not, should i understand that there's no way to allow a line break in a
> markup?


Not sure if I'm misunderstanding you, but in

   -\markup "Something long"

there may not be any line break, but there are constructs like

  -\markup \override #(line-width . 20) \wordwrap { This will be wrapped
to some line-width }

will produce line breaks (and there are a few other commands).

HTH
Urs


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

Re: Markup wrap at the end of the line

Urs Liska-3

Am 29.03.19 um 21:01 schrieb Urs Liska:
>  -\markup \override #(line-width . 20) \wordwrap { This will be
> wrapped to some line-width }


Sorry, that must read #'(line-width . 20)


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

Re: Markup wrap at the end of the line

Andrew Bernard
Hi edes and Urs,

I don't think wordwrap is what the OP wanted. Can't you just manually split the long line of text, as per MWE here?

I still think this is a bad engraving choice, especially if it is over a page break. Maybe a footnote would serve better? How long is the text we are talking about?

I won't argue with what people want, but when it is outside the normal paddock on the farm, you generally have to manually adjust this sort of thing.

Andrew

%======
\version "2.19.83"

{
  c''1 c'' c''
  ^\markup \override #'(line-width . 20) \wordwrap {
    This will be wrapped
    to some line-width
  }
  \break
  c'' c'' c''
}

{
  c''1 c'' c''
  ^\markup \override #'(line-width . 20) {
    Lorem ipsum dolor sit amet,
  }
  \break
  c''
  ^\markup \override #'(line-width . 20) {
    consectetur adipiscing elit.
    Ut lacinia enim a mi malesuada,
    vitae aliquam augue porttitor.
  }
  c'' c''
}

%======


On Sat, 30 Mar 2019 at 07:09, Urs Liska <[hidden email]> wrote:

Am 29.03.19 um 21:01 schrieb Urs Liska:
>  -\markup \override #(line-width . 20) \wordwrap { This will be
> wrapped to some line-width }


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

Re: Markup wrap at the end of the line

edes
In reply to this post by David Kastrup

el 2019-03-29 a las 16:20 David Kastrup escribió:

> Agreement does not buy a whole lot when there is nobody who can or will
> do the job.

as someone who has been using free software for about 20 years now, i know
the situation. in fact, lilypond is perhaps the project with the highest
ratio between complexity and resources i know. unfortunately, i'm not a
programmer and i can't contribute myself.

i think, however, that an agreement is a very important first step. at
least, it would be introduced in a TO-DO list. it will be taken care of
when or if there's somebody willing and able to do it.






---


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

Re: Markup wrap at the end of the line

Valentin Villenave-3
On 3/31/19, edes <[hidden email]> wrote:
> as someone who has been using free software for about 20 years now, i know
> the situation. in fact, lilypond is perhaps the project with the highest
> ratio between complexity and resources i know. unfortunately, i'm not a
> programmer and i can't contribute myself.

There are _quite_ a lot of ways in which anyone can contribute without
being a programmer. (Speaking from personal experience.)

Now, the specific problem you’ve stumbled upon happens to be one that
involves some of the trickiest, most specialized parts of LilyPond’s
codebase. However, by taking some trivial stuff out of the plate of
more experienced contributors, you may help give them more time to
tackle complicated issues. At least, that’s how I’ve seen my own
contributions for the past twelve years.

> i think, however, that an agreement is a very important first step. at
> least, it would be introduced in a TO-DO list. it will be taken care of
> when or if there's somebody willing and able to do it.

Well, I think this is what most of us regard as our TODO list:
https://sourceforge.net/p/testlilyissues/issues/search/?q=_type%3AEnhancement+AND+status%3AAccepted

Cheers,
V.

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

Re: Markup wrap at the end of the line

edes
In reply to this post by Andrew Bernard

el 2019-03-30 a las 18:06 Andrew Bernard escribió:

> I don't think wordwrap is what the OP wanted.

you're right, that's not what i was asking.


> I still think this is a bad engraving choice

again, i don't want to discuss this issue. my question was strictly
related to the possibility of doing that in lilypond (i mean, without
having to code myself a complex function in scheme, that is.)

thanks again for your attention.







--




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