From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: sunny friday afternoon update
Date: Fri, 8 May 2020 13:47:55 +0200 [thread overview]
Message-ID: <7f3608d1-37f2-0d3c-076b-a7133ac3aa2f@xs4all.nl> (raw)
Hi,
I uploaded a new version of lmtx and there are some experimental
features that users cna play with so that we can think about related
interfacing. (I won't mention soem in the lua department that I'm still
exploring myself.)
When you use a math symbol its class property determines the spacing.
One can use \mathopen etc to wrap such a character an dmake it behave
different. There is a new mechanism to overload that property in a
different way:
\startlines
$x\mathopen {!}+123+\mathclose {!}x$
$x\tomathopen ! +123+\tomathclose ! x$
$x\mathclose {!}+123+\mathopen {!}x$
$x\tomathclose ! +123+\tomathopen ! x$
$x ! +123+ ! x$
\stoplines
It uses a low level primitive, for the open case: \Umathclass 4 with the
number being the desired class.
A more experimental features concerns native prescripts. Consider the
following input
\blank \hbox{$
{\tf X}^1_2^^3__4 \quad
{\tf X}^1 ^^3 \quad
{\tf X} _1 __4 \quad
{\tf X} ^^3 \quad
{\tf X} __4 \quad
{\tf X}^^3 __4
$} \blank
or with the control sequence variants:
\blank \hbox{
\ruledhbox{${\tf X}\Usuperscript{a}
$}
\ruledhbox{${\tf X} \Usubscript{b}
$}
\ruledhbox{${\tf X}\Usuperscript{a}\Usubscript{b}
$}
\ruledhbox{${\tf X}\Usuperscript{a} \Usuperprescript{c}
$}
\ruledhbox{${\tf X} \Usubscript{b}
\Usubprescript{d}$}
\ruledhbox{${\tf
X}\Usuperscript{a}\Usubscript{b}\Usuperprescript{c}\Usubprescript{d}$}
\ruledhbox{${\tf X} \Usuperprescript{c}
$}
\ruledhbox{${\tf X}
\Usubprescript{d}$}
\ruledhbox{${\tf X}
\Usuperprescript{c}\Usubprescript{d}$}
}
\blank
A few days ago there was a discussion about tweaking some math
parameters, like the radical spacing. I made a macro that deals with it:
$\mathopenupparameter\Umathradicalvgap{10.5}\sqrt[3]{x}$
(this one is also in mkiv, be it slightly less efficient because in lmtx
we can use \Umathparameter to query the state of a variable)
Already present was a variant on \over which normally is used like
{{1}\over{2}}
i.e. the only time when tex looks back and needs to tweak styles. The
alternative is:
$\Uover{1}{2}$ etc
which looks forward but is otherwise compatible, apart from supporting
an optional keyword
$\Uover style \scriptscriptstyle{1}{2}$ etc
$\Uover style \textstyle{1}{2}$ etc
At some point I will adapt some context code to this.
Anyway, these are things that low level math users might like to play
with. There are few more things but those will probably go unnoticed.
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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
reply other threads:[~2020-05-08 11:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=7f3608d1-37f2-0d3c-076b-a7133ac3aa2f@xs4all.nl \
--to=j.hagen@xs4all.nl \
--cc=ntg-context@ntg.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).