Skip to content

Commit caa3036

Browse files
committed
log u-m but not mathclass-15
1 parent 5bf9204 commit caa3036

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

comp-um.xsl

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@
4343
------
4444

4545
</xsl:value-of>
46-
<xsl:for-each select="$u//unicodedata[@mathclass]">
46+
<xsl:for-each select="$u//character[unicodedata[@mathclass] or mathlatex[@set='unicode-math']]">
4747
<xsl:choose>
48-
<xsl:when test="../mathlatex[@set='unicode-math']">
48+
<xsl:when test="mathlatex[@set='unicode-math']">
4949
<xsl:variable name="cs" select="
50-
if(contains(../description,'GREEK'))
50+
if(contains(description,'GREEK'))
5151
then
52-
replace(../mathlatex[@set='unicode-math'],'\\','\\m?')
52+
replace(mathlatex[@set='unicode-math'],'\\','\\m?')
5353
else
54-
replace(../mathlatex[@set='unicode-math'],' ','space')
54+
replace(mathlatex[@set='unicode-math'],' ','space')
5555
"/>
5656
<xsl:variable name="re" select="concat('.*\',$cs,' *\}\{([^\{\}]*)\}.*')"/>
5757
<xsl:variable name="um" select="($umt[matches(.,$re)]!replace(.,$re,'$1'),'???')[1]"/>
58-
<xsl:if test="not(
58+
<xsl:if test="unicodedata/not(
5959
(@mathclass='R' and $um='\mathrel')
6060
or (@mathclass='B' and $um='\mathbin')
6161
or (@mathclass='V' and $um='\mathbin')
@@ -70,16 +70,27 @@
7070
or (@mathclass='L' and $um='\mathop')
7171
or (@mathclass='D' and $um='\mathaccent')
7272
)">
73-
<xsl:value-of select="../@id, '|', $cs, '|', @mathclass,'|',$um,'&#10;'"/>
73+
<xsl:value-of select="@id, ' | ',
74+
$cs,substring($pad,string-length($cs)), ' | ',
75+
(unicodedata/@mathclass,'!')[1],' | ',
76+
$um,substring($pad2,string-length($um)), ' | ',
77+
description,'&#10;'" separator=""/>
7478
</xsl:if>
7579
</xsl:when>
76-
<xsl:when test="../@dec &lt; 128"/>
80+
<xsl:when test="@dec &lt; 128"/>
7781
<xsl:otherwise>
78-
<xsl:value-of select="../@id, '| *** |', @mathclass,'| ***','&#10;'"/>
82+
<xsl:value-of select="@id, ' | *** | ',
83+
unicodedata/@mathclass,
84+
' | *** | ',
85+
description,'&#10;'" separator=""/>
7986
</xsl:otherwise>
8087
</xsl:choose>
8188
</xsl:for-each>
8289
</xsl:template>
90+
91+
<xsl:variable name="pad" select="' '"/>
92+
<xsl:variable name="pad2" select="' '"/>
93+
8394
</xsl:stylesheet>
8495

8596

0 commit comments

Comments
 (0)