mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
lyx2lyx/lyx_2_2.py: fix 2 issues with the reversion of boxes
This commit is contained in:
parent
e65a6624a5
commit
64206d3725
@ -1192,7 +1192,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)
|
||||
@ -1276,8 +1276,8 @@ 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}}{}"])
|
||||
document.body[einset + 1 : einset + 1] = put_cmd_in_ert("}")
|
||||
add_to_preamble(document, ["\\@ifundefined{rangeHsb}{\\usepackage{xcolor}}{}"])
|
||||
document.body[einset + 2 : einset + 2] = put_cmd_in_ert("}")
|
||||
if framecolor != defaultframecolor:
|
||||
document.body[binset:binset] = put_cmd_in_ert("\\fcolorbox{" + framecolor + "}{" + backcolor + "}{")
|
||||
else:
|
||||
|
@ -158,6 +158,8 @@ What's new
|
||||
|
||||
- Do not convert "--" to "\twohyphens" in formula macros.
|
||||
|
||||
- Fix bug in the reversion of colored boxes with special frame settings.
|
||||
|
||||
|
||||
* USER INTERFACE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user