Now also with attached patch.
Index: development/FORMAT =================================================================== --- development/FORMAT (revision 18079) +++ development/FORMAT (working copy) @@ -1,6 +1,11 @@ LyX file-format changes ----------------------- +2007-04-29 Uwe Stöhr <[EMAIL PROTECTED]> + + * format incremented to 266: + Support for the Armenian language + 2007-04-26 Uwe Stöhr <[EMAIL PROTECTED]> * format incremented to 265: fix LyX's table border line handling Index: lib/encodings =================================================================== --- lib/encodings (revision 18079) +++ lib/encodings (working copy) @@ -16,6 +16,10 @@ Encoding utf8x utf8x UTF-8 End +# This encoding is used to typeset Armenian using the armtex package +Encoding armscii8 armscii8 ARMSCII-8 +End + Encoding iso8859-1 latin1 ISO-8859-1 End Index: lib/languages =================================================================== --- lib/languages (revision 18088) +++ lib/languages (working copy) @@ -2,6 +2,9 @@ afrikaans afrikaans "Afrikaans" false iso8859-15 af_ZA "" american american "American" false iso8859-15 en_US "" arabic arabic "Arabic" true cp1256 ar_SA "" +# loading babel with the option "english" as armtex overwrites this later +# armtex provides the armscii8 encoding and translates words instead of babel +armenian english "Armenian" false armscii8 hy_AM "\usepackage{armtex}" austrian austrian "Austrian" false iso8859-15 de_AT "" naustrian naustrian "Austrian (new spelling)" false iso8859-15 de_AT "" bahasa bahasa "Bahasa" false iso8859-15 in_ID "" Index: lib/layouts/armenian-article.layout =================================================================== --- lib/layouts/armenian-article.layout (revision 0) +++ lib/layouts/armenian-article.layout (revision 0) @@ -0,0 +1,39 @@ +#% Do not delete the line below; configure depends on this +# \DeclareLaTeXClass[article]{article (Armenian)} +# Arabic article textclass definition file. +# Author: Uwe Stöhr ([EMAIL PROTECTED]) + +Format 4 +Input article + +Style LatinOn + Margin Dynamic + LatexType Command + LatexName phantom{}{\aroff{} + KeepEmpty 1 + ParSkip 0.4 + Align Block + LabelSep xx + LabelType Static + LabelString "Latin on" + LabelFont + Series Bold + Color Blue + EndFont +End + +Style LatinOff + Margin Dynamic + LatexType Command + LatexName phantom{}} + KeepEmpty 1 + ParSkip 0.4 + Align Block + LabelSep xx + LabelType Static + LabelString "Latin off" + LabelFont + Series Bold + Color Green + EndFont +End
Property changes on: lib\layouts\armenian-article.layout ___________________________________________________________________ Name: svn:eol-style + native Index: lib/lyx2lyx/LyX.py =================================================================== --- lib/lyx2lyx/LyX.py (revision 18079) +++ lib/lyx2lyx/LyX.py (working copy) @@ -74,7 +74,7 @@ ("1_2", [220], generate_minor_versions("1.2" , 4)), ("1_3", [221], generate_minor_versions("1.3" , 7)), ("1_4", range(222,246), generate_minor_versions("1.4" , 4)), - ("1_5", range(246,266), generate_minor_versions("1.5" , 0))] + ("1_5", range(246,267), generate_minor_versions("1.5" , 0))] def formats_list(): Index: lib/lyx2lyx/lyx_1_5.py =================================================================== --- lib/lyx2lyx/lyx_1_5.py (revision 18079) +++ lib/lyx2lyx/lyx_1_5.py (working copy) @@ -1283,6 +1283,31 @@ i = i + 1 +def revert_armenian(document): + # Set document language from armenian to english an add the entry + # \usepackage{armtex} to the document preamble + if document.language == "armenian": + document.language = "english" + i = find_token(document.header, "\\language", 0) + if i != -1: + document.header[i] = "\\language english" + # check if preamble exists, if not k is set to -1 + i = 0 + k = -1 + while i < len(document.preamble): + if k == -1: + k = document.preamble[i].find("\\", 0, len(document.preamble[i])) + if k == -1: + k = document.preamble[i].find("%", 0, len(document.preamble[i])) + i = i + 1 + # set the armtex entry as the first preamble line + if k != -1: + document.preamble[0] = "\\usepackage{armtex}" + "\r" + document.preamble[0][0:] + # create the preamble when it doesn't exist + else: + document.preamble.append('\\usepackage{armtex}') + + ## # Conversion hub # @@ -1307,9 +1332,11 @@ [262, []], [263, [normalize_language_name]], [264, [convert_cv_textclass]], - [265, [convert_tableborder]]] + [265, [convert_tableborder]], + [266, []]] -revert = [[264, [revert_tableborder]], +revert = [[265, [revert_armenian]], + [264, [revert_tableborder]], [263, [revert_cv_textclass]], [262, [revert_language_name]], [261, [revert_ascii]], Index: lib/templates/Armenian-article.lyx =================================================================== --- lib/templates/Armenian-article.lyx (revision 0) +++ lib/templates/Armenian-article.lyx (revision 0) @@ -0,0 +1,186 @@ +#LyX 1.5.0svn created this file. For more info see http://www.lyx.org/ +\lyxformat 265 +\begin_document +\begin_header +\textclass armenian-article +\language armenian +\inputencoding auto +\font_roman default +\font_sans default +\font_typewriter default +\font_default_family default +\font_sc false +\font_osf false +\font_sf_scale 100 +\font_tt_scale 100 +\graphics default +\paperfontsize default +\spacing single +\papersize default +\use_geometry false +\use_amsmath 1 +\use_esint 1 +\cite_engine basic +\use_bibtopic false +\paperorientation portrait +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation skip +\defskip medskip +\quotes_language english +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tracking_changes false +\output_changes false +\author "usti" +\end_header + +\begin_body + +\begin_layout Part +Test +\end_layout + +\begin_layout Standard +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +today +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +«Իսկ ÕµÕ¡ÕµÕ½Õ´ ÕªÕ¡Õ´Õ¡Õ¶Õ¡Õ¯Õ« (ÕÕ¥ÖÕ¸ÖÕªÕ¡Õ¶Õ¶ Ô±ÖÕ®ÖÕ¸ÖÕ¶Õ« Õ¥Ö ÕÕ¡Õ°Õ¡Õ¶Õ¶ ÕÕ¡Õ´Õ«Õ¯Õ¸Õ¶Õ¥Õ¡Õ¶) Õ¡ÖÕ¥ÖÕ¥ÖÕ«Õ¶ Õ¦ÖÕ¡Õ²Õ¡ÖÕ½Õ¶, + Õ¥Ö Õ£Õ¥ÖÕ¥ÖÕ«Õ¶ Õ¦Õ¢Õ¶Õ¡Õ¯Õ¥Õ¡Õ¬Õ½Õ¶ Õ¡Õ¶Õ¤... + Õ¥Ö Õ¦Õ¡ÕµÕ¬ Õ£Õ¥ÖÕ¸ÖÕ©Õ«ÖÕ¶Õ½Õ Õ£Õ¡ÖÕ¡Õ¼Õ¡Ö Õ£Õ¡ÖÕ¡Õ¼Õ¡Ö, Õ¯Õ¸Õ²Õ´Õ¡Õ¶Ö +\series bold +Õ¯Õ¸Õ²Õ´Õ¡Õ¶Ö +\series default +, ÖÕ¸ÖÕ« ÖÕ¸ +\backslash +-ÖÕ«, Õ¦Õ¡Õ·ÕÕ¡ÖÕ°Õ« Õ¡Õ·ÕÕ¡ÖÕ°Õ«, Õ¡Õ®Õ«Õ¶ ÕªÕ¸Õ²Õ¸Õ¾Õ¥ÖÕ«Õ¶ Õ« ÖÕ¡ +\backslash +-Õ²Õ¡ÖÕ¶ ÕÕ¡ÕÕ³Õ¸ÖÕ¡Õ¶, Õ¦Õ« Õ¡Õ¶Õ¤ Õ§Ö Õ¦Ö ÖÕ¡ÕªÕ¸Õ²Õ¸Õ¾ Õ«ÖÖÕ¥Õ¡Õ¶Ö Õ¦Ö ÖÕ¡ÖÕ¶Â»Ö +\end_layout + +\begin_layout Standard +ÕÕ¥Õ¯ Ô±Õ¦Õ£ , ÕÕ¥Õ¯ ÕÕ·Õ¡Õ¯Õ¸ÖÕµÕ© +\end_layout + +\begin_layout LatinOn + +\end_layout + +\begin_layout Standard +All text between +\begin_inset Quotes eld +\end_inset + +Latin on +\begin_inset Quotes erd +\end_inset + + and +\begin_inset Quotes eld +\end_inset + +Latin off +\begin_inset Quotes erd +\end_inset + + is typeset in latin characters using a unofficial transliteration: +\end_layout + +\begin_layout Standard +ÕÕ¥ÖÕ¸ÖÕªÕ¡Õ¶Õ¶ Ô±ÖÕ®ÖÕ¸ÖÕ¶Õ« Õ¥Ö ÕÕ¡Õ°Õ¡Õ¶Õ¶ ÕÕ¡Õ´Õ«Õ¯Õ¸Õ¶Õ¥Õ¡Õ¶ +\end_layout + +\begin_layout Standard +Latin letters outside this environment are translated to Armenian letters. + To switch off Armenian inside a paragraph use the command +\end_layout + +\begin_layout Standard + +\series bold +{ +\backslash +aroff some text} +\end_layout + +\begin_layout Standard +where some text is your text that should not appear in Armenian, see the + example below. + (Don't forget the space behind +\series bold + +\backslash +aroff +\series default +). +\end_layout + +\begin_layout LatinOff + +\end_layout + +\begin_layout Standard +«Իսկ ÕµÕ¡ÕµÕ½Õ´ ÕªÕ¡Õ´Õ¡Õ¶Õ¡Õ¯Õ« +\begin_inset ERT +status collapsed + +\begin_layout Standard + +{ +\backslash +aroff +\end_layout + +\end_inset + +Test words. +\begin_inset ERT +status collapsed + +\begin_layout Standard + +} +\end_layout + +\end_inset + + Õ¡ÖÕ¥ÖÕ¥ÖÕ«Õ¶ Õ¦ÖÕ¡Õ²Õ¡ÖÕ½Õ¶, Õ¥Ö Õ£Õ¥ÖÕ¥ÖÕ«Õ¶ Õ¦Õ¢Õ¶Õ¡Õ¯Õ¥Õ¡Õ¬Õ½Õ¶ Õ¡Õ¶Õ¤... +\end_layout + +\begin_layout Standard +Latin letters are translated to Armenian letters when they are outside the + Latin environment. +\end_layout + +\begin_layout LatinOn + +\end_layout + +\begin_layout Standard +LyX uses the LaTeX-package ArmTeX to typeset Armenian. + For more informations about Armenian typesetting look at the documentation + of armTeX: +\newline +http://texcatalogue.sarovar.org/entries/armtex.html +\end_layout + +\begin_layout LatinOff + +\end_layout + +\end_body +\end_document Property changes on: lib\templates\Armenian-article.lyx ___________________________________________________________________ Name: svn:eol-style + native Index: src/Buffer.cpp =================================================================== --- src/Buffer.cpp (revision 18079) +++ src/Buffer.cpp (working copy) @@ -141,7 +141,7 @@ namespace { -int const LYX_FORMAT = 265; +int const LYX_FORMAT = 266; } // namespace anon