mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 05:01:49 +00:00
file format change: support for Armenian
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18155 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cf5a9defdd
commit
227f80157c
@ -1,6 +1,11 @@
|
|||||||
LyX file-format changes
|
LyX file-format changes
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
2007-04-29 Uwe Stöhr <uwestoehr@web.de>
|
||||||
|
|
||||||
|
* format incremented to 266:
|
||||||
|
Support for the Armenian language
|
||||||
|
|
||||||
2007-04-26 Uwe Stöhr <uwestoehr@web.de>
|
2007-04-26 Uwe Stöhr <uwestoehr@web.de>
|
||||||
|
|
||||||
* format incremented to 265: fix LyX's table border line handling
|
* format incremented to 265: fix LyX's table border line handling
|
||||||
|
@ -7,8 +7,9 @@ Function UpdateModifiedFiles
|
|||||||
File "${PRODUCT_SOURCEDIR}\bin\LyXLauncher.exe"
|
File "${PRODUCT_SOURCEDIR}\bin\LyXLauncher.exe"
|
||||||
File "${PRODUCT_SOURCEDIR}\bin\tex2lyx.exe" ; always here
|
File "${PRODUCT_SOURCEDIR}\bin\tex2lyx.exe" ; always here
|
||||||
SetOutPath "$INSTDIR\Resources"
|
SetOutPath "$INSTDIR\Resources"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\unicodesymbols"
|
File "${PRODUCT_SOURCEDIR}\Resources\encodings"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\languages"
|
File "${PRODUCT_SOURCEDIR}\Resources\languages"
|
||||||
|
File "${PRODUCT_SOURCEDIR}\Resources\unicodesymbols"
|
||||||
File /r "${PRODUCT_SOURCEDIR}\Resources\locale" ; always here
|
File /r "${PRODUCT_SOURCEDIR}\Resources\locale" ; always here
|
||||||
SetOutPath "$INSTDIR\Resources\bind"
|
SetOutPath "$INSTDIR\Resources\bind"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\bind\sciword.bind"
|
File "${PRODUCT_SOURCEDIR}\Resources\bind\sciword.bind"
|
||||||
@ -31,6 +32,7 @@ Function UpdateModifiedFiles
|
|||||||
SetOutPath "$INSTDIR\Resources\examples"
|
SetOutPath "$INSTDIR\Resources\examples"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\examples\CV-image.eps"
|
File "${PRODUCT_SOURCEDIR}\Resources\examples\CV-image.eps"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\examples\CV-image.png"
|
File "${PRODUCT_SOURCEDIR}\Resources\examples\CV-image.png"
|
||||||
|
File "${PRODUCT_SOURCEDIR}\Resources\examples\armenian-article.lyx"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\examples\europeCV.lyx"
|
File "${PRODUCT_SOURCEDIR}\Resources\examples\europeCV.lyx"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\examples\modernCV.lyx"
|
File "${PRODUCT_SOURCEDIR}\Resources\examples\modernCV.lyx"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\examples\simplecv.lyx"
|
File "${PRODUCT_SOURCEDIR}\Resources\examples\simplecv.lyx"
|
||||||
@ -43,6 +45,7 @@ Function UpdateModifiedFiles
|
|||||||
SetOutPath "$INSTDIR\Resources\images\math"
|
SetOutPath "$INSTDIR\Resources\images\math"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\images\math\super.xpm"
|
File "${PRODUCT_SOURCEDIR}\Resources\images\math\super.xpm"
|
||||||
SetOutPath "$INSTDIR\Resources\layouts"
|
SetOutPath "$INSTDIR\Resources\layouts"
|
||||||
|
File "${PRODUCT_SOURCEDIR}\Resources\layouts\armenian-article.layout"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\layouts\simplecv.layout"
|
File "${PRODUCT_SOURCEDIR}\Resources\layouts\simplecv.layout"
|
||||||
SetOutPath "$INSTDIR\Resources\lyx2lyx"
|
SetOutPath "$INSTDIR\Resources\lyx2lyx"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\lyx2lyx\LyX.py"
|
File "${PRODUCT_SOURCEDIR}\Resources\lyx2lyx\LyX.py"
|
||||||
|
@ -2379,6 +2379,7 @@ lib_examples_files = Split('''
|
|||||||
aas_sample.lyx
|
aas_sample.lyx
|
||||||
amsart-test.lyx
|
amsart-test.lyx
|
||||||
amsbook-test.lyx
|
amsbook-test.lyx
|
||||||
|
armenian-article.lyx
|
||||||
beamer-g4-mask.jpg
|
beamer-g4-mask.jpg
|
||||||
beamer-g4.jpg
|
beamer-g4.jpg
|
||||||
beamer-icsi-logo.pdf
|
beamer-icsi-logo.pdf
|
||||||
@ -2595,6 +2596,7 @@ lib_layouts_files = Split('''
|
|||||||
amsmaths.inc
|
amsmaths.inc
|
||||||
apa.layout
|
apa.layout
|
||||||
arab-article.layout
|
arab-article.layout
|
||||||
|
armenian-article.layout
|
||||||
article.layout
|
article.layout
|
||||||
beamer.layout
|
beamer.layout
|
||||||
book.layout
|
book.layout
|
||||||
|
@ -180,6 +180,7 @@ dist_examples_DATA = \
|
|||||||
examples/aas_sample.lyx \
|
examples/aas_sample.lyx \
|
||||||
examples/amsart-test.lyx \
|
examples/amsart-test.lyx \
|
||||||
examples/amsbook-test.lyx \
|
examples/amsbook-test.lyx \
|
||||||
|
examples/armenian-article.lyx \
|
||||||
examples/beamer-g4.jpg \
|
examples/beamer-g4.jpg \
|
||||||
examples/beamer-g4-mask.jpg \
|
examples/beamer-g4-mask.jpg \
|
||||||
examples/beamer-icsi-logo.pdf \
|
examples/beamer-icsi-logo.pdf \
|
||||||
@ -893,6 +894,7 @@ dist_layouts_DATA =\
|
|||||||
layouts/amsmaths.inc \
|
layouts/amsmaths.inc \
|
||||||
layouts/apa.layout \
|
layouts/apa.layout \
|
||||||
layouts/arab-article.layout \
|
layouts/arab-article.layout \
|
||||||
|
layouts/armenian-article.layout \
|
||||||
layouts/article.layout \
|
layouts/article.layout \
|
||||||
layouts/beamer.layout \
|
layouts/beamer.layout \
|
||||||
layouts/book.layout \
|
layouts/book.layout \
|
||||||
|
@ -16,6 +16,10 @@ End
|
|||||||
Encoding utf8x utf8x UTF-8
|
Encoding utf8x utf8x UTF-8
|
||||||
End
|
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
|
Encoding iso8859-1 latin1 ISO-8859-1
|
||||||
End
|
End
|
||||||
|
|
||||||
|
186
lib/examples/Armenian-article.lyx
Normal file
186
lib/examples/Armenian-article.lyx
Normal file
@ -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
|
@ -2,6 +2,10 @@
|
|||||||
afrikaans afrikaans "Afrikaans" false iso8859-15 af_ZA ""
|
afrikaans afrikaans "Afrikaans" false iso8859-15 af_ZA ""
|
||||||
american american "American" false iso8859-15 en_US ""
|
american american "American" false iso8859-15 en_US ""
|
||||||
arabic arabic "Arabic" true cp1256 ar_SA ""
|
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
|
||||||
|
# the english option can later be omitted when the patch for bug 3043 is in.
|
||||||
|
armenian english "Armenian" false armscii8 hy_AM ""
|
||||||
austrian austrian "Austrian" false iso8859-15 de_AT ""
|
austrian austrian "Austrian" false iso8859-15 de_AT ""
|
||||||
naustrian naustrian "Austrian (new spelling)" false iso8859-15 de_AT ""
|
naustrian naustrian "Austrian (new spelling)" false iso8859-15 de_AT ""
|
||||||
bahasa bahasa "Bahasa" false iso8859-15 in_ID ""
|
bahasa bahasa "Bahasa" false iso8859-15 in_ID ""
|
||||||
|
39
lib/layouts/armenian-article.layout
Normal file
39
lib/layouts/armenian-article.layout
Normal file
@ -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 (uwestoehr@web.de)
|
||||||
|
|
||||||
|
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
|
@ -74,7 +74,7 @@ format_relation = [("0_06", [200], generate_minor_versions("0.6" , 4)),
|
|||||||
("1_2", [220], generate_minor_versions("1.2" , 4)),
|
("1_2", [220], generate_minor_versions("1.2" , 4)),
|
||||||
("1_3", [221], generate_minor_versions("1.3" , 7)),
|
("1_3", [221], generate_minor_versions("1.3" , 7)),
|
||||||
("1_4", range(222,246), generate_minor_versions("1.4" , 4)),
|
("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():
|
def formats_list():
|
||||||
|
@ -1283,6 +1283,36 @@ def revert_tableborder(document):
|
|||||||
i = i + 1
|
i = i + 1
|
||||||
|
|
||||||
|
|
||||||
|
def revert_armenian(document):
|
||||||
|
# Set document language from armenian to english an
|
||||||
|
if document.language == "armenian":
|
||||||
|
document.language = "english"
|
||||||
|
i = find_token(document.header, "\\language", 0)
|
||||||
|
if i != -1:
|
||||||
|
document.header[i] = "\\language english"
|
||||||
|
# set inputencoding from armscii8 to auto
|
||||||
|
if document.inputencoding == "armscii8":
|
||||||
|
i = find_token(document.header, "\\inputencoding", 0)
|
||||||
|
if i != -1:
|
||||||
|
document.header[i] = "\\inputencoding auto"
|
||||||
|
# add the entry \usepackage{armtex} to the document preamble
|
||||||
|
# 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
|
# Conversion hub
|
||||||
#
|
#
|
||||||
@ -1307,9 +1337,11 @@ convert = [[246, []],
|
|||||||
[262, []],
|
[262, []],
|
||||||
[263, [normalize_language_name]],
|
[263, [normalize_language_name]],
|
||||||
[264, [convert_cv_textclass]],
|
[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]],
|
[263, [revert_cv_textclass]],
|
||||||
[262, [revert_language_name]],
|
[262, [revert_language_name]],
|
||||||
[261, [revert_ascii]],
|
[261, [revert_ascii]],
|
||||||
|
@ -141,7 +141,7 @@ using std::string;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
int const LYX_FORMAT = 265;
|
int const LYX_FORMAT = 266;
|
||||||
|
|
||||||
} // namespace anon
|
} // namespace anon
|
||||||
|
|
||||||
|
@ -923,6 +923,13 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
|||||||
texrow.newline();
|
texrow.newline();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The encoding "armscii8" is only available when the package "armtex" is loaded.
|
||||||
|
// armscii8 is used for Armenian.
|
||||||
|
if (language->encoding()->latexName() == "armscii8" || inputenc == "armscii8") {
|
||||||
|
os << "\\usepackage{armtex}\n";
|
||||||
|
texrow.newline();
|
||||||
|
}
|
||||||
|
|
||||||
if (use_geometry || nonstandard_papersize) {
|
if (use_geometry || nonstandard_papersize) {
|
||||||
os << "\\usepackage{geometry}\n";
|
os << "\\usepackage{geometry}\n";
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
|
Loading…
Reference in New Issue
Block a user