From 3e8bf5477dc88477c19bc3ce5d729f9bbb77cc7b Mon Sep 17 00:00:00 2001 From: Julien Rioux Date: Wed, 14 Mar 2012 00:43:27 +0100 Subject: [PATCH] Fix lyx2lyx revertion for natbib. We need to search for the \cite_engine line starting from the beginning of the document header. --- lib/lyx2lyx/lyx_2_1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py index 4704143365..a93191169d 100644 --- a/lib/lyx2lyx/lyx_2_1.py +++ b/lib/lyx2lyx/lyx_2_1.py @@ -445,7 +445,7 @@ def revert_cite_engine_type(document): del document.header[i] # 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: return document.header[i] = "\\cite_engine natbib_" + engine_type