From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@xs4all.nl>
Subject: [NTG-context] update
Date: Wed, 26 Apr 2023 23:55:54 +0200 [thread overview]
Message-ID: <f436d0ec-3268-aa38-a3c3-0eb27fdbc47a@xs4all.nl> (raw)
Hi,
I uploaded a new version with some new features discussed at the end of
this mail.
- A next version of luatex will break context (format making etc) but
the change is unavoidable because of other macro package demands wrt
security (context does that differently). The low level start up command
has been adapted so unless you update indepdently thinsg should work ok.
Of course this has no consequences for lmtx.
- I've done a bit of callback cleanup (like getting rid of some mkiv
luatex left-overs). It should have no effect on regular usage.
- There again a few improvements wrt math (this time dealing with
accents artifacts in some fonts). We check all the free math fonts for
potential issues and then try to fix it (read: deal with it). It's a lot
of work but we're getting there.
- A few reported buglets have been fixed.
- The biggest addition is however a new number model. In metapost one
can now use 'posit' (positfun instance) as number mode which will use
(currently 32 bit but at some point 64 bit) posit unums. It's also bit
of a playground because 32 bit posits are not more accurate than 64 bit
doubles. It anyhow exposed some potential issues that we'll look into.
- There's also a (again currently 32 bit) posit library at the Lua end
as playground.
- However, 32 bit posits come in handy at the tex end because they pack
better accuracy in 32 bits than floats and it makes it possible to have
native floats, so we have:
\newfloat (uses \floatdef, register like \dimendef is used in \newdimen)
\newposit (uses \positdef, like \dimensiondef etc)
\floatexpr (like \numexpr)
\iffloat (like \ifnum) (also \ifabsfloat and i'll add the others too)
Actually it adds an extra range of registers so it bumps memory usage a
bit. I'm considering lowering the number of registers (currently 64K per
category) because after all, if 64K is not enough then we can as well
stick to 32K or 16K (for some even less). There's always Lua for
unlimited storage of quantities.
So,
\newfloat\fooA
\scratchdimen=123.456pt\relax [\type{dim:}
\the\scratchdimen==123.456pt]\par
\fooA =123.456\relax [\type{pos:} \the\fooA
==123.456] \par
\fooA =\scratchdimen\relax [\type{pos:} \the\fooA
==123.456] \par
\scratchdimen=\fooA\relax [\type{dim:}
\the\scratchdimen==123.456pt]\par
\scratchdimen\dimexpr\fooA+10pt\relax[\type{dim:}
\the\scratchdimen==133.456pt]\par
produces
[dim: 123.456pt==123.456pt]
[pos: 123.45600128173828==123.456]
[pos: 123.45599365234375==123.456]
[dim: 123.456pt==123.456pt]
[dim: 133.456pt==133.456pt]
As you can see dimens will get mapped onto floats not as integers
(scaled points) but in pt units. Counts stay numbers. I need to handle
glue too (not yet done).
In the future I might use this for fractions but there might be some
rough ends so for now it's experimental.
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
___________________________________________________________________________________
next reply other threads:[~2023-04-26 21:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-26 21:55 Hans Hagen via ntg-context [this message]
2023-04-26 23:54 ` Jairo A. del Rio via ntg-context
2023-04-27 2:25 ` Rik Kabel via ntg-context
2023-04-27 2:34 ` Jairo A. del Rio via ntg-context
2023-04-27 7:52 ` Hans Hagen via ntg-context
2023-04-27 0:50 ` lynx--- via ntg-context
2023-04-27 1:52 ` Aditya Mahajan via ntg-context
2023-04-27 5:11 ` Max Chernoff via ntg-context
2023-04-27 7:58 ` Hans Hagen via ntg-context
2023-04-27 7:38 ` Hans Hagen via ntg-context
2023-04-27 8:32 ` Max Chernoff via ntg-context
2023-04-27 21:51 ` lynx--- via ntg-context
2023-04-27 23:54 ` Max Chernoff via ntg-context
2023-06-04 17:01 Hans Hagen via ntg-context
2024-01-08 10:36 Hans Hagen via ntg-context
2024-03-11 17:48 Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f436d0ec-3268-aa38-a3c3-0eb27fdbc47a@xs4all.nl \
--to=ntg-context@ntg.nl \
--cc=j.hagen@xs4all.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).