1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2% hecmd.sty 3% ArabTeX 4% special commands for Hebrew mode 5% using ideas by Rama Porrat, Bernd Raichle and others 6% 07.05.2000 7%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 8% (c) Klaus Lagally 9% Institut fuer Informatik 10% Universitaet Stuttgart 11%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 12 13\a@ident {hecmd.sty} {3.05 additional commands for Hebrew} {07.05.2000} 14 15\let \RLtext \arabtext \let \endRLtext \endarabtext 16 17%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 18 19\newcount \is@m \newcount \is@n \newcount \is@l 20 21\def \heb@catcodes {% make chars 128-154 and 224-250 into letters 22\is@m = 96 % oldcode 23\is@n = 128 % pccode 24\is@l = 224 % newcode 25\loop \lccode \is@n = \is@m \catcode \is@n = 11 26 \lccode \is@l = \is@m \catcode \is@l = 11 27\ifnum 122 > \is@m 28 \advance \is@m 1 \advance \is@n 1 \advance \is@l 1 29\repeat } 30 31\def \heb@catcodes {% make chars 128-154 and 224-250 into letters 32\is@m = 96 % oldcode 33\is@n = 128 % pccode 34\is@l = 224 % newcode 35\loop \global\lccode \is@n = \is@m \catcode \is@n = 11 36 \global\lccode \is@l = \is@m \catcode \is@l = 11 37\ifnum 122 > \is@m 38 \advance \is@m 1 \advance \is@n 1 \advance \is@l 1 39\repeat } 40 41%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 42% activate most commands from hebrew.sty 43 44\begingroup 45\heb@catcodes 46 47\allowarab \���� \allowarab \���� 48\allowarab \������� \allowarab \������� 49\allowarab \������ \allowarab \������ 50\allowarab \��� \allowarab \��� 51\allowarab \������ \allowarab \������ 52\allowarab \������� \allowarab \������� 53\allowarab \�������� \allowarab \�������� 54\allowarab \��������� \allowarab \��������� 55\allowarab \����� \allowarab \����� 56\allowarab \���������� \allowarab \���������� 57\allowarab \��������� \allowarab \��������� 58\allowarab \������������ \allowarab \������������ 59\allowarab \���������� \allowarab \���������� 60\allowarab \�������� \allowarab \�������� 61\allowarab \�������� \allowarab \�������� 62\allowarab \���� \allowarab \���� 63\allowarab \���� \allowarab \���� 64 65\gdef \���� {\hadgesh} \gdef \���� {\hadgesh} 66\gdef \������� {\makafgadol} \gdef \������� {\makafgadol} 67\gdef \������ {\makafanak} \gdef \������ {\makafanak} 68\gdef \��� {\geresh} \gdef \��� {\geresh} 69\gdef \������ {\opengeresh} \gdef \������ {\opengeresh} 70\gdef \������� {\closegeresh} \gdef \������� {\closegeresh} 71\gdef \�������� {\openquote} \gdef \�������� {\openquote} 72\gdef \��������� {\closequote} \gdef \��������� {\closequote} 73\gdef \����� {\piska} \gdef \����� {\piska} 74\gdef \���������� {\piskapiska} \gdef \���������� {\piskapiska} 75\gdef \��������� {\smallskip} \gdef \��������� {\smallskip } 76\gdef \������������ {\medskip} \gdef \������������ {\medskip } 77\gdef \���������� {\bigskip} \gdef \���������� {\bigskip } 78\gdef \�������� {\rightline} \gdef \�������� {\rightline} 79\gdef \�������� {\leftline} \gdef \�������� {\leftline} 80\gdef \���� {\centerline} \gdef \���� {\centerline} 81\gdef \���� {\hebday} \gdef \���� {\hebday} 82\endgroup 83 84%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 85 86\def \a@hadgesh #1{% poor man's bold version 87\setbox0 \hbox {#1}% 88\kern-.025em\copy0\kern-\wd0 89\kern.05em\copy0\kern-\wd0 90\kern-.025em\raise.025em\copy0\kern-\wd0 91\raise-.025em\box0} 92 93\def \a@c@hadgesh #1{\putwordb@x {\a@hadgesh {\R{#1}}}\test@token } 94\def \hadgesh #1{\a@hadgesh {\R {#1}}} 95 96\def \a@c@makafgadol {\putwordb@x {\bf --}\test@token } 97 98\def \a@c@makafanak {\putwordb@x {\bf ---}\test@token } 99 100\def \a@c@geresh {\a@spacefalse \putwordb@x {\bf `}\test@token } 101\let \a@c@closegeresh \a@c@geresh 102\def \geresh {`} \let \closegeresh \geresh 103 104\def \a@c@opengeresh {\putwordb@x {\bf '}\a@spacefalse \test@token } 105\def \opengeresh {'} 106 107\def \a@c@closequote {\a@spacefalse \putwordb@x {\bf ``}\test@token } 108\def \closequote {``} 109 110\def \a@c@openquote {\putwordb@x {\bf ''}\a@spacefalse \test@token } 111\def \openquote {''} 112 113\def \a@c@undertext #1{\putwordb@x {$\underline {\R {#1}}$}\test@token } 114\let \undertext \underline 115 116\def \a@c@hebday {\putwordb@x {\number\day }\a@spacetrue 117\edef \themonth {�\ifcase \month \or 118 �����\or ������\or ���\or �����\or ���\or ����\or 119 ����\or ������\or ������\or �������\or ������\or �����\fi }% 120\putwordb@x {\xpa \RL \xpa {\themonth }}\a@spacetrue 121\putwordb@x {\number\year }\test@token } 122 123\def \hebday {\RL{\hebday }} % this looks wrong, but works ! 124 125%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 126 127\def \a@c@Hebrewtoday {% internal calendar routine 128\Hebrewsetreg 129\tracingmacros 1 130\edef \theHebrewDay {\HebrewDayName {\Hebrewday }\space 131�\HebrewMonthName {\Hebrewmonth }{\Hebrewyear },\space 132\a@HebrewYearName {\Hebrewyear }}% 133\tracingmacros 0 134\putwordb@x {\xpa \R \xpa {\theHebrewDay }}\test@token } 135 136\def \a@HebrewYearName #1{% max 4 digits, fully expandable version 137\ifnum #1>9999 \errmessage{HebrewYearName: illegal argument #1}\else 138\ifnum #1>999 \xpa \a@HYName \number #1\else 139\ifnum #1>99 \xpa \a@HYName \xpa 0\number #1\else 140\ifnum #1>9 \xpa \a@HYName \xpa 0\xpa 0\number #1\else 141\xpa \a@HYName \xpa 0\xpa 0\xpa 0\number #1\fi \fi \fi \fi } 142 143\def \a@HYName #1#2#3#4{% max 4 digits to Hebrew number 144\ifnum #1= 5 % Change it in the next Hebrew Millennium.. 145 \ifnum #2#3#4> 0 \else \DigitInHebrew {#1}'\fi 146\else \DigitInHebrew {#1}'\fi 147\a@ShortHYName {#2#3#4}% 148\ifnum #1< 1 \space )��"�(\fi 149\ifnum #2#3#4= 0 \space )��"�(\fi } 150 151\def \a@SHYNumber #1{% fully expandable version 152\ifnum #1>999 \errmessage{ShortHYName: illegal argument #1}\else 153\ifnum #1>99 \xpa \a@SHYName \number #1\else 154\ifnum #1>9 \xpa \a@SHYName \xpa 0\number #1\else 155\xpa \a@SHYName \xpa 0\xpa 0\number #1\fi \fi \fi } 156 157\def \a@SHYName #1#2#3{% max 3 digits, fully expandable 158\ifcase #1\or �\or �\or �\or �\or 159 ��\or ��\or ��\or ��\or ���\fi 160\ifnum #2#3 = 16 ��\else 161\ifnum #2#3 = 15 ��\else 162 \ifnum #2 = 0 \else \TensInHebrew{#2}\fi 163 \ifnum #3 = 0 \else \DigitInHebrew{#3}\fi 164\fi\fi } 165 166\def \a@ShortHYName #1{% format Hebrew number < 1000 167\xpa \xpa \xpa \a@FormatNumber \a@EvalToCS {\a@SHYNumber {#1}}\@ } 168 169\def \a@EvalToCS #1{% fully expand the parameter to a \cs name string 170\xpa \string \csname #1\endcsname } 171 172\def \a@FormatNumber #1\@ {\xpa \a@Format #1\@ } 173 174\def \a@Format #1#2\@ {\a@Formati #2\@ } 175 176\def \a@Formati #1#2\@ {% first digit 177#1\ifx \relax #2\relax '\else \ReturnFi 178\a@Formatii #2\@ \fi } 179 180\def \a@Formatii #1#2\@ {% following digits 181\ifx \relax #2\relax ''#1\else #1\ReturnFi 182\a@Formatii #2\@ \fi } 183 184\def \ReturnFi #1\fi {\fi #1}% FALSE branch 185 186\def \ReturnElseFi #1\else #2\fi {\fi #1}% TRUE branch 187 188%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 189\iffalse 190% from heb_pc.mac 191 192%\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax} 193 194\everydisplay{\aftergroup\beginR } 195 196\def\piska#1{\item{#1}\hangindent=-\hangindent} 197 198\def\piskapiska#1{\itemitem{#1}\hangindent=-\hangindent} 199 200\def\leftquotation{\L{''}} 201\def\rightquotation{\L{``}} 202\fi 203 204%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 205\endinput 206%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 207� ! " $ % & . ( ) = ? ; 208^ 1 2� 3� 4 5 6 7{ 8[ 9] 0} �\ , 209 Q@ W E R T Z U I O P � * 210 / ' � � � � � � � � � +~ 211 A S D F G H J K L � � , 212 � � � � � � � � � � � # 213 > Y X C V B N M� � : _ 214 <| � � � � � � � � � - 215%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EOF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 216 217 218