[Top][All Lists]

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

Re: bug with baseline-skip in markup-list-commands?

From: Thomas Morley
Subject: Re: bug with baseline-skip in markup-list-commands?
Date: Thu, 6 Aug 2015 23:08:19 +0200

2015-08-06 7:09 GMT+02:00 David Kastrup <address@hidden>:
> Thomas Morley <address@hidden> writes:
>> Hi,
>> look at the following code (png attached)
>> \version "2.19.24"
>> mrkpI =
>> \markup
>>  {
>>   \override #'(baseline-skip . 10)
>>   \column \box { "xy" "xy" "xy" "xy" }
>>  }
>> mrkpII =
>> \markuplist
>>  {
>>   \override-lines #'(baseline-skip . 10)
>>   \column-lines \box { "xy" "xy" "xy" "xy" }
>>  }
>> \markup \line { \box \mrkpI \box \column \mrkpII }
>> The markup-list-version for baseline-skip adds space even above top
>> and below bottom line.
>> Responsible is 'space-lines' from define-markup-commands.scm.
>> (used in justified-lines, wordwrap-lines, column-lines)
>> Is this really intended?
> I think so.
>> At least the description for column-lines says different:
>> "[...] @code{baseline-skip} determines the space between (sic!) each
>> markup in @var{args}"
>> If not intended (that's what I guess), I'll provide a patch.
> Well, part of the problem is that \column-lines is simply a misleading
> name since the resulting markups are not actually arranged in a column
> or otherwise.  You write \column \mrkpII here, but \line \mrkpII is
> equally valid.  And so is
> \column { \mrkpII \mrkpII }
> So \column-lines clearly serves a need that is not easily provided
> otherwise.  It's not used much in LilyPond's codebase though.  Most use
> appears to be in input/regression/markup-first-visible.ly where the
> proposed behavior would appear to lead to strange results (as
> column-lines is indeed not used for creating a column there).
> I agree that name and documentation are less than helpful, maybe leading
> to its underuse.  Is there a good use case for the proposed behavior as
> well or is this just a matter of code/doc hygiene for you?
> --
> David Kastrup

Hm, I thought a while about all this. Tried this and that, committing
a local patch, etc.
Nothing convinced me so far to even make a general proposal.

At least here some of my thoughts:

The NR 1.8.3 Multi-page markup (a rather short chapter) says:
"Although standard markup objects are not breakable, a specific syntax
makes it possible to enter lines of text that can spread over multiple

But when baseline-skip is increased even the first line of text moves
surprisingly, without any reasonable chance to fix this line at a
certain height, afaik.

Compare how the markup-list-command differs from the markup-command:

\paper { print-page-number = ##f }

%% Only done to save typing
txt =
  #(map symbol->string
      Il y avait en Westphalie, dans le château de M. le baron de
      Thunder-ten-tronckh, un jeune garçon à qui la nature avait donné
      les mœurs les plus douces.  Sa physionomie annonçait son âme.
      Il avait le jugement assez droit, avec l'esprit le plus simple;
      c'est, je crois, pour cette raison qu'on le nommait Candide.  Les
      anciens domestiques de la maison soupçonnaient qu'il était fils
      de la sœur de monsieur le baron et d'un bon et honnête
      gentilhomme du voisinage, que cette demoiselle ne voulut jamais
      épouser parce qu'il n'avait pu prouver que soixante et onze
      quartiers, et que le reste de son arbre généalogique avait été
      perdu par l'injure du temps.))

\markuplist %\box
  \override-lines #'(baseline-skip . 15)
  \justified-lines \txt


\markup %\box
  \override #'(baseline-skip . 15)
  \justify \txt

My first thought not to add additional space to the stencil of the
first line's height would have worked in the example above.
But as soon as the text would continue on a new page (one of the major
features of markup-list-commands from user's point of view) the
problem would reappear there. One would need to know where this
pagebreak is.

Somehow a pagebreaking music-score deals with that, disregarding(?)
any of the users settings of system-system-spacing.
Could similiar be done for pagebreaking markup-list-commands?

Afaik, score-lines is the only markup-list-command without any
reference to baseline-skip.

As a workaround I tried

  \override-lines #'(baseline-skip . 8)
  \column-lines {
    \score-lines { ... }

But why not add 'sort of baseline-skip' in score-lines?

Most markup-list-commands state baseline-skip as a property in their code.
Except for table-of-contents, there it is done via
(chain-assoc-get 'baseline-skip props)
I'd suggest to do this for the other commands as well, because
baseline-skip is here not used the same as in markup-commands. I have
the feeling, it's more a fall-back.
This would reflect it.

Still continuing to think about it,

reply via email to

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