Hans Hagen j.hagen at xs4all.nl
Fri Apr 15 20:24:07 CEST 2022

Hi,

I uploaded a new lmtx. Apart from a experimental intersection feature in
the mp library (and metafun, more will be revealed when MS an I are okay
with it) there is not that much news.

I decided to turn some test code into a mechanism which is illustrated
below. Adaptive boxes are hboxes that act a bit like glue which means
that when we hook in e.g. a graphic it can be made to adapt.

We can add some more methods if needed so maybe you see other usage. The
interface is rather lightweight and the overhead is quite resonable.

Hans

===================

\starttext

\startMPdefinitions
def TickTock =
interim linecap := squared;
save p ; path p ; p := fullsquare
draw bottomboundary (p enlarged (-AdaptiveThickness) )
withcolor white ;
enddef ;
\stopMPdefinitions

\hss
\startMPcode
TickTock ;
\stopMPcode
\hss
\egroup
\stopsetups

[tick]
foregroundcolor=white,
foregroundstyle=\infofont,
strut=yes]

[tock]
[tick]

% with postprocessing

\dorecurse{5}{
\dostepwiserecurse{1}{150}{1}{%
this~#1.##1 is~#1.##1 test~#1.##1
\ifodd##1\relax
\else
\fi
}
\blank
}

\page

% without postprocessing

\dorecurse{5}{
\dostepwiserecurse{1}{150}{1}{%
this~#1.##1 is~#1.##1 test~#1.##1
test #1.##1\hss}}
}
\blank
}

\page

% with images

% a weird one

\setupexternalfigures
[location={default,global}]

\externalfigure
[cow.pdf]
\egroup
\stopsetups

\dorecurse{5}{
\dostepwiserecurse{1}{150}{1}{%
this~#1.##1 is~#1.##1 test~#1.##1
}
\blank
}

\stoptext

It actually uses an already present for a while low level engine feature
that we introduced as part of the math processing update:

\dorecurse
{1000}

Next on the todo is to move some experimental graphic trickery related
to math (matrices) into the core but the interfacing needs some thought.

Hans

-----------------------------------------------------------------