ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: Khaled Hosny <khaledhosny@eglug.org>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Jeong Dal <haksan@me.com>
Subject: Re: \not\in doesn't work properly
Date: Tue, 04 Dec 2012 17:38:08 +0100	[thread overview]
Message-ID: <50BE26F0.7070708@wxs.nl> (raw)
In-Reply-To: <20121204151855.GF10913@khaled-laptop>

On 12/4/2012 4:18 PM, Khaled Hosny wrote:

> The main issue here is that \not in was largely a hack in CM fonts, the
> glyph was specially crafted so that it overlays the next symbol by
> having zero width and -ve right side bearing and it was centered over
> equal and similar symbols, anything with different width would not look
> good.

ok, so officially it has zero width

> This can't be relied on with OpenType fonts mainly because we don't
> control all the fonts and since U+0338 is a combining mark it tends to
> have -ve left side bearing (the opposite of CM).

ah, ok

> Previously I thought it should be handled as special math accent that
> don't get shifted above, but this didn't work because accent noads do
> not inherit the spacing of their nuclei, and changing this is not simple
> AFAICT. When I checked Word it had no notion of negations either, you
> can only use pre-composed negated symbols (but accents respect the
> spacing of its accentee, BTW).
>
> The solution currently used by unicode-math package is to look ahead and
> see if the next symbol after \not has a precomposed negated form and use
> it (such a list can be obtained by checking Unicode characters that
> decompose to something + U+0338), else just output U+0338. This probably
> can be even enhanced by inserting a kern between \not and the next
> symbol that would center their bounding boxes together, to handle cases
> why no precomposed symbol exists. My be we need a new primitive
> \Unegation that would do this in the engine?

we already have some mechanisms that deal with such issues so some kind 
of support is doable (if really needed)

concerning the bug reports ...

% \setupbodyfont[dejavu] % uses xits

\enablemode[lmmath]

\starttext

% \imply : undefined
% \notin : no virtual char

\startformula \hbox{not =          :} \not=           \stopformula
\startformula \hbox{notin          :} \notin          \stopformula
\startformula \hbox{longrightarrow :} \Longrightarrow \stopformula
\startformula \hbox{not in         :} \not\in         \stopformula
\startformula \hbox{iff            :} \iff            \stopformula
\startformula \hbox{mapsto         :} \mapsto         \stopformula

\stoptext

afaik \imply was never defined  to start with; \notin needs a virtual 
glyph in the lm definitions; the rest seems to work ok

I'll add a vf \notin and also \imply

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  parent reply	other threads:[~2012-12-04 16:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30  9:26 Jeong Dal
2012-12-03 20:07 ` Hans Hagen
2012-12-03 21:26   ` Otared Kavian
2012-12-03 22:02     ` Hans Hagen
2012-12-04  4:33   ` Jeong Dal
2012-12-04 15:18   ` Khaled Hosny
2012-12-04 15:33     ` luigi scarso
2012-12-04 16:10       ` Hans Hagen
2012-12-04 16:38     ` Hans Hagen [this message]
2012-12-04 21:01       ` Otared Kavian
2012-12-05  9:18         ` Hans Hagen
2012-12-05 15:48 Jeong Dal

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=50BE26F0.7070708@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=haksan@me.com \
    --cc=khaledhosny@eglug.org \
    --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).