https://codereview.appspot.com/8639045/diff/1/scm/define-markup-commands.scm
File scm/define-markup-commands.scm (left):
https://codereview.appspot.com/8639045/diff/1/scm/define-markup-commands.scm#...
scm/define-markup-commands.scm:4083: (markup #:concat (#:hspace gap
page-markup)))))))
On 2013/04/26 06:56:34, Keith wrote:
> I have not yet figured out how it worked
> correctly in version 2.14
In version 2.14, \hspace sees the current value of 'word-space' effective in the
local construction :
\markup { "Page" \concat {\hspace #0 "3"} "contains"} %0.0
\markup { "Page" {\hspace #0 "3"} "contains"} %0.6
In version 2.14, \hspace cancels the space, either 0 or 0.6, between itself and
"3" so both lines above have the same end-result.
(In version 2.16, \hspace sees the global 'word-space' and corrects for it
whether it locally effective or not, closing the gap in the first line, "Page3
contains".)
Thus the \concat that I am removing has not been needed since version 2.14 or
earlier.
LGTM
On 2013/04/27 05:29:48, Keith wrote:
> https://codereview.appspot.com/8639045/diff/1/scm/define-markup-commands.scm
> File scm/define-markup-commands.scm (left):
>
>
https://codereview.appspot.com/8639045/diff/1/scm/define-markup-commands.scm#...
> scm/define-markup-commands.scm:4083: (markup #:concat (#:hspace gap
> page-markup)))))))
> On 2013/04/26 06:56:34, Keith wrote:
> > I have not yet figured out how it worked
> > correctly in version 2.14
>
> In version 2.14, \hspace sees the current value of 'word-space' effective in
the
> local construction :
> \markup { "Page" \concat {\hspace #0 "3"} "contains"} %0.0
> \markup { "Page" {\hspace #0 "3"} "contains"} %0.6
>
> In version 2.14, \hspace cancels the space, either 0 or 0.6, between itself
and
> "3" so both lines above have the same end-result.
>
> (In version 2.16, \hspace sees the global 'word-space' and corrects for it
> whether it locally effective or not, closing the gap in the first line, "Page3
> contains".)
>
> Thus the \concat that I am removing has not been needed since version 2.14 or
> earlier.
That's not the full story as 2.16 and current 2.17 differ in their treatment of
concat.
Issue 1100 has only been fixed in version 2.17.16. Maybe it is just then that
the problem surfaced?
On 2013/04/27 05:38:12, dak wrote:
> On 2013/04/27 05:29:48, Keith wrote:
> > (In version 2.16, \hspace sees the global 'word-space' and corrects for it
> > whether it locally effective or not, closing the gap in the first line,
"Page3
> > contains".)
> Issue 1100 has only been fixed in version 2.17.16. Maybe it is just then that
> the problem surfaced?
Confirmed. The patch for issue 1100 explicitly passes the outer-scope
'word-space' to any functions inside. That was the moment when \page-ref
started to misplace the page-number.
That patch also means that the \hspace in the first line of
\markup \concat { "A" \hspace #0 "B" "C"}
\markup { "A" \hspace #0 "B" "C"}
thinks it needs to cancel a word-space and will backspace over the A. That
symptom is probably a sign that it was unwise to have \hspace try to correct for
inter-word space.
Avoiding \concat in this function (\page-ref)is still the right thing to do, and
now we know why.
On 2013/04/27 06:14:00, Keith wrote:
> That
> symptom is probably a sign that it was unwise to have \hspace try to correct
for
> inter-word space.
Definitely. Given the amount of trouble we have had with \hspace so far (we
have several alignment problems open in the context of trying to allow \hspace
to backspace) it would seem that it was the wrong approach to implement \hspace
in a "non-special" way as a stencil. Instead, it should send a message to \line
that it wants different spacing. After all, it has no way to know whether it
occurs in the middle of a line or not.
Issue 8639045: Markup, page-ref: do not backspace; issue 3334
(Closed)
Created 11 years ago by Keith
Modified 10 years, 12 months ago
Reviewers: dak
Base URL:
Comments: 2