"theight%":"\\backslash\ntextheight", "pheight%":"\\backslash\npageheight"}
# Convert LyX units to LaTeX units
- for unit in units.keys():
+ for unit in list(units.keys()):
if len.find(unit) != -1:
len = '%f' % (len2value(len) / 100)
len = len.strip('0') + units[unit]
return l
+# FIXME: Use the version in unicode_symbols.py which has some bug fixes
def read_unicodesymbols():
" Read the unicodesymbols list of unicode characters and corresponding commands."
pathname = os.path.abspath(os.path.dirname(sys.argv[0]))
document.body[i] = document.body[i].replace('\\begin_inset CharStyle', '\\begin_inset Flex')
def revert_flex(document):
- "Revert Flex to Charstyle"
+ "Revert Flex to CharStyle"
i = 0
while True:
i = find_token(document.body, "\\begin_inset Flex", i)
"Remove TeX code command \global when it is in front of a macro"
# math macros are nowadays already defined \global, so that an additional
# \global would make the document uncompilable, see
- # http://bugzilla.lyx.org/show_bug.cgi?id=5371
+ # http://www.lyx.org/trac/ticket/5371
# We're looking for something like this:
# \begin_inset ERT
# status collapsed
return
newmodlist = []
for mod in modlist:
- if modulemap.has_key(mod):
+ if mod in modulemap:
newmodlist.append(modulemap[mod])
else:
document.warning("Can't find module %s in the module map!" % mod)
def convert_paper_sizes(document):
' exchange size options legalpaper and executivepaper to correct order '
- # routine is needed to fix http://bugzilla.lyx.org/show_bug.cgi?id=4868
+ # routine is needed to fix http://www.lyx.org/trac/ticket/4868
i = 0
j = 0
i = find_token(document.header, "\\papersize executivepaper", 0)