Use of \vspace and \hspace

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

Use of \vspace and \hspace

Mr Tim
I am really confused on where I can and cannot use the \vspace and \hspace.  I've seen them inside \column expressions, is that the only place they can be?  Reading the documentation does not help me at all.  So I see it inside \markup { }.  Well, then where can I put \markup?  If markup has to be inside something else, where can I put that something else.  I guess the problem is that every where I try to use \vspace it's an error and the examples in the docs do not help at all.  Can I put them between \score {} expressions?  Apparently not, unless I am missing something else.  Can I put them inside a \score {} at the beginning, again, apparently not unless I am missing something else.  I just really want to understand how this thing works so I can generally use it in my files.


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

Re: Use of \vspace and \hspace

David Kastrup
Mr Tim <[hidden email]> writes:

> I am really confused on where I can and cannot use the \vspace and
> \hspace.

They are markup commands.  They can only appear inside of markup and
markup lists.

--
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: Use of \vspace and \hspace

Mr Tim
Yes, but I don't understand where I can use \markup blocks.  I go to the docs at http://lilypond.org/doc/v2.19/Documentation/notation/formatting-text and it tells me about what can go inside, but does not tell me in what context \markup can be used.


On Sat, Jan 19, 2019 at 10:22 AM David Kastrup <[hidden email]> wrote:
Mr Tim <[hidden email]> writes:

> I am really confused on where I can and cannot use the \vspace and
> \hspace.

They are markup commands.  They can only appear inside of markup and
markup lists.

--
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: Use of \vspace and \hspace

Valentin Villenave-3
On 1/19/19, Mr Tim <[hidden email]> wrote:
> I go to the docs at
> http://lilypond.org/doc/v2.19/Documentation/notation/formatting-text
> and it tells me about what can go inside, but does not tell me in what
> context \markup can be used.

That’s the previous subsection:
http://lilypond.org/doc/v2.19/Documentation/notation/writing-text

You can use a \markup block in any TextScript object (attached to
notes with -, ^ or _), any \mark or at the top level, outside of any
\score block.

\markup may also (obviously) be user in any definition inside the
\header block (e.g. title, subtitle, composer, and so on).

