[NTG-context] new upload
Hans Hagen
j.hagen at xs4all.nl
Mon Nov 14 23:02:29 CET 2022
Hi,
I uploaded a new version. New is that we can apply hz to math, although
currently we have configured it as experiment.
\setupbodyfont[pagella]
% \startluacode
% fonts.expansions.vectors.math = {
% [0x002B] = { 4, 0 }, -- +
% [0x2212] = { 4, 0 }, -- -
% [0x003C] = { 8, 0 }, -- <
% [0x003D] = { 8, 0 }, -- =
% [0x003E] = { 8, 0 }, -- >
% [0x002F] = { 2, 0 }, -- /
% [0x0028] = { 2, 0 }, -- (
% [0x0029] = { 2, 0 }, -- )
% [0x005B] = { 2, 0 }, -- [
% [0x005D] = { 2, 0 }, -- ]
% }
% \stopluacode
\setupmathematics[hz=yes]
\startbuffer \showglyphs
\dorecurse{20}{\strut test $x + y/2 - w = 10$ }\unskip
\stopbuffer
\definecolor[tgreen][g=1,t=.5,a=1]
\definecolor[tred] [r=1,t=.5,a=1]
\startTEXpage[offset=5dk]
\startoverlay
{\ruledvbox to 5cm{\setupalign
[tolerant,stretch]\tgreen\getbuffer\vss}}
{\ruledvbox to
5cm{\setupalign[hz,tolerant,stretch]\tred\getbuffer\vss}}
\stopoverlay
\stopTEXpage
\stoptext
Normally an expansion factor is small and used for both stretch and
shrink, but we can have them independendent. So, here we stretch rather
extreme but don't shrink.
\setupmathematics[hz=yes]
only kicks in when we have hz enabled as alignment option. We can of
course configure more 'stretchable symbols' but first we want to know if
it makes sense at all. We can also imagine to disable it in specific cases.
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
-----------------------------------------------------------------
More information about the ntg-context
mailing list