On Fri, Jun 23, 2023 at 01:38:23PM +0200, Hans Hagen via ntg-context wrote: > On 6/23/2023 12:43 PM, Carlos via ntg-context wrote: > > On Thu, Jun 22, 2023 at 03:32:25PM +0200, Hans van der Meer via ntg-context > > wrote: > > > \starttext > > > x \rightarrowfill x > > > > > > x \leftarrowfill x > > > > > > hbox to 5cm: > > > > > > y\hbox to5cm{\rightarrowfill}y > > > > > > y\hbox to5cm{\leftarrowfill}y > > > \stoptext > > > > > > But obviously not in an dimensioned \hbox, whereas Knuth's version does > > > that too. > > > > > > > > > > > > > On 22 Jun 2023, at 15:11, Hans Hagen via ntg-context > > > > <ntg-context@ntg.nl> wrote: > > > > > > > > x \rightarrowfill x > > > > > > > > x \leftarrowfill x > > > > > > yours sincerely > > > dr. Hans van der Meer > > > > > >  > > > > I find this interesting. I agree with Hans vdM. > > > > So what would be the acceptable standard given an x length of a glue? > > > > In the above examples, it's all preset. > > > > Is a rule of thumb — no pun intended here — to apply thereafter > > a glue, in this case a \vrule that follows the box and precedes the > > other glue? that is, the \rightarrowfill or \leftarrowfill? > > > > I mean. Once you get the glues messed up, the whole box crumbles. > > 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. 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 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 > > > 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 > > So, one would need to know the preset layout of the page to have an idea > > about it? > > > > Hans H. pulled the old modified trick of 'works here'. > > Well, when used in a paragraph it works indeed. No trick involved. But as it > uses a specific mechanism in an hbox you need to trigger that (unless you > want to add overhead that will kake tex crawl). > > > Like a magician… now all of a sudden evetything works, but unlike TeX's > > Not sure what this refers to. Much of TeX is magick but what is bad about > that? > > > \hbox to 1in{\vrule \rightarrowfill \ 1in \leftarrowfill\vrule} > > > > or > > > > \hbox to 1cm{\vrule \rightarrowfill \ 1cm \leftarrowfill\vrule} > > > > which gives an accurate description, not to mention measurement, > > 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? When I type \hbox to 3cm{\rightarrowfill} without a vrule that's what I would normally expect > > (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. > (2) You can hope that the magick kern is right and that the minus aligns > with the arrows bar. > > (3) You also assume that the math font matches the text font. > > (4) Normally an arrow fill is something math anyway. Where there can also be > something on top or below, or where it can be a top or bottom accent. > > > a > > > > \vbox to 5pt{x\vrule\rightarrowfill \ x \leftarrowfill\vrule\ x} > > > > or > > > > x \rightarrowfill x > > x \leftarrowfill x > > > > or > > > > \vbox to 3pt{x\vrule\rightarrowfill \ \leftarrowfill\vrule\ x} > > > > \ \rightarrowfill \ > > \ \leftarrowfill \ > > > > > > in LMTX doesn't say much > What should it say? You get a space, an arrow and a discarded space. > > That said: I think you miss a few points here: > > (1) I know Hans vd Meer well and he knows ConTeXt well. He's quite capable > of figuring out how to use advanced features and I bet he likes the > following variant of arrows in text. Next time we meet I'll show him some > more adaptive tricks (although I bet he can figure them out himself). > > \starttext > > % \setupexternalfigures > % [location={default,global}] > > % \startsetups adaptive:test > % \setbox\usedadaptivebox\hbox to \usedadaptivewidth yoffset > -\usedadaptivedepth \bgroup > % \externalfigure > % [cow.pdf] > % [width=\usedadaptivewidth, > % height=\dimexpr\usedadaptiveheight+\usedadaptivedepth\relax]% > % \egroup > % \stopsetups > > \startsetups adaptive:test > \setbox\usedadaptivebox\hbox to \usedadaptivewidth yoffset .25ex \bgroup > \startMPcode > drawarrow ((0,0) -- (\the\usedadaptivewidth,0)) randomized > (ExHeight/2); > \stopMPcode > \egroup > \stopsetups > > \dorecurse{5}{ > \dostepwiserecurse{1}{150}{1}{% > this~#1.##1 is~#1.##1 test~#1.##1 > {\adaptivebox[strut=yes,setups=adaptive:test]{\strut}} > } > \blank > } > > \stoptext > > (2) If someone wants a plain (or fot that matter latex) solution then one > can use these macro packages or write a macro that mimicks expectations. > > (3) I don't like "Hans H. pulled the old modified trick of 'works here'." > kind of remarks because they have a rather negative undertone and I don't > know how to read that. > 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. No need to re-invent the wheel. (if there's undertone in that so be it) 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 : ntg-context@ntg.nl / > 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 > ___________________________________________________________________________________ -- CChheecckk yyoouurr dduupplleexx sswwiittcchh.. ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___________________________________________________________________________________