\header {
  title = \markup { \bold This is a \hspace #4 markup. }
}

\markup \fill-line { "" "And this." ""}

\score {
  \new Staff {
    b1_"Also, this."
    \mark \markup \italic "And this as well."
    b
  }
}

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: Use of \vspace and \hspace

Aaron Hill
On 2019-01-19 8:55 am, Valentin Villenave wrote:
> You can use a \markup block in any TextScript object (attached to
> notes with -, ^ or _), any \mark or at the top level, outside of any
> \score block.
>
> \markup may also (obviously) be user in any definition inside the
> \header block (e.g. title, subtitle, composer, and so on).

\markup may additionally be used for lyrics, in chord names, and as
dynamics.  In fact, it is possible to use \markup to customize the
appearance of virtually any object:

%%%%
\version "2.19.82"
\paper { line-width = 8\cm }
\header { title = \markup "Header" }
\markup "Top-level markup"
dyn = #(make-dynamic-script #{ \markup \text "DynamicText" #})
\score { <<
   \new ChordNames
     \with { majorSevenSymbol = \markup "majorSevenSymbol" }
     \chordmode { c1:maj7 }
   \new Staff
     { \mark \markup "RehearsalMark"
       \once \override NoteHead.stencil = #ly:text-interface::print
       \once \override NoteHead.text = \markup \lower #0.5 "NoteHead"
       c''8^\markup "TextScript" }
   \new Lyrics \lyricmode { \markup "LyricText" 1 }
   \new Dynamics { s1\dyn } >> }
%%%%

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

markup.cropped.png (43K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Use of \vspace and \hspace

Valentin Villenave-3
On 1/20/19, Aaron Hill <[hidden email]> wrote:
> \markup may additionally be used for lyrics, in chord names, and as
> dynamics.  In fact, it is possible to use \markup to customize the
> appearance of virtually any object:

Well put! I’ve added a few additional objects and turned it into a snippet:
http://lsr.di.unimi.it/LSR/Item?id=1084

This could be a nice addition to the NR itself (not sure exactly
where, but I’ll have to look into it).

V.

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

Re[2]: Use of \vspace and \hspace

Trevor Daniels

Hi Valentin, you wrote

>Well put! I’ve added a few additional objects and turned it into a snippet:
>http://lsr.di.unimi.it/LSR/Item?id=1084
>
>This could be a nice addition to the NR itself (not sure exactly
>where, but I’ll have to look into it)
"Text markup introduction" in Section 1.8.2 looks like the obvious
place.

Trevor
ps Nice to see you active on LilyPond again!


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

Re: Use of \vspace and \hspace

Andrew Bernard
In reply to this post by Valentin Villenave-3
Hi Valentin,

I was led to muse just today that almost all the recent questions on lilypond are about spacing and tweaking positions of some sort or other. [Well, I suppose you could argie that engraving is only about spacing objects and nothing else anyway!] With no disrespect to any documentation developers, this does seem to be a major stumbling block for people, including me, and I am using lilypond professionally for years. I recently referred in a post to the Missing Manual for Lilypond. This topic would be a good choice for the main contents of such a doc. I'd volunteer to write but but although an experienced user, I just lack something fundamental understanding lilypond internals that leaves me permanently flummoxed. For example, when to use extra-spacing-width, which always eludes me until I post to the list.

Horizontal spacing perpetually bugs me. I need to do very strict proportional spacing to set New Complexity School scores for the composer I engrave for, and it never works satisfactorily, and seems hit and miss at the best of times. Lilypond does a beautiful job of heuristically laying things out but when you want to constrain it, for example, to make bars exactly 3cm wide, it just does not respond. I'd like to see a really good explanation of that topic, and spacing sections, which have _never_ been able to get to work.I use the latest dev. versions at all times. Currently I am hitting issues where the notes at the end of lines smash up too hard against the barline, and understanding why that is so is beyond me, let alone how you work out how to address this.

Just my A$0.02 worth.

Andrew




On Sun, 20 Jan 2019 at 22:11, Valentin Villenave <[hidden email]> wrote:
On 1/20/19, Aaron Hill <[hidden email]> wrote:
> \markup may additionally be used for lyrics, in chord names, and as
> dynamics.  In fact, it is possible to use \markup to customize the
> appearance of virtually any object:

Well put! I’ve added a few additional objects and turned it into a snippet:
http://lsr.di.unimi.it/LSR/Item?id=1084

This could be a nice addition to the NR itself (not sure exactly
where, but I’ll have to look into it).

V.

_______________________________________________
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: Re[2]: Use of \vspace and \hspace

Valentin Villenave-3
In reply to this post by Trevor Daniels
On 1/20/19, Trevor <[hidden email]> wrote:
> "Text markup introduction" in Section 1.8.2 looks like the obvious
> place.

Well, not exactly. As the introduction to "Formatting text", it
describes what markup mode is, but not _where_ or _why_ markup blocks
exist. (Hence the OP’s question.)
That separate question should ideally be dealt with in 1.8.1 (at
least, that was the idea; you may remember that I was the one who
rewrote this whole chapter in 2008, when the User Manual became the
Notation Reference thanks to Graham :-)

This snippet could, for example, appear at the top of 1.8.1, right
before we delve into the specifics of "Text scripts", "Text marks" and
so on. However, just before that (one level higher), I added the
following sentence at the time:
"""
Some text elements that are not dealt with here are discussed in other
specific sections: Vocal music, Titles and headers.
"""
So you see my predicament: I’d have to move this sentence (or remove
it entirely), and possibly add a new ununmberedsubsection at the top
of 1.8.1. Would it make sense to you?

> ps Nice to see you active on LilyPond again!

It does feel great to be exchanging you (and everybody) again! That
being said, I never entirely left: I’ve still been using LilyPond
everyday, but I was busy working on other projects, with the group of
composers I’m in charge of, see for example
http://oumupo.org/~vvillenave/2017/paper/article.pdf

V.

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

Re: Use of \vspace and \hspace

Valentin Villenave-3
In reply to this post by Andrew Bernard
On 1/20/19, Andrew Bernard <[hidden email]> wrote:
> although an experienced user, I just lack something fundamental
> understanding lilypond internals that leaves me permanently flummoxed. For
> example, when to use extra-spacing-width, which always eludes me until I
> post to the list.

I can relate. But I’m generally happy enough with LilyPond’s default
output so that I don’t try and mess with it. Proportional spacing does
qualify, IMO, as advanced use and therefore a documentation that is a
bit more sparse or harder to grasp is not unexpected when it comes to
that sort of things.

With that in mind, please add me to the list of people you may send
stuff to outside of the list if you need specific advice on a
particular piece of code that you’re reluctant (or unauthorized) to
share publicly! I could also possibly give you some addresses of other
LilyPond-reliant composers that do very complex stuff (my own music
looks absurdly simple in comparison, by which I mean intended for mere
mortals :-)

> I'd like to see a really good
> explanation of that topic, and spacing sections, which have _never_ been
> able to get to work.

Well, NR 4.5 is quite a bit technical but I do manage to understand
what it says and find it (at least a bit) helpful. But if you’re using
proportional notation and strict note spacing, there tends to come a
moment where all bets are off and you may find yourself with either
very ugly or heavily hand-corrected pages. At least that’s what my
experience has been so far (and why I’ve mostly stopped trying to
compete with Lily’s own logic).

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[4]: Use of \vspace and \hspace

Trevor Daniels
In reply to this post by Valentin Villenave-3


Valentin, you wrote 20/01/2019 18:12:07

>On 1/20/19, Trevor <[hidden email]> wrote:
>>  "Text markup introduction" in Section 1.8.2 looks like the obvious
>>  place.
>
>Well, not exactly. As the introduction to "Formatting text", it
>describes what markup mode is, but not _where_ or _why_ markup blocks
>exist. (Hence the OP’s question.)
>That separate question should ideally be dealt with in 1.8.1 (at
>least, that was the idea; you may remember that I was the one who
>rewrote this whole chapter in 2008, when the User Manual became the
>Notation Reference thanks to Graham :-)
>
>This snippet could, for example, appear at the top of 1.8.1, right
>before we delve into the specifics of "Text scripts", "Text marks" and
>so on. However, just before that (one level higher), I added the
>following sentence at the time:
>"""
>Some text elements that are not dealt with here are discussed in other
>specific sections: Vocal music, Titles and headers.
>"""
>So you see my predicament: I’d have to move this sentence (or remove
>it entirely), and possibly add a new ununmberedsubsection at the top
>of 1.8.1. Would it make sense to you?
You're right; because \markup can be used in so many different places
and ways a new unnumberedsubsection devoted to it is probably the
best way to give an overview. Specific examples can then appear anywhere
else in the manual, like it does in the snippet in "Separate text" (one
of
mine, I think :)

Trevor


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

Re: Re[4]: Use of \vspace and \hspace

Valentin Villenave-3
On 1/20/19, Trevor <[hidden email]> wrote:
> You're right; because \markup can be used in so many different places
> and ways a new unnumberedsubsection devoted to it is probably the
> best way to give an overview. Specific examples can then appear anywhere
> else in the manual, like it does in the snippet in "Separate text" (one
> of
> mine, I think :)

Yep, the liturgy does look like something of yours… but I’m positive
that Macbeth’s mine! :-D

Anyhoo. Here’s my proposal, comments welcome:
https://sourceforge.net/p/testlilyissues/issues/5465/

V.

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

Re: Use of \vspace and \hspace

Trevor Bača-2
In reply to this post by Andrew Bernard
Hi Andrew (and hi Valentin, nice to see you on the list again!),

I'm with you in the animating spirit of your observations about spacing (especially horizontal spacing). Proportional spacing (which I helped Han-Wen scope when he implemented it more than a decade ago) is very powerful indeed. But I've engraved every single one of my scores (lots of tuplets and rhythmic processes of all sorts going on, though I don't claim a complexist mantle) in Lily for 13 years now, and reaching *full mastery* of horizontal spacing in Lily still eludes me ... though I hasten to add that my ability to control spacing of all types in Lily continues to improve year over year, and the resulting layout of the scores continues to improve quite significantly as a result. And I would never attempt what I do now in my own music in other engraving package.

Sometime soon I'd like to find the time to summarize some of what I've learned about Lily's spacing (and also what still eludes me, which is rather a bit), but it's a daunting task. In the meantime I want to point to a bug that I've needed to report to the -bug list for sometime now (will open formally on -bug soon) and which might help explain some of what you've experienced with spacing sections:

While I can't vouch for the complete set of behaviors that you get when you use \newSpacingSection, using the command *does largely seem to work* for me as a way of laying out rhythmically complex music. The basic idea (which I'm sure you know, and have probably tried in your engraving of complexist scores) is: call \newSpacingSection at the beginning of a bar (otherwise Lily will ignore the command); and at that same moment, reset propotionalNotationDuration to best match the contents (rhythmic density, primarily) of the measure at hand. It was a years-long evolution getting there, but I now do this *to every measure* in all my scores, and it seems to be the best first-order strategy for optimizing spacing. (Why "first-order"? Because there are still always a million-and-one second- and third-order steps involving turning off the horizontal widths of items, which is pretty much exactly what you were pointing to earlier in this thread.)

The outstanding bug, though, is this: Lily systematically overstretches the horizontal width of system-final measures that carry a \newSpacingSection at their start! The factor of over-stretching (by eye-balling) is very close to 35/24. Meaning that the last measure of any system that you spacing-control in the way I've described here (with \newSpacingSection and proportionalNotationDuration) will be almost exactly 35/24 *longer* than what you've specified. It's a truly unique behavior (bug) in Lily; nothing else in the system seems to work quite this way.

The workaround is, of course, that scale your proportionalNotationDuration by the reciprocal of the overstretching, ie, 24/35.

Later on a much fuller discussion (and *documentation*) of the entire collection of spacing concerns would be truly useful. Hope this small breadcrumb might be useful for you in the nearterm.

Trevor.




On Sun, Jan 20, 2019 at 7:32 AM Andrew Bernard <[hidden email]> wrote:
Hi Valentin,

I was led to muse just today that almost all the recent questions on lilypond are about spacing and tweaking positions of some sort or other. [Well, I suppose you could argie that engraving is only about spacing objects and nothing else anyway!] With no disrespect to any documentation developers, this does seem to be a major stumbling block for people, including me, and I am using lilypond professionally for years. I recently referred in a post to the Missing Manual for Lilypond. This topic would be a good choice for the main contents of such a doc. I'd volunteer to write but but although an experienced user, I just lack something fundamental understanding lilypond internals that leaves me permanently flummoxed. For example, when to use extra-spacing-width, which always eludes me until I post to the list.

Horizontal spacing perpetually bugs me. I need to do very strict proportional spacing to set New Complexity School scores for the composer I engrave for, and it never works satisfactorily, and seems hit and miss at the best of times. Lilypond does a beautiful job of heuristically laying things out but when you want to constrain it, for example, to make bars exactly 3cm wide, it just does not respond. I'd like to see a really good explanation of that topic, and spacing sections, which have _never_ been able to get to work.I use the latest dev. versions at all times. Currently I am hitting issues where the notes at the end of lines smash up too hard against the barline, and understanding why that is so is beyond me, let alone how you work out how to address this.

Just my A$0.02 worth.

Andrew




On Sun, 20 Jan 2019 at 22:11, Valentin Villenave <[hidden email]> wrote:
On 1/20/19, Aaron Hill <[hidden email]> wrote:
> \markup may additionally be used for lyrics, in chord names, and as
> dynamics.  In fact, it is possible to use \markup to customize the
> appearance of virtually any object:

Well put! I’ve added a few additional objects and turned it into a snippet:
http://lsr.di.unimi.it/LSR/Item?id=1084

This could be a nice addition to the NR itself (not sure exactly
where, but I’ll have to look into it).

V.

_______________________________________________
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


--

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