From e2e78fa20ab0d1a7685d11d13c4082a691c9b205 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Sun, 22 Jun 2008 23:21:46 +0000 Subject: [PATCH] =?utf8?q?-=20support=20for=20polytonic=20Greek,=20filefor?= =?utf8?q?mat=20incremented=20to=20338,=20fixes=20bug=204969,=20patch=20by?= =?utf8?q?=20me=20and=20J=C3=BCrgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25356 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/FORMAT | 3 +++ lib/languages | 1 + lib/lyx2lyx/lyx_1_6.py | 21 ++++++++++++++++++++- src/Buffer.cpp | 2 +- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/development/FORMAT b/development/FORMAT index 140e8a660e..bae26068bc 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -1,6 +1,9 @@ LyX file-format changes ----------------------- +2008-06-21 Uwe Stöhr + * Format incremented to 338: support for polytonic Greek. + 2008-06-13 Abdelrazak Younes * Format incremented to 337: convert/revert graphics display param. diff --git a/lib/languages b/lib/languages index e034be1e08..d335d91189 100644 --- a/lib/languages +++ b/lib/languages @@ -42,6 +42,7 @@ galician galician "Galician" false iso8859-15 gl_ES "" german german "German (old spelling)" false iso8859-15 de_DE "" ngerman ngerman "German" false iso8859-15 de_DE "" greek greek "Greek" false iso8859-7 el_GR "" +polutonikogreek polutonikogreek "Greek (polytonic)" false iso8859-7 el_GR "\makeatletter\let\lyx@tildeaccent\~\addto\extrasgreek{\bbl@deactivate{~}\let\~\lyx@tildeaccent}\makeatother" hebrew hebrew "Hebrew" true cp1255 he_IL "" # "hungarian" is a synonym for the "magyar" babel language option # "hungarian" might be used for special purposes, see http://www.math.bme.hu/latex/magyar_pre_tug2004.pdf diff --git a/lib/lyx2lyx/lyx_1_6.py b/lib/lyx2lyx/lyx_1_6.py index f60300b4c2..138ccae588 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -2584,6 +2584,23 @@ def revert_plainlayout(document): i += 1 +def revert_polytonicgreek(document): + "Set language polytonic Greek to Greek" + i = 0 + if document.language == "polutonikogreek": + document.language = "greek" + i = find_token(document.header, "\\language", 0) + if i != -1: + document.header[i] = "\\language greek" + j = 0 + while True: + j = find_token(document.body, "\\lang polutonikogreek", j) + if j == -1: + return + document.body[j] = document.body[j].replace("\\lang polutonikogreek", "\\lang greek") + j = j + 1 + + ## # Conversion hub # @@ -2650,9 +2667,11 @@ convert = [[277, [fix_wrong_tables]], [335, [convert_InsetSpace]], [336, []], [337, [convert_display_enum]], + [338, []], ] -revert = [[336, [revert_display_enum]], +revert = [[337, [revert_polytonicgreek]], + [336, [revert_display_enum]], [335, [remove_fontsCJK]], [334, [revert_InsetSpace]], [333, [revert_paper_sizes]], diff --git a/src/Buffer.cpp b/src/Buffer.cpp index e52b6dbacf..6173666b61 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -115,7 +115,7 @@ namespace os = support::os; namespace { -int const LYX_FORMAT = 337; +int const LYX_FORMAT = 338; //Uwe: support for polytonic Greek typedef map DepClean; typedef map > RefCache; -- 2.39.2