%%%%%%%%%%%%%%%%%%%%%%%%%%% asmo449.sty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % asmo449.sty % Scanner for ASMO 449 Code (ISO 9036) % to install it, include it as a LaTeX style option "asmo449" % with Plain TeX, say "\input asmo449.sty" % to activate it, say "\setcode {asmo449}" or "\setcode {iso9036}" % 18.03.96 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % (c) Klaus Lagally % Institut fuer Informatik % Universitaet Stuttgart %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifx \asmoatcode \undefined \else \expandafter \endinput \fi % load only once \chardef \asmoatcode = \catcode`\@ \catcode`\@ = 11 \a@ident {asmo449.sty} {3.04 ASMO449 input encoding } {18.03.96} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % dynamic definitions for Arabic {\catcode `\ =9 \catcode `\^^M=9 \catcode `\^^I=9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \gdef \setasmo@codes {% activate and change some codes \globaldefs=1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def \sc@A {Q|} \def \sc@B {QA} \def \sc@C {Qa} \def \sc@D {Qw} \def \sc@E {Qi} \def \sc@F {Qy} \def \sc@G {A} \def \sc@H {b} \def \sc@I {T} \def \sc@J {t} \def \sc@K {C} \def \sc@L {G} \def \sc@M {H} \def \sc@N {X} \def \sc@O {d} \def \sc@P {F} \def \sc@Q {r} \def \sc@R {z} \def \sc@S {s} \def \sc@T {x} \def \sc@U {S} \def \sc@V {D} \def \sc@W {V} \def \sc@X {Z} \def \sc@Y {P} \def \sc@Z {R} \def \sc@a {f} \def \sc@b {q} \def \sc@c {k} \def \sc@d {l} \def \sc@e {m} \def \sc@f {n} \def \sc@g {h} \def \sc@h {w} \def \sc@i {Y} \def \sc@j {y} \def \sc@k {"aN} \def \sc@l {"uN} \def \sc@m {"iN} \def \sc@n {"a} \def \sc@o {"u} \def \sc@p {"i} \def \sc@q {@} \def \sc@r {""} \def \sc@s {@} \def \sc@t {@} \def \sc@u {@} \def \sc@v {@} \def \sc@w {@} \def \sc@x {@} \def \sc@y {@} \def \sc@z {@} \def \sc@@ {@} \a@digits = {0123456789} \a@paren = {()[]} \a@first = {"`} \globaldefs=0 } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% }% end of dynamic definitions for Arabic %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def \asmo@beg #1#2{% start ASMO 449 scanner \h@mzafalse \iz@fetfalse \novocalize % because of explicit quoting \def \next {\asmo@word #1#2}% \ifx #1\@ \def \next {\sc@endscan #2}\else % finished \ifx #1G\def \next {\asmo@alif #2}\else \ifx #1"\def \next {\asmo@lquote #2}\else \ifx #1/\global \a@tokens ={#1}\def \next {\asmo@word #2}% x> \fi\fi\fi\fi \next } {\catcode `\^^M=13 \gdef \asmo@word #1#2{% transform input into internal notation \def \next {\asmo@word #2}% \ifx #1\@ \def \next {\sc@endscan #2}\else % finished \ifx #1`\def \next {\asmo@tatweel #2}\else % \ifx #1-\def \next {\asmo@minus #2}\else % \ifx #1"\def \next {\asmo@rquote #2}\else % \ifx #1/\def \next {\sc@back #1#2}\else % \if \nxp ^^M\nxp #1\def \next {\asmo@par #1#2}\else % active character \ifx #1#2\def \next {\asmo@word #1-#2}\else % \ifx #2q\def \next {\asmo@word #1}\else % \ifx #2s\def \next {\asmo@word #1k}\else % \ifx #2t\def \next {\asmo@word #1l}\else % \ifx #2u\def \next {\asmo@word #1m}\else % \ifx #2v\def \next {\asmo@word #1n}\else % \ifx #2w\def \next {\asmo@word #1o}\else % \ifx #2x\def \next {\asmo@word #1p}\else % \fi\fi\fi\fi\fi\fi\fi % \ifcat a\nxp #1\edef \sc@char {\csname sc@#1\endcsname }% \else \def \sc@char {\nxp #1}% \fi % \sc@put % \fi % \fi\fi\fi\fi\fi\fi \next }% } % catcode 13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def \asmo@alif {% alif at the beginning of a word \def \sc@char {a}\sc@put \asmo@word } \def \asmo@minus {% hyphen between words \def \sc@char {-}\sc@put \asmo@beg } \def \asmo@lquote {% left quote \def \sc@char {`}\sc@put \asmo@beg } \def \asmo@tatweel {% code ` \def \sc@char {B}\sc@put \asmo@word } \def \asmo@rquote {% right quote \def \sc@char {'}\sc@put \asmo@word } \def \asmo@par #1\@ \@@ {% new line, push back the rest \sc@back \\ #1\@ \@@ } \def \asmo@endscan {\global\let \a@scan \a@@scan } \def \asmo@endscan \@@ {\global\let \a@scan \a@@scan } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def \a@asmo {asmo449} \def \a@ASMO {ASMO449} \def \iso@asmo {iso9036} \let \asmo@setcode \setcode \def \set@asmo {% substitute ASMO 449 scanner \let \sc@beg \asmo@beg \let \sc@word \asmo@word \let \sc@back \sc@@back \let \sc@endscan \sc@@endscan \let \a@scan \a@@scan \setasmo@codes \message {input coding set to ASMO 449 (ISO 9036) conventions}} \def \setcode #1{\def \next {#1}% switch input coding \ifx \next \a@asmo \set@asmo \else \ifx \next \a@ASMO \set@asmo \else \ifx \next \iso@asmo \set@asmo \else \asmo@setcode {#1} \fi\fi\fi } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \message {scanner for code ASMO 449 (ISO 9036) installed.} \catcode `\@ = \asmoatcode \endinput %%%%%%%%%%%%%%%%%%%%%%%% EOF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%