blob: 14ecb374e2a5b5d2432ac8c0ab41d96557ee6ab3 (
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% hecmd.sty
% ArabTeX
% special commands for Hebrew mode
% using ideas by Rama Porrat, Bernd Raichle and others
% 26.07.2007
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (c) Klaus Lagally
% Institut fuer Formale Methoden der Informatik
% Universitaet Stuttgart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\a@ident {hecmd.sty} {3.12 additional commands for Hebrew} {26.07.2007}
\let \RLtext \arabtext \let \endRLtext \endarabtext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcount \is@m \newcount \is@n \newcount \is@l
\def \heb@catcodes {% make chars 128-154 and 224-250 into letters
\is@m = 96 % oldcode
\is@n = 128 % pccode
\is@l = 224 % newcode
\loop \global\lccode \is@n = \is@m \catcode \is@n = 11
\global\lccode \is@l = \is@m \catcode \is@l = 11
\ifnum 122 > \is@m
\advance \is@m 1 \advance \is@n 1 \advance \is@l 1
\repeat }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def \a@hadgesh #1{% poor man's bold version
\setbox0 \hbox {#1}%
\kern-.025em\copy0\kern-\wd0
\kern.05em\copy0\kern-\wd0
\kern-.025em\raise.025em\copy0\kern-\wd0
\raise-.025em\box0}
\def \a@c@hadgesh #1{\putwordb@x {\a@hadgesh {\R{#1}}}\test@token }
\def \hadgesh #1{\a@hadgesh {\R {#1}}}
\def \a@c@makafgadol {\putwordb@x {\bf --}\test@token }
\def \a@c@makafanak {\putwordb@x {\bf ---}\test@token }
\def \a@c@geresh {\a@spacefalse \putwordb@x {\bf `}\test@token }
\let \a@c@closegeresh \a@c@geresh
\def \geresh {`} \let \closegeresh \geresh
\def \a@c@opengeresh {\putwordb@x {\bf '}\a@spacefalse \test@token }
\def \opengeresh {'}
\def \a@c@closequote {\a@spacefalse \putwordb@x {\bf ``}\test@token }
\def \closequote {``}
\def \a@c@openquote {\putwordb@x {\bf ''}\a@spacefalse \test@token }
\def \openquote {''}
\def \a@c@undertext #1{\putwordb@x {$\underline {\R {#1}}$}\test@token }
\let \undertext \underline
\def \a@c@hebday {\putwordb@x {\number\day }\a@spacetrue
\edef \themonth {\ifcase \month \or
\or \or \or \or \or \or
\or \or \or \or \or \fi }%
\putwordb@x {\xpa \RL \xpa {\themonth }}\a@spacetrue
\putwordb@x {\number\year }\test@token }
\def \hebday {\RL{\hebday }} % this looks wrong, but works !
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def \a@c@Hebrewtoday {% internal calendar routine
\Hebrewsetreg
\tracingmacros 1
\edef \theHebrewDay {\HebrewDayName {\Hebrewday }\space
\HebrewMonthName {\Hebrewmonth }{\Hebrewyear },\space
\a@HebrewYearName {\Hebrewyear }}%
\tracingmacros 0
\putwordb@x {\xpa \R \xpa {\theHebrewDay }}\test@token }
\def \a@HebrewYearName #1{% max 4 digits, fully expandable version
\ifnum #1>9999 \errmessage{HebrewYearName: illegal argument #1}\else
\ifnum #1>999 \xpa \a@HYName \number #1\else
\ifnum #1>99 \xpa \a@HYName \xpa 0\number #1\else
\ifnum #1>9 \xpa \a@HYName \xpa 0\xpa 0\number #1\else
\xpa \a@HYName \xpa 0\xpa 0\xpa 0\number #1\fi \fi \fi \fi }
\def \a@HYName #1#2#3#4{% max 4 digits to Hebrew number
\ifnum #1= 5 % Change it in the next Hebrew Millennium..
\ifnum #2#3#4> 0 \else \DigitInHebrew {#1}'\fi
\else \DigitInHebrew {#1}'\fi
\a@ShortHYName {#2#3#4}%
\ifnum #1< 1 \space )"(\fi
\ifnum #2#3#4= 0 \space )"(\fi }
\def \a@SHYNumber #1{% fully expandable version
\ifnum #1>999 \errmessage{ShortHYName: illegal argument #1}\else
\ifnum #1>99 \xpa \a@SHYName \number #1\else
\ifnum #1>9 \xpa \a@SHYName \xpa 0\number #1\else
\xpa \a@SHYName \xpa 0\xpa 0\number #1\fi \fi \fi }
\def \a@SHYName #1#2#3{% max 3 digits, fully expandable
\ifcase #1\or \or \or \or \or
\or \or \or \or \fi
\ifnum #2#3 = 16 \else
\ifnum #2#3 = 15 \else
\ifnum #2 = 0 \else \TensInHebrew{#2}\fi
\ifnum #3 = 0 \else \DigitInHebrew{#3}\fi
\fi\fi }
\def \a@ShortHYName #1{% format Hebrew number < 1000
\xpa \xpa \xpa \a@FormatNumber \a@EvalToCS {\a@SHYNumber {#1}}\@ }
\def \a@EvalToCS #1{% fully expand the parameter to a \cs name string
\xpa \string \csname #1\endcsname }
\def \a@FormatNumber #1\@ {\xpa \a@Format #1\@ }
\def \a@Format #1#2\@ {\a@Formati #2\@ }
\def \a@Formati #1#2\@ {% first digit
#1\ifx \relax #2\relax '\else \ReturnFi
\a@Formatii #2\@ \fi }
\def \a@Formatii #1#2\@ {% following digits
\ifx \relax #2\relax ''#1\else #1\ReturnFi
\a@Formatii #2\@ \fi }
\def \ReturnFi #1\fi {\fi #1}% FALSE branch
\def \ReturnElseFi #1\else #2\fi {\fi #1}% TRUE branch
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iffalse
% from heb_pc.mac
%\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}
\everydisplay{\aftergroup\beginR }
\def\piska#1{\item{#1}\hangindent=-\hangindent}
\def\piskapiska#1{\itemitem{#1}\hangindent=-\hangindent}
\def\leftquotation{\L{''}}
\def\rightquotation{\L{``}}
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! " $ % & . ( ) = ? ;
^ 1 2 3 4 5 6 7{ 8[ 9] 0} \ ,
Q@ W E R T Z U I O P *
/ ' +~
A S D F G H J K L ,
#
> Y X C V B N M : _
<| -
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EOF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|