version 1.223, 2007/05/31 15:21:04
|
version 1.224, 2007/06/01 12:44:16
|
Line 75 static ThotBool IsStretchyFence (CHAR_T
|
Line 75 static ThotBool IsStretchyFence (CHAR_T
|
if (((character == '(' || character == ')' || |
if (((character == '(' || character == ')' || |
character == '[' || character == ']' || |
character == '[' || character == ']' || |
character == '{' || character == '}' || |
character == '{' || character == '}' || |
character == '|' || character == 0x2223)) || |
character == '|' || character == 0x2223 || |
|
character == 0x2956)) || |
/* strangely enough, appendix F.5 does not |
/* strangely enough, appendix F.5 does not |
consider this character as a fence */ |
consider this character as a fence */ |
( |
( |
Line 1495 void SetIntVertStretchAttr (Element el,
|
Line 1496 void SetIntVertStretchAttr (Element el,
|
case 0x2223: /* VerticalBar */ |
case 0x2223: /* VerticalBar */ |
c = 11; |
c = 11; |
break; |
break; |
|
case 0x2956: /* DoubleVerticalBar */ |
|
c = 12; |
|
break; |
|
|
default: |
default: |
c = (unsigned char) text[i]; |
c = (unsigned char) text[i]; |
Line 2528 static void CreateOpeningOrClosingFence
|
Line 2532 static void CreateOpeningOrClosingFence
|
Element leaf, fence; |
Element leaf, fence; |
AttributeType attrType; |
AttributeType attrType; |
Attribute attr; |
Attribute attr; |
int length; |
int length, value; |
char text[32]; |
char text[32], *s; |
|
CHAR_T val[2]; |
|
|
elType = TtaGetElementType (el); |
elType = TtaGetElementType (el); |
attrType.AttrSSchema = elType.ElSSchema; |
attrType.AttrSSchema = elType.ElSSchema; |
Line 2555 static void CreateOpeningOrClosingFence
|
Line 2560 static void CreateOpeningOrClosingFence
|
if (length == 0) |
if (length == 0) |
/* content of attribute open or close should be a single character */ |
/* content of attribute open or close should be a single character */ |
text[0] = SPACE; |
text[0] = SPACE; |
|
else if (text[0] == START_ENTITY) |
|
{ |
|
text[0] = '&'; |
|
text[length-1] = EOS; |
|
if (MapXMLEntity (MATH_TYPE, &text[1], &value)) |
|
{ |
|
// convert the entity |
|
val[0] = (CHAR_T) value; |
|
val[1] = EOS; |
|
s = (char *)TtaConvertWCToByte ((CHAR_T *)val, UTF_8); |
|
strcpy (text, s); |
|
TtaFreeMemory (s); |
|
length = strlen (text); |
|
} |
|
else |
|
text[length-1] = ';'; |
|
} |
} |
} |
text[length] = EOS; |
text[length] = EOS; |
fence = TtaNewElement (doc, elType); |
fence = TtaNewElement (doc, elType); |