On Sun, 15 Nov 2009, Taco Hoekwater wrote:
Aditya Mahajan wrote:
On Fri, Nov 13, 2009 at 4:03 AM, Mojca Miklavec <
[email protected]> wrote:
Hello,
I have tried to compile an old document (written in mkii times). Among
other problems that I yet need to isolate, the following minimal
example doesn't want to compile: $\bigl| x \bigr>$ since <|> aren't
recognized as candidates for delimiters. There is a workaround of
course (using \langle, \rangle, ... instead of <>), but the three
characters are just way too handy to use.
| works fine here. < and > don't. I did not know that \left< is equivalent
to \left\langle even in plain tex.
I suppose that the behaviour in mkii comes from these lines:
\definemathcharacter [<] [nothing] [sy] ["68] [ex] ["0A]
\definemathcharacter [>] [nothing] [sy] ["69] [ex] ["0B]
I guess mkii is imitating plain tex here. (Though, I could not find how
this
is happening in plain tex)
From plain.tex:
\mathcode`\<="313C
\delcode`\<="26830A
The first (\mathcode) controls standalone use, the second (\delcode)
use as a delimiter. Both can be set at the same time, and that second
one got lost in the conversion, probably because it has a dedicated
slot in Unicode (U+0x27E8, MATHEMATICAL LEFT ANGLE BRACKET).
Perhaps this can be done with the mathspec field in char-def.lua, but
I do not know how?
The attached patch gives a working solution for lmmath but does not work
with cambria. I don't know if the latter is a fault of context mkiv or
luatex.
In any case, this is a kludge as we have to define a dummy name. It will
be better if we could just say name=false. Currently, if I use name=false,
\left< gives an error.
Aditya
diff --git a/char-def.lua b/char-def.lua
index 3aec401..990bfd2 100644
--- a/char-def.lua
+++ b/char-def.lua
@@ -544,8 +544,10 @@ characters.data={
description="LESS-THAN SIGN",
direction="on",
linebreak="al",
- mathclass="binary",
- mathname="lt",
+ mathspec={
+ { name="lt", class="binary" } ,
+ { name="ltdelim", class="delimiter" },
+ },
mirror=0x003E,
unicodeslot=0x003C,
},
@@ -568,8 +570,10 @@ characters.data={
description="GREATER-THAN SIGN",
direction="on",
linebreak="al",
- mathclass="binary",
- mathname="gt",
+ mathspec={
+ { name="gt", class="binary" } ,
+ { name="gtdelim", class="delimiter" },
+ },
mirror=0x003C,
unicodeslot=0x003E,
},
diff --git a/math-vfu.lua b/math-vfu.lua
index 0300bb0..1543833 100644
--- a/math-vfu.lua
+++ b/math-vfu.lua
@@ -566,6 +566,8 @@ fonts.enc.math["large-to-small"] = {
[0x02309] = 0x07, -- rceil
[0x0007B] = 0x08, -- {
[0x0007D] = 0x09, -- }
+ [0x0003C] = 0x0A, -- <
+ [0x0003E] = 0x0B, -- >
[0x027E8] = 0x0A, -- <
[0x027E9] = 0x0B, -- >
[0x0007C] = 0x0C, -- |
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / 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
___________________________________________________________________________________