summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/casyl/casyltex.sty
blob: eabe6ce08f4f985b4e1096922d91dcdaaa5fd194 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% casyltex.sty  (CASylTeX:  Macros for Cree/Inuktitut)
% 15 September 2007
% Version 2.00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Ivan A Derzhanski
% Department of Mathematical Linguistics
% Institute for Mathematics and Computer Science
% Bulgarian Academy of Sciences
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def \CASylTeX {C{\sc a}Syl\TeX }

\font \syll@fount=casyll10

\newcount \s@ll
\newcount \w@ll
\newcount \z@ll
\newcount \r@lett
\newcount \T@lett
\def \Rone {\r@lett=114} \Rone
\def \Rtwo {\r@lett=123}
\def \Tone {\T@lett=117} \Tone
\def \Ttwo {\T@lett=120}
\def \Zone {\z@ll=0} \Zone
\def \Ztwo {\z@ll=32}
\newif \ifwfront \wfrontfalse
\chardef \cree@h="08

\def \syll@write {\relax
 \ifnum \s@ll=96%
   \ifnum \w@ll=1w\fi
 \else \ifnum 128>\s@ll \advance \s@ll by-\z@ll \fi
   \ifnum \w@ll=1%
     \ifwfront W\symbol {\s@ll }%
     \else \symbol {\s@ll }W%
     \fi
   \else \symbol {\s@ll }%
   \fi
 \fi
 \s@ll=96\w@ll=0}

\def \syll@long {%
  \ifnum \w@ll=1%
    \ifwfront W\symbol {\s@ll}\llap'%
    \else \symbol {\s@ll}\llap'W%
    \fi
  \else \symbol {\s@ll}\llap'%
  \fi
% \symbol {\s@ll}\llap'%
%   \ifnum \w@ll=1W\fi
 \s@ll=96\w@ll=0}

\expandafter \def \csname syll@'\endcsname {%
 \ifnum \s@ll=96%
   \ifnum \w@ll=1w\w@ll=0\fi
 \else \syll@long
 \fi }

\def \if@syll@write {\ifnum 127<\s@ll \syll@write \fi}

\def \syll@A {\if@syll@write \advance \s@ll by128\syll@long }
\def \syll@E {\if@syll@write \advance \s@ll by32\syll@long }
\def \syll@I {\if@syll@write \advance \s@ll by64\syll@long }
\def \syll@O {\if@syll@write \advance \s@ll by96\syll@long }
\def \syll@U {\if@syll@write \advance \s@ll by96\syll@long }

\def \syll@a {\if@syll@write \advance \s@ll by128}
\def \syll@e {\if@syll@write \advance \s@ll by32}
\def \syll@i {\if@syll@write \advance \s@ll by64}
\def \syll@o {\if@syll@write \advance \s@ll by96}
\def \syll@u {\if@syll@write \advance \s@ll by96}

\def \syll@@ {\syll@write  \s@ll=96}
\def \syll@c {\syll@write  \s@ll=99}
\def \syll@f {\syll@write \s@ll=113}
\def \syll@g {\syll@write  \s@ll=99}
\def \syll@h {\syll@write \cree@h}
\def \syll@j {\syll@write \s@ll=121}
\def \syll@k {\syll@write \s@ll=107}
\def \syll@K {\syll@write  \s@ll=11}
\def \syll@l {\syll@write \s@ll=108}
\def \syll@L {\syll@write \s@ll=100}
\def \syll@m {\syll@write \s@ll=109}
\def \syll@M {\syll@write  \s@ll=13}
\def \syll@n {\syll@write \s@ll=110}
\def \syll@p {\syll@write \s@ll=112}
\def \syll@q {%
  \syll@write
  \s@ll=114\advance \s@ll by-\z@ll
  \symbol {\s@ll}\s@ll=107}
\def \syll@r {\syll@write \s@ll=\r@lett }
\def \syll@R {\syll@write \ifnum \r@lett=114\s@ll=123\else \s@ll=114\fi }
\def \syll@s {\syll@write \s@ll=115}
\def \syll@S {\syll@write \s@ll=102}
\def \syll@t {\syll@write \s@ll=116}
\def \syll@T {\syll@write \s@ll=\T@lett }
\def \syll@v {\syll@write \s@ll=113}
\def \syll@x {\syll@write  \s@ll=24}
\def \syll@y {\syll@write \s@ll=121}

\def \syll@N {\syll@write
  \s@ll=110\advance \s@ll by-\z@ll \raise .24ex\hbox {\symbol {\s@ll}}%
\kern-.15em%
  \s@ll=99 \advance \s@ll by-\z@ll \lower .24ex\hbox {\symbol {\s@ll}}%
  \s@ll=96}

\def \syll@w {%
  \ifnum 127<\s@ll \syll@write \fi
  \w@ll=1}

\long \def \@syll #1{%
 \ifx #1\end \syll@write \let \next \end
 \else \ifcat \noexpand #1\par
   \syll@write #1\def \next {\futurelet \n@xt \@syll }%
 \else \ifx \@sptoken \n@xt
     \syll@write \relax \space \s@ll=96\w@ll=0%
 \else \ifx .\n@xt
     \syll@write \relax .\s@ll=96\w@ll=0\fi\fi
   \csname syll@#1\endcsname
   \def \next {\futurelet \n@xt \@syll }%
 \fi\fi \next }

\def \syllab {% Cree/Inuktitut environment
  \syll@fount
  \s@ll=96%
  \w@ll=0%
  \@syll }

\def \endsyllab {}

\def \sylla #1{\begin{syllab}#1\end{syllab}}