#!/usr/bin/python
import sys,string,re,os
-def is_prefix(a, b):
- return a[:len(b)] == b
-
def get_code(code, font):
if code < 10:
return code+161
if i+1 < n:
next_line = lines[i+1]
- # some entries are spread over two lines so we join the next line
+ # some entries are spread over two lines so we join the next line
# to the current one, (if current line contains a comment, we remove it)
line = string.split(line,'%')[0]+next_line
type = "mathord"
font = mo.group(2)
code = mo.group(3)
-
+
if mo != None and symbol not in ignore_list:
mo2 = re.match(r'\s*\\def\\(.*?)\{', next_line)
- if mo2 != None and is_prefix(symbol,mo2.group(1)):
+ if mo2 != None and symbol == mo2.group(1)+"op":
sys.stderr.write("%s -> %s\n" % (symbol, mo2.group(1)))
symbol = mo2.group(1)
print
exceptions = [
- ("neq", "none", 0, 185, "mathrel"),
- ("textdegree", "none", 0, 176, "mathord"),
- ("cong", "none", 0, 64, "mathrel"),
- ("surd", "note", 0, 214, "mathord")
+ ("neq", "x", 0, 185, "mathrel"),
+ ("textdegree", "x", 0, 176, "mathord"),
+ ("cong", "x", 0, 64, "mathrel"),
+ ("surd", "x", 0, 214, "mathord")
]
if xsymbols.has_key("leq"):
if xsymbols.has_key(x[0]):
del xsymbols[x[0]]
+print """
+lyxbar cmsy 161 0 mathord
+lyxeq cmr 61 0 mathord
+lyxdabar msa 57 0 mathord
+lyxright msa 75 0 mathord
+lyxleft msa 76 0 mathord
+"""
+
for symbol in xsymbols.keys():
sys.stderr.write(symbol+"\n")