ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Math in LMTX and definemathcommand
@ 2021-11-17 21:59 Otared Kavian via ntg-context
  2021-11-17 22:16 ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 2+ messages in thread
From: Otared Kavian via ntg-context @ 2021-11-17 21:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Otared Kavian

Hi Hans,

Thank you for the new upload and the rewriting of the math fonts stuff, thanks also to Mikael S. I did several tests on real size math projects and did not notice important issues.

The two issues I noticed, show up mainly with LucidaOT, and are explained in the following example:

\setupbodyfont[lucidaot]

\definemathstackers[MySymbol]
	[voffset=-1.4\mathexheight, % -.8\mathexheight
	hoffset=\zeropoint,
	mathclass=ord,
	topoffset=.3\mathemwidth, % poor man's italic correction
	middlecommand=\mathematics]

\define[1]\interior{\mathover[MySymbol]{176}{#1}} %2218 U+00B0

\definemathcommand [Argmin]  [limop] {\mfunctionlabeltext{ArgMin}}
\definemathcommand [liminfbar]  [limop] {\underline{\mfunctionlabeltext{lim}}}
\definemathcommand [limsupbar]  [limop] {\overline{\mfunctionlabeltext{lim}}}

\starttext
If $A \subset {\Bbb R}$ is a set, its interior is denoted by $\interior{A}$. Can one have the circle over $A$ slightly bigger (probbaly this is font dependent)?

The built-in commands $\liminf$ and $\limsup$ do not work properly with LucidaOT (I tried other fonts and there they are fine):
\startformula
x_{n} := (-1)^n, \quad\mbox{then} \quad \liminf_{n \geq 0}x_{n} = -1, \quad \limsup_{n\geq 0} x_{n}= +1.
\stopformula

The commands defined above, \type{\liminfbar} and \type{\limsupbar}, behave correctly in all fonts I tested:
\startformula
x_{n} := (-1)^n, \quad\mbox{then} \quad \liminfbar_{n \geq 0}x_{n} = -1, \quad \limsupbar_{n\geq 0}x_{n} = +1,
\stopformula
but not the command \type{\Argmin} (which does not show Argmin in any font…)
\startformula
\Argmin_{x\in {\Bbb R}} (x^2 - x + 1) = {1 \over 2}.
\stopformula

\stoptext

Best regards: Otared
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Math in LMTX and definemathcommand
  2021-11-17 21:59 Math in LMTX and definemathcommand Otared Kavian via ntg-context
@ 2021-11-17 22:16 ` Hans Hagen via ntg-context
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen via ntg-context @ 2021-11-17 22:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen, Otared Kavian

On 11/17/2021 10:59 PM, Otared Kavian via ntg-context wrote:
> Hi Hans,
> 
> Thank you for the new upload and the rewriting of the math fonts stuff, thanks also to Mikael S. I did several tests on real size math projects and did not notice important issues.

you missed the multiple primes issue (a bit too agressive lua code 
reduction, fixed in next upload)

> The two issues I noticed, show up mainly with LucidaOT, and are explained in the following example:

thanks, mikael collects all that

> If $A \subset {\Bbb R}$ is a set, its interior is denoted by $\interior{A}$. Can one have the circle over $A$ slightly bigger (probbaly this is font dependent)?

in principle we can scale individual glyphs (and when not default users 
can add their own lfg files)
> The built-in commands $\liminf$ and $\limsup$ do not work properly with LucidaOT (I tried other fonts and there they are fine):

hm .. (in case of lucida, also check cambria and garamond as these have 
staircase kerns too so they are somewhat similar)

mikael is making test (and in the meantime i'm experimenting a bit 
forther with compact fonts because all has to work in that mode too)

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-17 22:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17 21:59 Math in LMTX and definemathcommand Otared Kavian via ntg-context
2021-11-17 22:16 ` Hans Hagen via ntg-context

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).