Fix lyx2lyx revertion for natbib.

We need to search for the \cite_engine line starting from the
beginning of the document header.
This commit is contained in:
Julien Rioux 2012-03-14 00:43:27 +01:00
parent 5ac1f9400f
commit 3e8bf5477d

View File

@ -445,7 +445,7 @@ def revert_cite_engine_type(document):
del document.header[i] del document.header[i]
# We are looking for the natbib citation engine # We are looking for the natbib citation engine
i = find_token(document.header, "\\cite_engine natbib", i) i = find_token(document.header, "\\cite_engine natbib", 0)
if i == -1: if i == -1:
return return
document.header[i] = "\\cite_engine natbib_" + engine_type document.header[i] = "\\cite_engine natbib_" + engine_type