Re: within \markup, how to \translate by width of another markup?

2022-05-17 Thread Werner LEMBERG
>> AFAICS, we are back to square one, needing the possibility to >> `\translate` something by the width of another markup. I will cook >> something up and see how well it works. > > > Probably > > ``` > \version "2.22.2" > > #(define-markup-command (translate-by-extent-of layout props axis

Re: within \markup, how to \translate by width of another markup?

2022-05-17 Thread Jean Abou Samra
Le 17/05/2022 à 07:49, Werner LEMBERG a écrit : Sth like \markup \box \number \column \with-dimensions-from \right-align "0" \right-align { 11 10 6 5 4 3 2 1 } While this is an ingenious solution – thanks! – it doesn't fit my needs, alas, since two-digit numbers stick out to the left of the

Re: within \markup, how to \translate by width of another markup?

2022-05-17 Thread Werner LEMBERG
> Sth like > > \markup \box \number \column \with-dimensions-from \right-align "0" > \right-align { 11 10 6 5 4 3 2 1 } While this is an ingenious solution – thanks! – it doesn't fit my needs, alas, since two-digit numbers stick out to the left of the box. This is exacerbated by the fact that

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread David Kastrup
Werner LEMBERG writes: >>> * Single-digit numbers are left-aligned. >> >> Why? They have equal width. Do you rather mean that the reference >> point is supposed to be on the left edge? > > Yes. Sorry for the sloppy wording. > >> What is the alignment supposed to be if there are _only_

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread Werner LEMBERG
>> * Single-digit numbers are left-aligned. > > Why? They have equal width. Do you rather mean that the reference > point is supposed to be on the left edge? Yes. Sorry for the sloppy wording. > What is the alignment supposed to be if there are _only_ two-digit > numbers? This situation

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread David Kastrup
Werner LEMBERG writes: >> Again, I have no idea what you are trying to achieve here and how >> kerning has anything to do with it. > > OK. Next try. > > Here are the assumptions. > > * Numbers 0, 1, 2, ..., 9 all have a width of 100 units. > > * Number 10, however, has a kerning of -50 units

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread Werner LEMBERG
> Again, I have no idea what you are trying to achieve here and how > kerning has anything to do with it. OK. Next try. Here are the assumptions. * Numbers 0, 1, 2, ..., 9 all have a width of 100 units. * Number 10, however, has a kerning of -50 units between digits 0 and 1, making a total

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread David Kastrup
Werner LEMBERG writes: > The problem at hand is stacking fixed-width single-digit and > two-digit numbers. Single-digit numbers should be left-aligned > for various reasons: > > ``` > 9 > 8 > 7 > ``` > > If there is a two-digit number, it should

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread David Kastrup
Werner LEMBERG writes: >> How about >> >> \markup \typewriter \column { 9 \general-align #X #CENTER 10 } > > Nope, this doesn't align properly – see my answer to David's e-mail > for a longer explanation. A longer explanation for my \right-column proposal hasn't arrived. Maybe it ended up in

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread Jean Abou Samra
Le 16/05/2022 à 18:58, Werner LEMBERG a écrit : How about \markup \typewriter \column { 9 \general-align #X #CENTER 10 } Nope, this doesn't align properly – see my answer to David's e-mail for a longer explanation. Please clarify. I see the digit '9' being left-aligned on the origin and the

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread David Kastrup
Werner LEMBERG writes: >>> The problem at hand is stacking fixed-width single-digit and >>> two-digit numbers. Single-digit numbers should be left-aligned for >>> various reasons: >>> >>> ``` >>> 9 >>> 8 >>> 7 >>> ``` >>> >>> If there is a two-digit number, it should be right-aligned at

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread Werner LEMBERG
The problem at hand is stacking fixed-width single-digit and two-digit numbers. Single-digit numbers should be left-aligned for various reasons: ``` 9 8 7 ``` If there is a two-digit number, it should be right-aligned at the

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread Werner LEMBERG
> How about > > \markup \typewriter \column { 9 \general-align #X #CENTER 10 } Nope, this doesn't align properly – see my answer to David's e-mail for a longer explanation. Werner

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread Jean Abou Samra
Le 16/05/2022 à 15:45, Werner LEMBERG a écrit : Within a markup, I want to `\translate` an object by the x-extent of another markup. How can I do that? While we have `\with-dimensions` and friends to adjust the size of an object, it seems to me that we don't have something similar for

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread Werner LEMBERG
>> The problem at hand is stacking fixed-width single-digit and >> two-digit numbers. Single-digit numbers should be left-aligned for >> various reasons: >> >> ``` >> 9 >> 8 >> 7 >> ``` >> >> If there is a two-digit number, it should be right-aligned at the >> right edge of the left-aligned

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread David Kastrup
Werner LEMBERG writes: >>> Within a markup, I want to `\translate` an object by the x-extent >>> of another markup. How can I do that? >>> > >>> While we have `\with-dimensions` and friends to adjust the size of >>> an object, it seems to me that we don't have something similar for >>>

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread Werner LEMBERG
>> Within a markup, I want to `\translate` an object by the x-extent >> of another markup. How can I do that? >> >> While we have `\with-dimensions` and friends to adjust the size of >> an object, it seems to me that we don't have something similar for >> offsets... Would it be necessary to

Re: within \markup, how to \translate by width of another markup?

2022-05-16 Thread David Kastrup
Werner LEMBERG writes: > Within a markup, I want to `\translate` an object by the x-extent of > another markup. How can I do that? > > While we have `\with-dimensions` and friends to adjust the size of an > object, it seems to me that we don't have something similar for > offsets... Would it

within \markup, how to \translate by width of another markup?

2022-05-16 Thread Werner LEMBERG
Within a markup, I want to `\translate` an object by the x-extent of another markup. How can I do that? While we have `\with-dimensions` and friends to adjust the size of an object, it seems to me that we don't have something similar for offsets... Would it be necessary to define