On 6/23/2023 3:21 PM, Carlos via ntg-context wrote:
I'm not sure how you can mess up glue so that the box is no longer a box.
Boxes remain boxes.
I guess that's the same mentality behind a fixed glue in LMTX, while
trying not to mess up the box. Back to point A and the main reason of the
op's question.
I have no clue what "the same mentality behind a fixed glue in LMTX"
means here. It's not like LMTX has a mentality of its own, after all
it's not an AI (fwiw). Here we use \uleaders that have some
feedback-after-typesetting loopback. Eventually I might add some extra
callback features but only when it has no impact on performance. For now
it's experimental.
That said, I wonder how many users can predict the plainish tex result of:
\ruledhbox to 2in{\vrule \rightarrowfill \ 1cm \leftarrowfill\vrule}
\ruledhbox to 1cm{\vrule \rightarrowfill \ 1cm \leftarrowfill\vrule}
Which then makes an argument for
% \permanent\protected\def\adaptive
% {\dowithnextbox{\adaptivecheckbox\nextbox\box\nextbox}}
\adaptive\ruledhbox to 2in{\vrule \rightarrowfill \ 1cm
\leftarrowfill\vrule}
\adaptive\ruledhbox to 1cm{\vrule \rightarrowfill \ 1cm
\leftarrowfill\vrule}
doing its thing. Anyway, it is a not using "math arrows in text" that
determines the functionality but "math arrows in math" that does (and in
that respect we're driven by demands from power math users like Alan and
Mikael); so. we're more focussed on shapes and proper rendering; these
fillers in text are sort of special
Then again, the only way to resemble what TeX does is by re/defining
and copied verbatim from The TeXbook both rightarrowfill and
leftarrowfill
and hope for the best
and unlike with TeX in which an
\hbox to 1in{\vrule \rightarrowfill \ 1cm \leftarrowfill\vrule}
it says 1cm but it'd be more than that, and accurately so
Well, plain tex says:
\def\rightarrowfill{$\m@th\smash-\mkern-7mu%
\cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill
\mkern-7mu\mathord\rightarrow$}
so, you get a smashed minus, some backtracking (a kern, not a glue),
then optional leaders, and finally an overlayed arrowhead
and you then cross your fingers that the minus sits on the same axis as
the arrowhead because this is pretty much a cmr bound definition (and
there are math fonts out there that don't fit this definition, although
we got some fixes in the meantime)
in lmtx (using luametatex) we use \Uhextensible instead which build from
an opentype extensible
(which makes me wonder: do users really expect all \macros in plain,
latex and context do to the same? i bet not because \end in latex is
definitely something else than \end in plain)
How good would \meaning be here, notwithstanding the valuable info of
the macro it provides, if it can't print out, let alone source it up,
the more accurate dimension, let alone the measurement.
I don't follow. Does this come from ChapGPT?
That's funny.
But as chatgpt says:
"Sorry about that. \meaning\rightarrowfill is
\begingroup \scratchunicode 8594\relax \adaptivebox [mathfiller][alterna
tive=8594]{\hss \strut \hss }\endgroup "
That's what lmtx returned after Hans vdM sample
Nothing wrong with that, but in the meantime that can be
\permanent\protected\def\mathfiller#1%
{\adaptivebox[mathfiller][\c!alternative=#1]{\hss\strut\hss}}
because we don't need the scratch code (was used when we played with
it), so a next version wil say:
\meaningfull\rightarrowfill
or:
frozen instance macro:\mathfiller {8594}
or more texie
\meaningasis\rightarrowfill
like:
\frozen \instance \def \rightarrowfill \mathfiller {8594}
It depends on what you expect. First of all, your assumption that the arrow
fill is the same as in plain tex is wrong.
Why would it be wrong?
because context is not plain
When I type
\hbox to 3cm{\rightarrowfill} without a vrule
that's what I would normally expect
as plain user maybe
(1) one can define an arrow fill using a leader that uses some (happen to be
present in tex math fonts) glyphs: repeated minuses followed by some magic
kern and an arrow head.
Can you apply it to pagination without breaking?
Highly doubt it.
you seem to know the plain definition so ... leaders don't break
No. I didn't mean anything by it. Just that I disagree with the
implementation. Again, I expect what TeX returns rather than what LMTX
returns.
well, using an arrow fill in running text is rare but who knows how
uleaders evolve (after users start using it)
No need to re-invent the wheel. (if there's undertone in that so be it)
if so, so use plain
And of course it's working! Everything works, right? And that's exactly what
I meant.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________