mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
lyx2lyx/lyx_2_0.py: fix bug in the feyn reversion routine
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35461 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b9a5fda7e2
commit
1787e837e7
@ -2161,6 +2161,7 @@ def revert_rule(document):
|
||||
return
|
||||
|
||||
def revert_diagram(document):
|
||||
" Add the feyn package if \\Diagram is used in math "
|
||||
i = 0
|
||||
re_diagram = re.compile(r'\\begin_inset Formula .*\\Diagram', re.DOTALL)
|
||||
while True:
|
||||
@ -2175,7 +2176,8 @@ def revert_diagram(document):
|
||||
if not m:
|
||||
i += 1
|
||||
continue
|
||||
add_to_preamble(document, "\\use_package{feyn}")
|
||||
add_to_preamble(document, ["% this command was inserted by lyx2lyx"])
|
||||
add_to_preamble(document, "\\usepackage{feyn}")
|
||||
# only need to do it once!
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user