lyx_2_2.py: fix reversion of colored boxes with special features

This commit is contained in:
Uwe Stöhr 2017-04-15 19:58:56 +02:00
parent 3677c20be9
commit e07cb1da96

View File

@ -1275,7 +1275,7 @@ def revert_colorbox(document):
else: else:
# we also neeed to load xcolor in the preamble but only once # 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("}") document.body[einset + 2 : einset + 2] = put_cmd_in_ert("}")
if framecolor != defaultframecolor: if framecolor != defaultframecolor:
document.body[binset:binset] = put_cmd_in_ert("\\fcolorbox{" + framecolor + "}{" + backcolor + "}{") document.body[binset:binset] = put_cmd_in_ert("\\fcolorbox{" + framecolor + "}{" + backcolor + "}{")
else: else: