|
From: | Aaron Hill |
Subject: | Re: paper spacing variables not being respected for a score inside markup |
Date: | Sat, 09 Jun 2018 18:58:52 -0700 |
User-agent: | Roundcube Webmail/1.3.6 |
On 2018-06-09 18:11, Jason Pratt wrote:
On Sat, Jun 9, 2018 at 5:21 AM Thomas Morley <address@hidden> wrote:> I'm doing some chords+lyrics song sheets, and trying to achieve a two > column layout. If all you want is to write chords+lyrics, LilyPond may not be the best tool for this purpose.I tried to keep my example simple. The real sheets will also include things like fret diagrams and tabs of riffs, which lilypond is useful for.
Another thing to consider is to use LilyPond to typeset individual elements and then compose them within a larger document. `lilypond-book` will let you mix TeX and LilyPond, for instance, if you want a lot of control over the layout.
> From what I've read, the way to accomplish this is by > putting scores within a markup block. > > This works to get the two columns, but as soon as I do it, the \paper > variables that are controlling the vertical spacing seem to be > ignored. As soon as you put a score in a markup, you are in markup-mode. Vertical spacing of multi-line-markups is controlled by 'baseline-skip and in general not by paper-settings. \score in \markup is a markup-command, internally calling the markup-list-command \score-lines, which outputs a list of stencils (here each stencil contains one line of chords/lyrics). They are stacked vertically by \score using 'baseline-skip. So all as expected, no bug.When I include \override #'(baseline-skip . 0.5) inside the markup block, only the space between the lyrics and the next chord line is reduced. The space between the chords and the lyrics above them is still very large. Is there some other way to reduce the space between the two systems? Can you make it so that the scores inside the columns of my simple example have the same spacing as the score above?
This is `nonstaff-nonstaff-spacing` that you want to control, since you are talking about things within a single system. Here is a modified version of your original code that should achieve what you want:
%%%% \version "2.18.2" chordNames = \chordmode { c1 f g a:m \break c f g:7 c \break } words = \lyricmode { \override LyricText.self-alignment-X = #LEFT Here_are some random lyrics These are more lyrics } \paper { #(set-paper-size "a6landscape") tagline = ##f indent = #0 ragged-right = ##t system-system-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 2) (stretchability . 0)) } common-layout = \layout { \context { \ChordNames \override VerticalAxisGroup.nonstaff-nonstaff-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 1) (stretchability . 0)) } \context { \Lyrics \override VerticalAxisGroup.staff-affinity = #DOWN } } \score { << \new ChordNames \chordNames \new Lyrics \words >> \layout { \common-layout } } \markup { \override #'(baseline-skip . 2) { \vspace #3 \score { << \new ChordNames \chordNames \new Lyrics \words >> \layout { \common-layout } } \hspace #8 \score { << \new ChordNames \chordNames \new Lyrics \words >> \layout { \common-layout } } } } %%%%Note that I included the fix for the affinity warning, since lyrics by default have an UP affinity whereas chords are DOWN. Also, I changed the alignment of lyrics to LEFT to match the default for chord, so it is clearer when chord changes align with words. But that is more of a personal preference.
P.S. As advised earlier, we should really move any more non-bug discussion to lilypond-user.
-- Aaron Hill
[Prev in Thread] | Current Thread | [Next in Thread] |