summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/polyglossia/gloss-amharic.ldf
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/polyglossia/gloss-amharic.ldf')
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-amharic.ldf203
1 files changed, 203 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-amharic.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-amharic.ldf
new file mode 100644
index 00000000000..9a33de9fb90
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-amharic.ldf
@@ -0,0 +1,203 @@
+\ProvidesFile{gloss-amharic.ldf}[polyglossia: module for amharic]
+\PolyglossiaSetup{amharic}{
+ script=Ethiopic,
+ scripttag=ethi,
+ langtag=AMH,
+ hyphennames={amharic,nohyphenation},
+ %hyphenmins={2,2},
+ fontsetup=true,
+ %TODO localalph=ethnum
+}
+
+\def\captionsamharic{%
+ \def\refname{የነሥ ጹሁፍ ምንጭ}%
+ \def\abstractname{አኅጽተሮ ጽሁፍ}%
+ \def\bibname{ቢዋ መጽሃፍት}%
+ \def\prefacename{መቅድም}%
+ \def\chaptername{ክፍል}%
+ \def\appendixname{መድበል}%
+ \def\contentsname{ይዘት}%
+ \def\listfigurename{የሥዕችሎ ማውጫ}%
+ \def\listtablename{የሰንጠዥረ ማውጫ}%
+ \def\indexname{ምህጻር ቃል}%
+ \def\figurename{ሥዕል}%
+ \def\tablename{ሰንጠረዥ}%
+ %\def\thepart{}%
+ \def\partname{ንዑስ ክፍል}%
+ \def\pagename{ገጽ}%
+ \def\seename{ይመልከቱ}%
+ \def\alsoname{ይህምን ይመልከቱ}%
+ \def\enclname{አባሪዎች}%
+ \def\ccname{ግልባጭ}%
+ \def\headtoname{ለ}%
+ \def\proofname{ማረጋገጫ}%
+ %\def\glossaryname{<++>}%
+ }
+
+\newcommand{\eth@monthname}[1]{\ifcase#1\or
+ መስከረም\or
+ ጥቅምት\or
+ ህዳር\or
+ ታህሳስ\or
+ ጥር\or
+ የካቲት\or
+ መጋቢት\or
+ ሚያዝያ\or
+ ግንቦት\or
+ ሰኔ\or
+ ሐምሌ\or
+ ነሐሴ\or
+ ጰጉሜን\fi
+}
+\newcount\ethcnt@temp
+\newcount\ethcnt@modtemp
+\newcount\ethcnt@leap
+\newcount\ethcnt@yminone
+\newcount\ethcnt@days
+\newcount\ethcnt@jdn
+\newcount\ethcnt@cycle
+\newcount\ethcnt@ethdays
+\newcount\ethcnt@ethyear
+\newcount\ethcnt@ethmonth
+\newcount\ethcnt@ethday
+\newcommand{\eth@modulo}[2]{%
+ \ethcnt@modtemp=#1%
+ \divide\ethcnt@modtemp by #2%
+ \multiply\ethcnt@modtemp by #2%
+ \advance#1 by -\ethcnt@modtemp
+}
+\def\dateamharic{%
+ \def\today{{%
+ \ethcnt@yminone=\year
+ \advance\ethcnt@yminone by -1
+ \ethcnt@leap=\year
+ \divide\ethcnt@leap by 4
+ \ethcnt@temp=\ethcnt@yminone
+ \divide\ethcnt@temp by 4
+ \advance\ethcnt@leap by -\ethcnt@temp
+ \ethcnt@temp=\year
+ \divide\ethcnt@temp by 100
+ \advance\ethcnt@leap by -\ethcnt@temp
+ \ethcnt@temp=\ethcnt@yminone
+ \divide\ethcnt@temp by 100
+ \advance\ethcnt@leap by \ethcnt@temp
+ \ethcnt@temp=\year
+ \divide\ethcnt@temp by 400
+ \advance\ethcnt@leap by \ethcnt@temp
+ \ethcnt@temp=\ethcnt@yminone
+ \divide\ethcnt@temp by 400
+ \advance\ethcnt@leap by -\ethcnt@temp
+ \ifnum\month<3
+ \ethcnt@days=\month
+ \advance\ethcnt@days by -1
+ \multiply\ethcnt@days by 31
+ \advance\ethcnt@days by \day
+ \advance\ethcnt@days by -1
+ \else
+ \ethcnt@days=\month
+ \advance\ethcnt@days by -1
+ \multiply\ethcnt@days by 30
+ \advance\ethcnt@days by \day
+ \advance\ethcnt@days by \ethcnt@leap
+ \advance\ethcnt@days by -3
+ \ethcnt@temp=\month
+ \multiply\ethcnt@temp by 3
+ \advance\ethcnt@temp by -2
+ \divide\ethcnt@temp by 5
+ \advance\ethcnt@days by \ethcnt@temp
+ \fi
+ \ethcnt@jdn=\ethcnt@days
+ \advance\ethcnt@jdn by 1721426
+ \ethcnt@temp=\ethcnt@yminone
+ \multiply\ethcnt@temp by 365
+ \advance\ethcnt@jdn by \ethcnt@temp
+ \ethcnt@temp=\ethcnt@yminone
+ \divide\ethcnt@temp by 4
+ \advance\ethcnt@jdn by \ethcnt@temp
+ \ethcnt@temp=\ethcnt@yminone
+ \divide\ethcnt@temp by 100
+ \advance\ethcnt@jdn by -\ethcnt@temp
+ \ethcnt@temp=\ethcnt@yminone
+ \divide\ethcnt@temp by 400
+ \advance\ethcnt@jdn by \ethcnt@temp
+ \ethcnt@cycle=\ethcnt@jdn
+ \advance\ethcnt@cycle by -1723856
+ \eth@modulo{\ethcnt@cycle}{1461}%
+ \ethcnt@ethdays=\ethcnt@cycle
+ \eth@modulo{\ethcnt@ethdays}{365}%
+ \ethcnt@temp=\ethcnt@cycle
+ \divide\ethcnt@temp by 1460
+ \multiply\ethcnt@temp by 365
+ \advance\ethcnt@ethdays by \ethcnt@temp
+ \ethcnt@ethyear=\ethcnt@jdn
+ \advance\ethcnt@ethyear by -1723856
+ \divide\ethcnt@ethyear by 1461
+ \multiply\ethcnt@ethyear by 4
+ \ethcnt@temp=\ethcnt@cycle
+ \divide\ethcnt@temp by 365
+ \advance\ethcnt@ethyear by \ethcnt@temp
+ \divide\ethcnt@cycle by 1460
+ \advance\ethcnt@ethyear by -\ethcnt@cycle
+ \ethcnt@ethmonth=\ethcnt@ethdays
+ \divide\ethcnt@ethmonth by 30
+ \advance\ethcnt@ethmonth by 1
+ \ethcnt@ethday=\ethcnt@ethdays
+ \eth@modulo{\ethcnt@ethday}{30}%
+ \advance\ethcnt@ethday by 1%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \eth@monthname{\ethcnt@ethmonth}\relax\space%
+ \number\ethcnt@ethday\relax\space%
+ \number\ethcnt@ethyear%
+ }}%
+}
+
+\def\ethiop#1{\expandafter\@ethiop\csname c@#1\endcsname}
+\def\@ethiop#1{{%
+ \ifnum#1<1\relax\ethnum@err{#1}%
+ \else\ifnum#1<10\relax\expandafter\ethnum@one\number #1%
+ \else\ifnum#1<100\relax\expandafter\ethnum@two\number #1%
+ \else\ifnum#1<1000\relax\expandafter\ethnum@three\number #1%
+ \else\ifnum#1<10000\relax\expandafter\ethnum@four\number #1%
+ \else\ifnum#1<100000\relax\expandafter\ethnum@five\number #1%
+ \else\ifnum#1<1000000\relax\expandafter\ethnum@six\number #1%
+ \else%
+ \ethnum@err%
+ \number#1%
+ \fi\fi\fi\fi\fi\fi\fi%
+}}
+\let\ethnum\@ethiop
+\newcommand{\ethnum@tens}[1]{%
+ \ifcase#1\or ፲\or ፳\or ፴%
+ \or ፵\or ፶\or ፷%
+ \or ፸\or ፹\or ፺\fi%
+}%
+\newcommand{\ethnum@one}[1]{%
+ \ifcase#1\or ፩\or ፪\or ፫%
+ \or ፬\or ፭\or ፮%
+ \or ፯\or ፰\or ፱\fi%
+}%
+\newcommand{\ethnum@two}[1]{%
+ \ethnum@tens#1%
+ \ethnum@one%
+}
+\newcommand{\ethnum@three}[1]{%
+ \ifnum#1>1\relax\ethnum@one#1\fi%
+ \ifnum#1>0\relax ፻\fi%
+ \ethnum@two%
+}
+\newcommand{\ethnum@four}[1]{%
+ \ethnum@tens#1%
+ \ifnum#1>0\relax ፻\fi%
+ \ethnum@three%
+}
+\newcommand{\ethnum@five}[1]{%
+ \ifnum#1>1\relax\ethnum@one#1\fi%
+ \ifnum#1>0\relax ፼\fi%
+ \ethnum@four%
+}
+\newcommand{\ethnum@six}[1]{%
+ \ethnum@tens#1%
+ \ifnum#1>0\relax ፼\fi%
+ \ethnum@five%
+}
+