r'End',
]
+
def convert_ruby_module(document):
"""Use ruby module instead of local module definition"""
if document.del_local_layout(ruby_inset_def):
document.add_module("ruby")
+
def revert_ruby_module(document):
"""Replace ruby module with local module definition"""
if document.del_module("ruby"):
or (lang == "japanese-cjk" and inputenc == "utf8-cjk")):
document.set_parameter("inputencoding", "utf8")
+
def revert_utf8_japanese(document):
"""Use Japanese utf8 variants with Japanese documents."""
inputenc = get_value(document.header, "\\inputencoding")
# for categories
re_Declaration = re.compile(b'^#\\s*\\Declare\\w+Class.*$')
re_ExtractCategory = re.compile(b'^(#\\s*\\Declare\\w+Class(?:\\[[^]]*?\\])?){([^(]+?)\\s+\\(([^)]+?)\\)\\s*}\\s*$')
- ConvDict = {"article": "Articles", "book" : "Books", "letter" : "Letters", "report": "Reports", \
+ ConvDict = {"article": "Articles", "book" : "Books", "letter" : "Letters", "report": "Reports",
"presentation" : "Presentations", "curriculum vitae" : "Curricula Vitae", "handout" : "Handouts"}
# Arguments
re_OptArgs = re.compile(b'^(\\s*)OptionalArgs(\\s+)(\\d+)\\D*$', re.IGNORECASE)
continue
# insert file format if not already there
- if (only_comment):
+ if only_comment:
match = re_Format.match(lines[i])
if match:
formatline = i
format = int(match.group(4))
- if format > 1 and format < end_format:
+ if 1 < format < end_format:
lines[i] = b"Format %d" % (format + 1)
only_comment = 0
elif format == end_format:
i += 1
continue
- if format >= 60 and format <= 62:
+ if 60 <= format <= 62:
# nothing to do.
i += 1
continue
i += 1
continue
- if format >= 50 and format <= 56:
+ if 50 <= format <= 56:
# nothing to do.
i += 1
continue
continue
- if format >= 44 and format <= 47:
+ if 44 <= format <= 47:
# nothing to do.
i += 1
continue
continue
if format == 36:
- match = re_CiteFormat.match(lines[i]);
+ match = re_CiteFormat.match(lines[i])
if match and match.group(4) == b"":
lines[i] = match.group(0) + b" default"
i += 1
continue
# Only new features
- if format >= 29 and format <= 31:
+ if 29 <= format <= 31:
i += 1
continue
continue
# Only new features
- if format >= 24 and format <= 27:
+ if 24 <= format <= 27:
i += 1
continue
continue
# This just involved new features, not any changes to old ones
- if format >= 14 and format <= 22:
+ if 14 <= format <= 22:
i += 1
continue
continue
# These just involved new features, not any changes to old ones
- if format >= 5 and format <= 7:
+ if 5 <= format <= 7:
i += 1
continue