On Wed, Jan 2, 2013 at 9:43 AM, Olivier Biot <[email protected]> wrote: > On Wed, Jan 2, 2013 at 12:52 PM, Federico Bruni <[email protected]> wrote: >> >> Il 02/01/2013 12:46, David Kastrup ha scritto: >> >>> \markup { >>> \override #'(baseline-skip . 1) >>> \override #'(line-width . 40) >>> \justify { >>> text text text text text text text text text text text text >>> text text text text text text text text text text text text >>> text text text text text text text text text text text text >>> text text text text text text text text text text text text >>> } >>> } >> >> >> That's perfect! > > > There's one limitation though (and it does not feature in the > documentation): baseline-skip will find a compromise between the vertical > extent of text in the lines and the baseline-skip value, the bigger one > being used. This can result in irregular base line distances as illustrated > in the following snippet: > > > \markup { > \override #'(baseline-skip . 1) > \override #'(line-width . 4) \justify { The eee heh . . . . . . x x x x f > f f x x x f f f f f f j f f f f } > } > > Look at the line spacing between the lines with dots, the lines with 'x' or > the 'tallest' lines with 'f' and 'j'. > > You can make baseline-skip yield regular baseline intervals by making it as > big as to avoid these problems. The default value of 3 seems to yield > regular baseline intervals. > > There is probably a way to specify "strict" base line spacings, but I > haven't found it yet. >
To be honest, I don't know much about typographical conventions, so I'm not sure whether the attached file has much utility. Here, I've adapted the definition of `stack-lines' so that you can turn off the compromise mentioned above--namely that the value of baseline-skip is only used if there is no overlap of lines This is done by overriding the property `strict'. I've set it to #f by default (normal spacing) in the adaptation of \column in the file. Strict spacing only has any noticeable effect when lines are close together. The attached example shows how the same column looks (on the left) by default when LilyPond ignores baseline-skip, and with strict spacing. Note that the "p" and "q" are allowed to interleave in the right column. If something like this is useful, the definition of 'stack-lines' might be modified in scm/stencil.scm. Of course, an additional argument would be required in whatever markup-command definition includes that procedure. I haven't tested this extensively to know what if any problems might show up. Best, David
stack-lines-with-options.ly
Description: Binary data
<<attachment: stack-lines-with-options.png>>
_______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
