From 0920fd7b5e31d32db2ea567e312a939e5019edca Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Wed, 6 May 2009 16:58:15 +0000 Subject: [PATCH] Introduce new format as a safety measure http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg150868.html http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg150895.html git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29552 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/FORMAT | 5 +++++ lib/lyx2lyx/lyx_2_0.py | 13 +++++++++---- src/Buffer.cpp | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/development/FORMAT b/development/FORMAT index 31947cc1fa..988245498a 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -1,6 +1,11 @@ LyX file-format changes ----------------------- +2009-05-05 Pavel Sanda, Enrico Forestieri + * Format incremented to 357: Change of the latex output for underline + from \underbar to ulem's \uline. This point also corresponds to + the introduction of \lyxuline etc. macros to avoid clash with \cite. + 2009-05-05 Pavel Sanda * Format incremented to 356: support for double and wave underline character styles via ulem's \uuline and \uwave diff --git a/lib/lyx2lyx/lyx_2_0.py b/lib/lyx2lyx/lyx_2_0.py index 153bcac7a8..e021c2c662 100644 --- a/lib/lyx2lyx/lyx_2_0.py +++ b/lib/lyx2lyx/lyx_2_0.py @@ -618,7 +618,7 @@ def revert_strikeout(document): def revert_uulinewave(document): - " Reverts \\uline, \\uuline, and \\uwave character styles " + " Reverts \\uuline, and \\uwave character styles " while True: i = find_token(document.body, '\\uuline', 0) if i == -1: @@ -627,8 +627,11 @@ def revert_uulinewave(document): while True: i = find_token(document.body, '\\uwave', 0) if i == -1: - break + return del document.body[i] + +def revert_ulinelatex(document): + " Reverts \\uline character style " i = find_token(document.body, '\\bar under', 0) if i == -1: return @@ -657,10 +660,12 @@ convert = [[346, []], [353, []], [354, []], [355, []], - [356, []] + [356, []], + [357, []] ] -revert = [[355, [revert_uulinewave]], +revert = [[356, [revert_ulinelatex]], + [355, [revert_uulinewave]], [354, [revert_strikeout]], [353, [revert_printindexall]], [352, [revert_subindex]], diff --git a/src/Buffer.cpp b/src/Buffer.cpp index ac6383127e..f42b0e1f74 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -125,7 +125,7 @@ namespace { // Do not remove the comment below, so we get merge conflict in // independent branches. Instead add your own. -int const LYX_FORMAT = 356; // sanda: support for \\uuline +int const LYX_FORMAT = 357; // sanda: change latex output for various underline commands typedef map DepClean; typedef map > RefCache; -- 2.39.5