%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% This is the `armkb-a8.tex' file (ArmSCII8 input encoding for plain).
%%
%% This file is a part of the ArmTeX project [2022/08/14 v3.0-beta4]
%%
%% ArmTeX is a system for writing in Armenian with plain TeX and/or LaTeX(2e).
%%
%% Copyright 1997 - 2022:
%%   Serguei Dachian (Serguei.Dachian_AT_univ-lille.fr),
%%   Arnak Dalalyan  (arnak.dalalyan_AT_ensae.fr),
%%   Vardan Akopian  (vakopian_AT_yahoo.com).
%%
%% ArmTeX may be distributed and/or modified under the conditions of the LaTeX
%% Project Public License, either version 1.3 of this license or (at your
%% option) any later version.
%%
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
%% ArmTeX has the LPPL maintenance status `author-maintained'.
%%
%% For more details, installation instructions and the complete list of files
%% see the provided `README' file.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
%% Making '@' letter.
%%
\catcode`\@=11
%
%
%% Begining of the code.
%%
\def\Arm@DeclareInputText#1#2{%
  \bgroup
    \uccode`\~#1%
    \uppercase{%
  \egroup
    \catcode`~=13%
    \def~%
  }{#2}%
}%
%
%
%% Upper-case letters.
%%
\def\Arm@DeclareInputUcLetter#1#2{%
  \Arm@DeclareInputText{#1}{#2}%
  \count255=#1%
  \advance\count255 by 1%
  \uccode#1=#1%
  \lccode#1=\count255%
}%
%
\Arm@DeclareInputUcLetter{178}{\Armayb}%           Upper-case A  (Ayb)  letter.
\Arm@DeclareInputUcLetter{180}{\Armben}%           Upper-case B  (Ben)  letter.
\Arm@DeclareInputUcLetter{182}{\Armgim}%           Upper-case G  (Gim)  letter.
\Arm@DeclareInputUcLetter{184}{\Armda}%            Upper-case D  (Da)   letter.
\Arm@DeclareInputUcLetter{186}{\Armyech}%          Upper-case E  (Yech) letter.
\Arm@DeclareInputUcLetter{188}{\Armza}%            Upper-case Z  (Za)   letter.
\Arm@DeclareInputUcLetter{190}{\Arme}%             Upper-case E' (E)    letter.
\Arm@DeclareInputUcLetter{192}{\Armat}%            Upper-case U' (At)   letter.
\Arm@DeclareInputUcLetter{194}{\Armto}%            Upper-case TH (To)   letter.
\Arm@DeclareInputUcLetter{196}{\Armzhe}%           Upper-case G' (Zhe)  letter.
\Arm@DeclareInputUcLetter{198}{\Armini}%           Upper-case I  (Ini)  letter.
\Arm@DeclareInputUcLetter{200}{\Armlyun}%          Upper-case L  (Lyun) letter.
\Arm@DeclareInputUcLetter{202}{\Armkhe}%           Upper-case X  (Khe)  letter.
\Arm@DeclareInputUcLetter{204}{\Armtsa}%           Upper-case C' (Tsa)  letter.
\Arm@DeclareInputUcLetter{206}{\Armken}%           Upper-case K  (Ken)  letter.
\Arm@DeclareInputUcLetter{208}{\Armho}%            Upper-case H  (Ho)   letter.
\Arm@DeclareInputUcLetter{210}{\Armdza}%           Upper-case DZ (Dza)  letter.
\Arm@DeclareInputUcLetter{212}{\Armghat}%          Upper-case GH (Ghat) letter.
\Arm@DeclareInputUcLetter{214}{\Armtche}%          Upper-case J' (Tche) letter.
\Arm@DeclareInputUcLetter{216}{\Armmen}%           Upper-case M  (Men)  letter.
\Arm@DeclareInputUcLetter{218}{\Armhi}%            Upper-case Y  (Hi)   letter.
\Arm@DeclareInputUcLetter{220}{\Armnu}%            Upper-case N  (Nu)   letter.
\Arm@DeclareInputUcLetter{222}{\Armsha}%           Upper-case SH (Sha)  letter.
\Arm@DeclareInputUcLetter{224}{\Armvo}%            Upper-case O  (Vo)   letter.
\Arm@DeclareInputUcLetter{226}{\Armcha}%           Upper-case CH (Cha)  letter.
\Arm@DeclareInputUcLetter{228}{\Armpe}%            Upper-case P  (Pe)   letter.
\Arm@DeclareInputUcLetter{230}{\Armje}%            Upper-case J  (Je)   letter.
\Arm@DeclareInputUcLetter{232}{\Armra}%            Upper-case R' (Ra)   letter.
\Arm@DeclareInputUcLetter{234}{\Armse}%            Upper-case S  (Se)   letter.
\Arm@DeclareInputUcLetter{236}{\Armvev}%           Upper-case V  (Vev)  letter.
\Arm@DeclareInputUcLetter{238}{\Armtyun}%          Upper-case T  (Tyun) letter.
\Arm@DeclareInputUcLetter{240}{\Armre}%            Upper-case R  (Re)   letter.
\Arm@DeclareInputUcLetter{242}{\Armtso}%           Upper-case C  (Tso)  letter.
\Arm@DeclareInputUcLetter{244}{\Armvyun}%          Upper-case W  (Vyun) letter.
\Arm@DeclareInputUcLetter{246}{\Armpyur}%          Upper-case PH (Pyur) letter.
\Arm@DeclareInputUcLetter{248}{\Armke}%            Upper-case Q  (Ke)   letter.
\Arm@DeclareInputUcLetter{250}{\Armo}%             Upper-case O' (O)    letter.
\Arm@DeclareInputUcLetter{252}{\Armfe}%            Upper-case F  (Fe)   letter.
%
%
%% Lower-case letters.
%%
\def\Arm@DeclareInputLcLetter#1#2{%
  \Arm@DeclareInputText{#1}{#2}%
  \count255=#1%
  \advance\count255 by -1%
  \lccode#1=#1%
  \uccode#1=\count255%
}%
%
\Arm@DeclareInputLcLetter{179}{\armayb}%           Lower-case a  (ayb)  letter.
\Arm@DeclareInputLcLetter{181}{\armben}%           Lower-case b  (ben)  letter.
\Arm@DeclareInputLcLetter{183}{\armgim}%           Lower-case g  (gim)  letter.
\Arm@DeclareInputLcLetter{185}{\armda}%            Lower-case d  (da)   letter.
\Arm@DeclareInputLcLetter{187}{\armyech}%          Lower-case e  (eych) letter.
\Arm@DeclareInputLcLetter{189}{\armza}%            Lower-case z  (za)   letter.
\Arm@DeclareInputLcLetter{191}{\arme}%             Lower-case e' (e)    letter.
\Arm@DeclareInputLcLetter{193}{\armat}%            Lower-case u' (at)   letter.
\Arm@DeclareInputLcLetter{195}{\armto}%            Lower-case th (to)   letter.
\Arm@DeclareInputLcLetter{197}{\armzhe}%           Lower-case g' (zhe)  letter.
\Arm@DeclareInputLcLetter{199}{\armini}%           Lower-case i  (ini)  letter.
\Arm@DeclareInputLcLetter{201}{\armlyun}%          Lower-case l  (lyun) letter.
\Arm@DeclareInputLcLetter{203}{\armkhe}%           Lower-case x  (khe)  letter.
\Arm@DeclareInputLcLetter{205}{\armtsa}%           Lower-case c' (tsa)  letter.
\Arm@DeclareInputLcLetter{207}{\armken}%           Lower-case k  (ken)  letter.
\Arm@DeclareInputLcLetter{209}{\armho}%            Lower-case h  (ho)   letter.
\Arm@DeclareInputLcLetter{211}{\armdza}%           Lower-case dz (dza)  letter.
\Arm@DeclareInputLcLetter{213}{\armghat}%          Lower-case gh (ghat) letter.
\Arm@DeclareInputLcLetter{215}{\armtche}%          Lower-case j' (tche) letter.
\Arm@DeclareInputLcLetter{217}{\armmen}%           Lower-case m  (men)  letter.
\Arm@DeclareInputLcLetter{219}{\armhi}%            Lower-case y  (hi)   letter.
\Arm@DeclareInputLcLetter{221}{\armnu}%            Lower-case n  (nu)   letter.
\Arm@DeclareInputLcLetter{223}{\armsha}%           Lower-case sh (sha)  letter.
\Arm@DeclareInputLcLetter{225}{\armvo}%            Lower-case o  (vo)   letter.
\Arm@DeclareInputLcLetter{227}{\armcha}%           Lower-case ch (cha)  letter.
\Arm@DeclareInputLcLetter{229}{\armpe}%            Lower-case p  (pe)   letter.
\Arm@DeclareInputLcLetter{231}{\armje}%            Lower-case j  (je)   letter.
\Arm@DeclareInputLcLetter{233}{\armra}%            Lower-case r' (ra)   letter.
\Arm@DeclareInputLcLetter{235}{\armse}%            Lower-case s  (se)   letter.
\Arm@DeclareInputLcLetter{237}{\armvev}%           Lower-case v  (vev)  letter.
\Arm@DeclareInputLcLetter{239}{\armtyun}%          Lower-case t  (tyun) letter.
\Arm@DeclareInputLcLetter{241}{\armre}%            Lower-case r  (re)   letter.
\Arm@DeclareInputLcLetter{243}{\armtso}%           Lower-case c  (tso)  letter.
\Arm@DeclareInputLcLetter{245}{\armvyun}%          Lower-case w  (vyun) letter.
\Arm@DeclareInputLcLetter{247}{\armpyur}%          Lower-case ph (pyur) letter.
\Arm@DeclareInputLcLetter{249}{\armke}%            Lower-case q  (ke)   letter.
\Arm@DeclareInputLcLetter{251}{\armo}%             Lower-case o' (o)    letter.
\Arm@DeclareInputLcLetter{253}{\armfe}%            Lower-case f  (fe)   letter.
%
%
%% Miscelanious symbols.
%%
\Arm@DeclareInputText{160}{~}%                 Non-breakable space             symbol.
\Arm@DeclareInputText{161}{\armeternity}%      Eternity (armeternity)          symbol.
\Arm@DeclareInputText{162}{\armsection}%       Section sign (armsection)       symbol.
\Arm@DeclareInputText{163}{\armfullstop}%      Verjaket (armfullstop)          symbol.
\Arm@DeclareInputText{164}{\armparenright}%    Aj phakagic' (armparenright)    symbol.
\Arm@DeclareInputText{165}{\armparenleft}%     Dzax phakagic' (armparenleft)   symbol.
\Arm@DeclareInputText{166}{\armquotright}%     Aj chakert (armquotright)       symbol.
\Arm@DeclareInputText{167}{\armquotleft}%      Dzax chakert(armquotleft)       symbol.
\Arm@DeclareInputText{168}{\armemdash}%        Anjatman gic' (armemdash)       symbol.
\Arm@DeclareInputText{169}{\armdot}%           Mijaket (armdot)                symbol.
\Arm@DeclareInputText{170}{\armsep}%           Buth (armsep)                   symbol.
\Arm@DeclareInputText{171}{\armcomma}%         Storaket (armcoma)              symbol.
\Arm@DeclareInputText{172}{\armendash}%        Miuthyan gc'ik (armendash)      symbol.
\Arm@DeclareInputText{173}{\armyentamna}%      Toghadardzi nshan (armyentamna) symbol.
\Arm@DeclareInputText{174}{\armellipsis}%      Kaxman keter (armellipsis)      symbol.
\Arm@DeclareInputText{175}{\armexclam}%        Bacakanchakan nshan (armexclam) symbol.
\Arm@DeclareInputText{176}{\armaccent}%        Shesht (armaccent)              symbol.
\Arm@DeclareInputText{177}{\armquestion}%      Harcakan nshan (armquestion)    symbol.
\Arm@DeclareInputText{254}{\armapostrophe}%    Apatharc (armapostrophe)        symbol.
% Coding "armapostrophe" as 255 (except as 254), since it can
% be found in that position in many ArmSCII8 fonts.
\Arm@DeclareInputText{255}{\armapostrophe}%    Apatharc (armapostrophe)        symbol.
%
%
%% Providing a command to define armew.
%%
\def\definearmew@error@a{%
  \errmessage{Character used to define armew must have a charcode between 128
  and 255}%
}%
%
\def\definearmew@error@b{%
  \errmessage{Optional argument of \noexpand\definearmew must differ from the
  character's charcode}%
}%
%
\def\definearmew@error@c{%
  \errmessage{Optional argument of \noexpand\definearmew must be between 128
  and 255}%
}%
%
\def\Arm@definearmew@two[#1]#2{%
  \count255=`#2\relax
  \ifnum \count255 < 128\definearmew@error@a\else
  \ifnum \count255 > 255\definearmew@error@a\else
  \ifnum \count255 = #1\definearmew@error@b\else
  \ifnum #1 < 128\definearmew@error@c\else
  \ifnum #1 > 255\definearmew@error@c\else
  \Arm@DeclareInputText{\count255}{\armew}%
  \Arm@DeclareInputText{#1}{\Armyech\Armvev}%
  \uccode\count255=#1%
  \lccode\count255=\count255%
  \uccode#1=#1%
  \lccode#1=\count255%
  \fi\fi\fi\fi\fi
}%
%
\def\Arm@definearmew@one#1{%
  \Arm@definearmew@two[159]{#1}%
}%
%
\let\Arm@leftbracket=[\relax
\def\definearmew{\futurelet\Arm@nextchar\Arm@definearmew}%
\def\Arm@definearmew{%
  \ifx\Arm@nextchar\Arm@leftbracket
    \expandafter\Arm@definearmew@two
  \else
    \expandafter\Arm@definearmew@one
  \fi
}%
%
%
%% Making '@' other.
%%
\catcode`\@=12
%
%
%% That's all, Folks!
%%
\endinput
