Add missing backslashes

Found by 2to3, but useful for python2 as well for consistency reasons.
This commit is contained in:
Georg Baum 2016-06-08 22:17:14 +02:00
parent d0aa7d24ab
commit e93013057f
4 changed files with 8 additions and 8 deletions

View File

@ -824,7 +824,7 @@ def change_header(document):
if i == -1:
return
lines[i+1:i+1] = ["\\use_natbib 0",
"\use_numerical_citations 0"]
"\\use_numerical_citations 0"]
supported_versions = ["1.2.%d" % i for i in range(5)] + ["1.2"]

View File

@ -279,8 +279,8 @@ def revert_xetex(document):
pretext.append(tw)
if osf:
pretext.append('\\defaultfontfeatures{Numbers=OldStyle}')
pretext.append('\usepackage{xunicode}')
pretext.append('\usepackage{xltxtra}')
pretext.append('\\usepackage{xunicode}')
pretext.append('\\usepackage{xltxtra}')
insert_to_preamble(document, pretext)
@ -1699,7 +1699,7 @@ def revert_nameref(document):
document.body[stins:endins + 1] = newcontent
if foundone:
add_to_preamble(document, ["\usepackage{nameref}"])
add_to_preamble(document, ["\\usepackage{nameref}"])
def remove_Nameref(document):

View File

@ -970,7 +970,7 @@ def revert_cell_rotation(document):
finally:
if load_rotating:
add_to_preamble(document, ["\\@ifundefined{turnbox}{\usepackage{rotating}}{}"])
add_to_preamble(document, ["\\@ifundefined{turnbox}{\\usepackage{rotating}}{}"])
def convert_cell_rotation(document):
@ -1029,7 +1029,7 @@ def revert_table_rotation(document):
finally:
if load_rotating:
add_to_preamble(document, ["\\@ifundefined{turnbox}{\usepackage{rotating}}{}"])
add_to_preamble(document, ["\\@ifundefined{turnbox}{\\usepackage{rotating}}{}"])
def convert_table_rotation(document):

View File

@ -1189,7 +1189,7 @@ def revert_textcolor(document):
# register that xcolor must be loaded in the preamble
if xcolor == False:
xcolor = True
add_to_preamble(document, ["\\@ifundefined{rangeHsb}{\usepackage{xcolor}}{}"])
add_to_preamble(document, ["\\@ifundefined{rangeHsb}{\\usepackage{xcolor}}{}"])
# find the next \\color and/or the next \\end_layout
j = find_token(document.body, "\\color", i + 1)
k = find_token(document.body, "\\end_layout", i + 1)
@ -1273,7 +1273,7 @@ def revert_colorbox(document):
pass
else:
# we also neeed to load xcolor in the preamble but only once
add_to_preamble(document, ["\\@ifundefined{rangeHsb}{\usepackage{xcolor}}{}"])
add_to_preamble(document, ["\\@ifundefined{rangeHsb}{\\usepackage{xcolor}}{}"])
document.body[einset + 1 : einset + 1] = put_cmd_in_ert("}")
if framecolor != defaultframecolor:
document.body[binset:binset] = put_cmd_in_ert("\\fcolorbox{" + framecolor + "}{" + backcolor + "}{")