" add the \\math_number_before tag "
# check if the document uses the class option "leqno"
k = find_token(document.header, "\\quotes_style", 0)
+ m = find_token(document.header, "\\options", 0)
regexp = re.compile(r'^.*leqno.*')
i = find_re(document.header, regexp, 0)
- if i != -1:
+ if i != -1 and i == m:
document.header.insert(k, "\\math_number_before 1")
# delete the found option
document.header[i] = document.header[i].replace(",leqno", "")
document.header[i] = "\\math_numbering_side default"
# check if the document uses the class option "reqno"
k = find_token(document.header, "\\math_numbering_side", 0)
+ m = find_token(document.header, "\\options", 0)
regexp = re.compile(r'^.*reqno.*')
i = find_re(document.header, regexp, 0)
- if i != -1:
+ if i != -1 and i == m:
document.header[k] = "\\math_numbering_side right"
# delete the found option
document.header[i] = document.header[i].replace(",reqno", "")
document.header[i] = "\\math_number_before 0"
+def convert_minted(document):
+ " add the \\use_minted tag "
+ document.header.insert(-1, "\\use_minted 0")
+
+
+def revert_minted(document):
+ " remove the \\use_minted tag "
+ i = find_token(document.header, "\\use_minted", 0)
+ if i != -1:
+ document.header.pop(i)
+
+
##
# Conversion hub
#
[540, []],
[541, [convert_allowbreak]],
[542, [convert_mathnumberpos]],
- [543, [convert_mathnumberingname]]
+ [543, [convert_mathnumberingname]],
+ [544, [convert_minted]]
]
revert = [
+ [543, [revert_minted]],
[542, [revert_mathnumberingname]],
[541, [revert_mathnumberpos]],
[540, [revert_allowbreak]],