[NTG-context] some math symbols not working

Aditya Mahajan adityam at umich.edu
Fri Feb 12 00:10:46 CET 2010

On Mon, 8 Feb 2010, Warrence wrote:

> Hi,
> I was trying some math symbols and stumbled over the following commands, that 
> do not work in my context documents (the comments say what's not working 
> exactly). The pasted document works at http://live.contextgarden.net/ . I'm 
> using the latest context-minimals as provided on the website. Is this a MkIV 
> issue?

Yes. The mappings in MkIV are incomplete. Whenever you find a
missing symbol, send an email, and I will try to fix add it.

> \cong

The mapping in math-vfu is wrong and it was mapping the unicode slot of cong to
the glyph for dotplus. I am attaching a file that fixes this.

However, I do not know how to proceed for \cong. \cong is one of the symbols
thar are composed from other symbols in plain tex. So, most traditional tex math
fonts (including LM) do not have that symbol. However, opentype math fonts do.
Ideally, what we want to map \cong to a font glyph, if one exists; otherwise, we
should fall back to a composed character.

Hans, we need a mechanism to implement fallbacks for math characters.

> \mapsto
> \hookleftarrow
> \longleftarrow
> \Longleftarrow
> \longrightarrow
> \Longrightarrow
> \longleftrightarrow
> \Longleftrightarrow
> \longmapsto
> \hookrightarrow
> \bowtie
> \models
> \Join

Same thing as \cong.

> \blacksquare


> In addition: \ncong is not aligned with = and \cong

I am not sure what \ncong should map to: 0x2246 or 0x2247? There is
inconsistency between the mappings in char-def and math-vfu which can be fixed
easily once I figure out what is the correct mapping.

> % the following give "Undefined control sequence":
> \gneq % \lneq works

Fixed.. was a typo

> \Diamond  \lozenge

I am not sure which unicode slot this should map to (0x25C7?). What is the difference
between \diamond and \Diamond?

> \lhd
> \rhd
> \unlhd
> \unrhd

I am not sure which unicode slot they should map to. In ams mappings
\triangleleft is different from \lhd, and I cannot find the right symbols for

I will investigate more for the last two sets. In the mean time, Hans can you
apply the attached patch for \blacksquare and \gneq.

-------------- next part --------------
diff --git a/char-def.lua b/char-def.lua
index 3aec401..5f768e3 100644
--- a/char-def.lua
+++ b/char-def.lua
@@ -54277,6 +54277,8 @@ characters.data={
   description="NORMAL SUBGROUP OF",
+  mathspec = {
+    class="bin", mathname="triangleleft",
@@ -59806,6 +59808,8 @@ characters.data={
   description="BLACK SQUARE",
+  mathclass="ord",
+  mathname="blacksquare",
@@ -68185,7 +68189,7 @@ characters.data={
-  mathname="rneq",
+  mathname="gneq",
diff --git a/math-vfu.lua b/math-vfu.lua
index 9b16357..a2e3b58 100644
--- a/math-vfu.lua
+++ b/math-vfu.lua
@@ -1126,7 +1126,7 @@ fonts.enc.math["tex-ma"] = {
     [0x024C7] = 0x72, -- circleR               \circledR
     [0x024C8] = 0x73, -- circleS               \circledS
     [0x022D4] = 0x74, -- fork                  \pitchfork
-    [0x02245] = 0x75, -- dotplus               \dotplus
+    [0x02214] = 0x75, -- dotplus               \dotplus
     [0x0223D] = 0x76, -- revsimilar            \backsim
     [0x022CD] = 0x77, -- revasymptequal        \backsimeq -- AM: Check this! I mapped it to simeq.
     [0x0231E] = 0x78, -- rightanglesw          \llcorner

More information about the ntg-context mailing list