%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % atrans.sty % transcription module for ArabTeX % ZDMG Transcription % Encyclopedia of Islam Transcription % Modern Turkish Transcription % Urdu Transcription % 19.03.96 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % (c) Klaus Lagally % Institut fuer Informatik % Universitaet Stuttgart %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Additional Transcription Modes: % Encyclopedia Iranica [Standard Farsi] % Farsi [Modified Encyclopedia Iranica] % Lazard [Philological: Gilbert Lazard, etc.] % (c) Adrian Rezus [adriaan@{sci,cs}.kun.nl]: Nijmegen, Nederland % 21.12.95 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifx \transatcode \undefined \chardef \transatcode = \catcode`\@ \catcode`\@ = 11 \a@ident {atrans.sty} {3.04 generate the transliteration } {19.03.96} \else \xpa \endinput \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \gdef \a@trans #1>{% transcribe word \iftest@trans \iftest@scan \else \a@verb (#1)>\fi \tracingmacros=1 \fi \if@was \@vocaltrue \else \@vocalfalse \fi \tr@aword #1|||>>% \if@vocal \global \@wastrue \else \global \@wasfalse \fi \iftest@trans \tracingmacros=0 \fi } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newif \if@vocal \gdef \tr@aword #1#2{% transcribe rest of word \def \next {\tr@aword #2}% \ifx #1>\let \next \relax \else \ifx #1|\else \ifx #1"\else \ifx #1^\else \ifx #1--\else \ifcat #1-#1\@vocalfalse \else \ifx #1l\def \next {\tr@l #2}\else \ifx #1E\def \next {\tr@E #2}\else \ifx #1e\def \next {\tr@e #2}\else \ifx #1X\def \next {\tr@X #2}\else \ifx #1N\def \next {\tr@N #2}\else \ifx #1U\def \next {\tr@U #2}\else \ifx #1W\def \next {\tr@W #2}\else \ifx #1a\def \next {\tr@wasla #1#2}\else \ifx #1i\def \next {\tr@wasla #1#2}\else \ifx #1u\def \next {\tr@wasla #1#2}\else \ifx #1\a@a \def \next {\tr@A \kill@alif #2}\else \@vocalfalse \csname tr@\string #1\endcsname \fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi \next } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \gdef \kill@alif #1{% delete alif or waw after N, U, W, _a \let \next \tr@aword \ifx #1a\else \ifx #1A\else \ifx #1I\else \ifx #1Y\else \ifx #1U\else \def \next {\tr@aword #1}% \fi\fi\fi\fi\fi \next } \gdef \killw@w #1{% handle w after _h (Persian): delete \def \next {\tr@aword #1}\@vocalfalse \ifiz@fet \ifx #1w\let \next \tr@aword \fi\fi \next } \gdef \superv@w #1{% handle w after _h (Persian): super v \def \next {\tr@aword #1}\@vocalfalse \ifiz@fet \ifx #1w$^v\!$\let\next\tr@aword \fi\fi \next } \gdef \superw@w #1{% handle w after _h (Persian): super w \def \next {\tr@aword #1}\@vocalfalse \ifiz@fet \ifx #1w$^w\!$\let\next\tr@aword \fi\fi \next } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \gdef \tr@l #1#2#3{% test assimilation after l \ifx #1-% l - \ifx #2l% l - l l-l\ifx #3l% l - ll \let \next \tr@aword \else \def \next {\tr@aword #3}% \fi \else \ifx #2Q% l - ' l-\tr@Q \let \next \tr@aword \else \ifx #2#3% l - x x \def \next {\tr@aword #2-#3}% \else l-\def \next {\tr@aword #2#3}% \fi\fi\fi \else l\def \next {\tr@aword #1#2#3}% \fi \@vocalfalse \next } \gdef \tr@wasla #1{% initial vowel, not Urdu or Ottoman \ift@rk \@vocalfalse \else \ifurd@ \@vocalfalse \fi\fi \ifh@mza \if@vocal '\else #1\fi \else #1\fi \@vocaltrue \tr@aword } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \gdef \s #1{\oalign{#1\crcr\hidewidth % accent for _h \vbox to.2ex{\hbox{\kern-0.25em\char'25}\vss}\hidewidth}} \gdef \x #1{\oalign{#1\crcr\hidewidth % accent for .s in Urdu \vbox to.2ex{\hbox{\kern-0.25em\char'177}\vss}\hidewidth}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def \tr@def #1#2{% define \tr@#1 as {#2} \xpa \gdef \csname tr@\string #1\endcsname {#2}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {\catcode `\ =9 \catcode `\^^M=9 \catcode `\^^I=9 \gdef \tr@zdmg {% define character macros for transliteration %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \gdef \tr@@ {{$\bullet $}}% substitute for illegal characters \gdef \tr@b {b} \gdef \tr@c {c} \gdef \tr@d {d} \gdef \tr@e ##1{% test for ee -> ey \def \next {\tr@aword ##1}\@vocaltrue \ifx ##1e\let \next \tr@aword ey\-\else e\fi \next} \gdef \tr@f {f} \gdef \tr@g {g} \gdef \tr@h {h} \gdef \tr@j {\v{z}} \gdef \tr@k {k} \gdef \tr@m {m} \gdef \tr@n {n} \gdef \tr@o {o\@vocaltrue } \gdef \tr@p {p} \gdef \tr@q {q} \gdef \tr@r {r} \gdef \tr@s {s} \gdef \tr@t {t} \gdef \tr@v {v} \gdef \tr@w {w} \gdef \tr@x {\v{s}} \gdef \tr@y {y} \gdef \tr@z {z} \gdef \tr@A {\=a\-\@vocaltrue } \gdef \tr@B {} \gdef \tr@C {\b{t}} \gdef \tr@D {\d{d}} \gdef \tr@E ##1{% test for Ee -> ey \def \next {\tr@aword ##1}\@vocaltrue \ifx ##1e\let \next \tr@aword ey\else \=e\fi \-\next} \gdef \tr@F {\b{d}} \gdef \tr@G {\v{g}} \gdef \tr@H {\d{h}} \gdef \tr@I {\={\i}\-\@vocaltrue } \gdef \tr@J {\v{c}} \gdef \tr@K {\~n} \gdef \tr@L {y} \gdef \tr@M {ny} \gdef \tr@N {n\@vocalfalse \kill@alif } \gdef \tr@O {\=o\-\@vocaltrue } \gdef \tr@P {\-\kern.1em$\lhook $\kern-.05em} \gdef \tr@Q {\kern.05em$\rhook $\kern-.1em\let \next \tr@aword } \gdef \tr@R {\.g} \gdef \tr@S {\d{s}} \gdef \tr@T {t} \gdef \tr@U {\=u\-\@vocaltrue \kill@alif } \gdef \tr@V {\d{t}} \gdef \tr@W {w\@vocalfalse \kill@alif } \gdef \tr@X {\s{h}\killw@w } \gdef \tr@Y {\=a\-\@vocaltrue } \gdef \tr@Z {\d{z}} \tr@def \a@b {\d{b}} \tr@def \a@c {\'c} \tr@def \a@d {\'d} \tr@def \a@e {\'d} \tr@def \a@f {\d{f}} \tr@def \a@g {g} \tr@def \a@h {h} \tr@def \a@i {\={\i}\-\@vocaltrue } \tr@def \a@j {\"{\i}\@vocaltrue } \tr@def \a@k {k} \tr@def \a@l {\~l} \tr@def \a@m {k} \tr@def \a@n {\d{n}} \tr@def \a@o {u\@vocaltrue } \tr@def \a@p {ng} \tr@def \a@q {\'r} \tr@def \a@r {\'r} \tr@def \a@s {\'s} \tr@def \a@t {\'t} \tr@def \a@u {\=u\-\@vocaltrue } \tr@def \a@v {\'t} \tr@def \a@w {{u}\@vocaltrue } \tr@def \a@x {v} \tr@def \a@y {y} \tr@def \a@z {\'z} \tr@def \a@A {e\@vocaltrue } \tr@def \a@B {\tr@@ } \tr@def \a@C {\'c} \tr@def \a@D {\v{d}} \tr@def \a@E {\v{e}} \tr@def \a@F {f} \tr@def \a@G {\'c} \tr@def \a@H {h} \tr@def \a@I {\"{\i}\@vocaltrue } \tr@def \a@J {\.g} \tr@def \a@K {\d{k}} \tr@def \a@L {k} \tr@def \a@M {k} \tr@def \a@N {\d{n}} \tr@def \a@O {u\@vocaltrue } \tr@def \a@P {\={u}\@vocaltrue } \tr@def \a@Q {q} \tr@def \a@R {\.r} \tr@def \a@S {\'s} \tr@def \a@T {\'t} \tr@def \a@U {u\@vocaltrue } \tr@def \a@V {v} \tr@def \a@W {o} \tr@def \a@X {\tr@@ } \tr@def \a@Y {\=e\-} \tr@def \a@Z {\'s} \global \tr@nstrue }}% end \tr@zdmg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {\catcode `\ =9 \catcode `\^^M=9 \catcode `\^^I=9 \catcode `\~=10 \gdef \tr@encislam {% define Enc. of Islam transliteration %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \tr@zdmg \let \@ub \underbar \def \tr@j {\@ub{zh}} \def \tr@x {\@ub{sh}} %\def \tr@q {\d{k}} % variant qaf; uncomment if required \def \tr@C {\@ub{th}} \def \tr@F {\@ub{dh}} \def \tr@G {j} \def \tr@J {\@ub{ch}} \def \tr@R {\@ub{gh}} %\def \tr@P {$^c$} % variant `ain; uncomment if required \def \tr@X {\@ub{kh}\killw@w } \message {Encyclopedia~of~Islam~transliteration.}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {\catcode `\ =9 \catcode `\^^M=9 \catcode `\^^I=9 \catcode `\~=10 \gdef \tr@turk {% define character macros for modern Turkish %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \tr@zdmg \gdef \tr@e {e\@vocaltrue \tr@aword } \gdef \tr@q {k} \gdef \tr@w {v} \gdef \tr@x {\c{s}} \gdef \tr@A {\^a\@vocaltrue } \gdef \tr@E {\^e\@vocaltrue \tr@aword } \gdef \tr@G {c} \gdef \tr@H {h} \gdef \tr@I {\^{\i}\@vocaltrue } \gdef \tr@J {\c{c}} \gdef \tr@K {n} \gdef \tr@O {\^o\@vocaltrue } \gdef \tr@P {\-} \gdef \tr@R {g} \gdef \tr@S {s} \gdef \tr@T {t} \gdef \tr@U {\^u\@vocaltrue \kill@alif } \gdef \tr@V {t} \gdef \tr@Z {z} \tr@def \a@j {{\i}\@vocaltrue } %\tr@def \a@j {\^u\@vocaltrue } \tr@def \a@m {\u{g}} \tr@def \a@w {{\"u}\@vocaltrue } \tr@def \a@A {\"a\@vocaltrue } \tr@def \a@H {} \tr@def \a@I {{\i}\@vocaltrue } \tr@def \a@J {\u{g}} \tr@def \a@L {g} \tr@def \a@M {n} \tr@def \a@O {\"o\@vocaltrue } \tr@def \a@P {{\"o}\@vocaltrue } \tr@def \a@Q {q} \tr@def \a@U {\"u\@vocaltrue } \tr@def \a@V {v} \catcode `\ =10 \message {modern~Turkish~transliteration.}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Specific definitions for Persian: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {\catcode `\ =9 \catcode `\^^M=9 \catcode `\^^I=9 \gdef \tr@enciran {% Encyclopaedia Iranica transliteration %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \tr@zdmg % start with default and modify \gdef\tr@w{v\@vocalfalse} % EIran = Lazard <> ZDMG \gdef\tr@W{v\@vocalfalse\kill@alif} % EIran = Lazard <> ZDMG \gdef\tr@G{\v{\j}\@vocalfalse} % EIran = Lazard <> ZDMG \gdef\tr@D{\.{z}\@vocalfalse} % EIran = Lazard <> ZDMG \gdef\tr@C{\b{s}\@vocalfalse} % EIran <> Lazard <> ZDMG \gdef\tr@F{\b{z}\@vocalfalse} % EIran <> Lazard <> ZDMG \gdef\tr@R{\={g}\@vocalfalse} % EIran <> Lazard <> ZDMG \gdef\tr@X{\b{k}\superv@w} % EIran <> Lazard <> ZDMG \tr@def\a@H{} % EIran = Lazard <> ZDMG \message {Encyclopaedia~Iranica~transliteration.}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {\catcode `\ =9 \catcode `\^^M=9 \catcode `\^^I=9 \gdef \tr@farsi {% Modified Encyclopaedia Iranica transliteration %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \tr@enciran % start with default and modify \gdef\tr@R{\.{g}\@vocalfalse} % ZDMG = Persian \gdef\tr@X{x\superv@w} % Lazard = Persian \tr@def\a@H{$\hbar\!$} % Persian <> EIran = nil \message {Modified~Encyclopaedia~Iranica~transliteration.}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {\catcode `\ =9 \catcode `\^^M=9 \catcode `\^^I=9 \gdef \tr@lazard {% Philological Farsi transliteration; cf., e.g., % Gilbert Lazard % "La langue des plus anciens documents de la prose persane" % (Paris: Cl. Klincksieck 1963). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \tr@enciran % start with default and modify \gdef\tr@X{x\superv@w} % Lazard = Persian <> EIran \gdef\tr@C{\b{s}\@vocalfalse} % Lazard <> EIran \gdef\tr@C{$\theta\!$\@vocalfalse} % Lazard <> EIran \gdef\tr@F{$\delta\!$\@vocalfalse} % Lazard <> EIran <> ZDMG \gdef\tr@R{$\gamma\!$\@vocalfalse} % Lazard <> EIran <> ZDMG \gdef\tr@X{x\superv@w} % Lazard <> EIran <> ZDMG \message {Philological~Farsi~transliteration.}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {\catcode `\ =9 \catcode `\^^M=9 \catcode `\^^I=9 \catcode `\~=10 \gdef \tr@urdu {% define Urdu transliteration %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \tr@zdmg \gdef \tr@j {\.{z}} \gdef \tr@x {\'{s}} \gdef \tr@C {\x{s}} \gdef \tr@D {\b{z}} \gdef \tr@F {\d{z}} \gdef \tr@G {j} \gdef \tr@H {\b{h}} \gdef \tr@J {c} \gdef \tr@O {o\-\@vocaltrue} \gdef \tr@S {\b{s}} \gdef \tr@T {t} \gdef \tr@V {\x{t}} \gdef \tr@X {x\killw@w} \gdef \tr@Z {\x{z}} \tr@def \a@d {\d{d}} \tr@def \a@r {\d{r}} \tr@def \a@t {\d{t}} \tr@def \a@H {} \message {Urdu~transliteration.}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def \a@zdmg {zdmg} \def \a@standard {standard} \def \a@turk {turk} \def \a@encislam {english} \def \a@enciran {iranica} \def \a@farsi {farsi} \def \a@lazard {lazard} \def \a@urdu {urdu} \def \settrans #1{\def \next {#1}% switch the transcription mode \ifx \next \a@zdmg \message {ZDMG transliteration.}\tr@zdmg \else \ifx \next \a@standard \message {ZDMG transliteration.}\tr@zdmg \else \ifx \next \a@encislam \tr@encislam \else \ifx \next \a@turk \tr@turk \else \ifx \next \a@urdu \tr@urdu \else \ifx \next \a@farsi \tr@farsi \else \ifx \next \a@enciran \tr@enciran \else \ifx \next \a@lazard \tr@lazard \else \message {ZDMG transliteration assumed.}\tr@zdmg \fi\fi\fi\fi\fi\fi\fi\fi } \settrans {zdmg}% default \catcode`\@ = \transatcode \endinput %%%%%%%%%%%%%%%%%%%%%%%%% EOF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%