10.03.2019, 12:29, "Jürgen Spitzmüller" <sp...@lyx.org>:
Am Samstag, den 09.03.2019, 20:52 +0530 schrieb Joe Doe:
hi.
why not. Thanks for the help.
I hereby grant permission to license any and all contributions I've
made to LyX under the Gnu GPL version 2 or later.
Thanks for this. Meanwhile I had a closer look at the language
situation. If I am not mistaken, there is not yet proper malayalam
support in babel, is it? So
+ BabelName malayalam
https://github.com/latex3/latex2e/blob/master/required/babel/locale/ml/babel-ml.ini
does most probably not work.
(Malayalam is experimentally supported by a babel "ini" file, but I am
unable to produce a working document)
I see, however, that there is the malayalam-latex package for
typesetting Mayalalam with traditional LaTeX:
http://www.ctan.org/pkg/malayalam-latex
But this uses latin transliteration, so we cannot support it without
major work.
Thus, I'd suggest to only support polyglossia for the moment.
It is al right. I will update the patch and send it. thank y
Is that fine with you, Joice?
Jürgen
Thank you very much for the support, Jürgen.
Joice
From b663546a41fb4db0762cd894d63f0c21d76a2642 Mon Sep 17 00:00:00 2001 From: Joice <josuku...@outlook.com> Date: Thu, 21 Feb 2019 09:55:50 +0530 Subject: [PATCH 2/2] Support for malayalam language
--- development/FORMAT | 3 +++ lib/languages | 1 - lib/lyx2lyx/lyx_2_4.py | 25 +++++++++++++++++++++++++ src/version.h | 4 ++-- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/development/FORMAT b/development/FORMAT index b87d395bc3..a568b44bc5 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -7,6 +7,9 @@ changes happened in particular if possible. A good example would be ----------------------- +2019-02-21 Joice Joseph <josuku...@outlook.com> + * Format incremented to 567: Support for Malayalam: + \lang malayalam 2018-10-29 Guy Rutenberg <guyrutenb...@gmail.com> * format incremeneted to 566: Fix direction of Hebrew parentheses in the LyX file. diff --git a/lib/languages b/lib/languages index 261728cb9d..256ac933b3 100644 --- a/lib/languages +++ b/lib/languages @@ -1004,7 +1004,6 @@ End Language malayalam GuiName "Malayalam" - BabelName malayalam PolyglossiaName malayalam Encoding utf8 QuoteStyle english diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py index 6c0b1c707f..9fe041e87d 100644 --- a/lib/lyx2lyx/lyx_2_4.py +++ b/lib/lyx2lyx/lyx_2_4.py @@ -997,6 +997,7 @@ def revert_dateinfo(document): "lowersorbian" : ["%A, %d. %B %Y", "%d.%m.%y", "%d %B %Y", "%d %b %Y", "%d.%m.%Y"], "macedonian" : ["%A, %d %B %Y", "%d.%m.%y", "%d %B %Y", "%d %b %Y", "%d.%m.%Y"], "magyar" : ["%Y. %B %d., %A", "%Y. %m. %d.", "%Y. %B %d.", "%Y. %b %d.", "%Y.%m.%d."], + "malayalam" : ["%A, %d %B, %Y", "%d/%m/%y", "%d %B %Y", "%d %b %Y", "%d-%m-%Y"], "marathi" : ["%A, %d %B, %Y", "%d/%m/%y", "%d %B %Y", "%d %b %Y", "%d-%m-%Y"], "mongolian" : ["%A, %Y Ð¾Ð½Ñ %m ÑаÑÑн %d", "%Y-%m-%d", "%Y Ð¾Ð½Ñ %m ÑаÑÑн %d", "%d-%m-%Y", "%d-%m-%Y"], "naustrian" : ["%A, %d. %B %Y", "%d.%m.%y", "%d. %B %Y", "%d. %b %Y", "%d.%m.%Y"], @@ -1179,6 +1180,7 @@ def revert_timeinfo(document): "lowersorbian" : ["%H:%M:%S %Z", "%H:%M"], "macedonian" : ["%H:%M:%S %Z", "%H:%M"], "magyar" : ["%H:%M:%S %Z", "%H:%M"], + "malayalam" : ["%p %I:%M:%S %Z", "%p %I:%M"], "marathi" : ["%I:%M:%S %p %Z", "%I:%M %p"], "mongolian" : ["%H:%M:%S %Z", "%H:%M"], "naustrian" : ["%H:%M:%S %Z", "%H:%M"], @@ -1398,6 +1400,27 @@ def convert_hebrew_parentheses(document): elif current_language == 'hebrew' and not line.startswith('\\'): document.body[i] = line.replace('(','\x00').replace(')','(').replace('\x00',')') +def revert_malayalam(document): + "Set the document language to English but assure Malayalam output" + + if document.language == "malayalam": + document.language = "english" + i = find_token(document.header, "\\language malayalam", 0) + if i != -1: + document.header[i] = "\\language english" + j = find_token(document.header, "\\language_package default", 0) + if j != -1: + document.header[j] = "\\language_package default" + add_to_preamble(document, ["\\AtBeginDocument{\setotherlanguage{malayalam}}"]) + document.body[2 : 2] = ["\\begin_layout Standard", + "\\begin_inset ERT", "status open", "", + "\\begin_layout Plain Layout", "", "", + "\\backslash", + "resetdefaultlanguage{malayalam}", + "\\end_layout", "", "\\end_inset", "", "", + "\\end_layout", ""] + + def revert_hebrew_parentheses(document): " Store parentheses in Hebrew text reversed" @@ -1433,9 +1456,11 @@ convert = [ [564, []], [565, [convert_AdobeFonts]], # Handle adobe fonts in GUI [566, [convert_hebrew_parentheses]], + [567, []], ] revert = [ + [566, [revert_malayalam]], [565, [revert_hebrew_parentheses]], [564, [revert_AdobeFonts]], [563, [revert_lformatinfo]], diff --git a/src/version.h b/src/version.h index 09d0ddc487..9ded82120d 100644 --- a/src/version.h +++ b/src/version.h @@ -32,8 +32,8 @@ extern char const * const lyx_version_info; // Do not remove the comment below, so we get merge conflict in // independent branches. Instead add your own. -#define LYX_FORMAT_LYX 566 // guyru: Fix parentheses in Hebrew -#define LYX_FORMAT_TEX2LYX 566 +#define LYX_FORMAT_LYX 567 // Joice : Added support for malayalam. +#define LYX_FORMAT_TEX2LYX 567 #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX #ifndef _MSC_VER -- 2.21.0
From f5041d5f5325709bb8b126bbdde9aa6ce96e2143 Mon Sep 17 00:00:00 2001 From: Joice <josuku...@outlook.com> Date: Wed, 20 Feb 2019 14:28:24 +0530 Subject: [PATCH 1/2] Added Malayalam language support. --- lib/languages | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/languages b/lib/languages index d409ce0ba5..261728cb9d 100644 --- a/lib/languages +++ b/lib/languages @@ -1002,6 +1002,16 @@ Language macedonian Provides textcyrillic End +Language malayalam + GuiName "Malayalam" + BabelName malayalam + PolyglossiaName malayalam + Encoding utf8 + QuoteStyle english + DateFormats "dd MMMM yyyy|d MMM yyyy|dd-MM-yyyy" + LangCode ml_IN +End + # not supported by babel Language marathi GuiName "Marathi" -- 2.21.0