diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:51:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:51:33 +0000 |
commit | aec1c1b77ee51b9359530d61cc7b8df2a37c7685 (patch) | |
tree | 8b5e1e20b56e0abf130e7da219468e197cde8725 /Master/texmf-dist/tex/latex/arabtex/hecmd.sty | |
parent | e1c54083e49986785dd4d24e891b89e0772a4de1 (diff) |
arabtex
git-svn-id: svn://tug.org/texlive/trunk@673 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/arabtex/hecmd.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/arabtex/hecmd.sty | 217 |
1 files changed, 217 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/arabtex/hecmd.sty b/Master/texmf-dist/tex/latex/arabtex/hecmd.sty new file mode 100644 index 00000000000..9a151495ff7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/arabtex/hecmd.sty @@ -0,0 +1,217 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% hecmd.sty +% ArabTeX +% special commands for Hebrew mode +% using ideas by Rama Porrat, Bernd Raichle and others +% 07.05.2000 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (c) Klaus Lagally +% Institut fuer Informatik +% Universitaet Stuttgart +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\a@ident {hecmd.sty} {3.05 additional commands for Hebrew} {07.05.2000} + +\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 \lccode \is@n = \is@m \catcode \is@n = 11 + \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 \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 } + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% activate most commands from hebrew.sty + +\begingroup +\heb@catcodes + +\allowarab \ \allowarab \δγβω +\allowarab \
\allowarab \ξχσβγεμ +\allowarab \ \allowarab \ξχσςπχ +\allowarab \ \allowarab \βψω +\allowarab \ \allowarab \τϊηβψω +\allowarab \
\allowarab \ρβεψβψω +\allowarab \
\allowarab \τϊηφιθεθ +\allowarab \
\allowarab \ρβεψφιθεθ +\allowarab \ \allowarab \τιρχδ +\allowarab \ \allowarab \τιρχδτιρχδ +\allowarab \ \allowarab \χτιφδχθπδ +\allowarab \
\allowarab \χτιφδαιπεπιϊ +\allowarab \
\allowarab \χτιφδβγεμδ +\allowarab \
\allowarab \ωεψδιξιο +\allowarab \
\allowarab \ωεψδωξΰμ +\allowarab \ \allowarab \ξψλζ +\allowarab \
\allowarab \διεν + +\gdef \ {\hadgesh} \gdef \δγβω {\hadgesh} +\gdef \
{\makafgadol} \gdef \ξχσβγεμ {\makafgadol} +\gdef \ {\makafanak} \gdef \ξχσςπχ {\makafanak} +\gdef \ {\geresh} \gdef \βψω {\geresh} +\gdef \ {\opengeresh} \gdef \τϊηβψω {\opengeresh} +\gdef \
{\closegeresh} \gdef \ρβεψβψω {\closegeresh} +\gdef \
{\openquote} \gdef \τϊηφιθεθ {\openquote} +\gdef \
{\closequote} \gdef \ρβεψφιθεθ {\closequote} +\gdef \ {\piska} \gdef \τιρχδ {\piska} +\gdef \ {\piskapiska} \gdef \τιρχδτιρχδ {\piskapiska} +\gdef \ {\smallskip} \gdef \χτιφδχθπδ {\smallskip } +\gdef \
{\medskip} \gdef \χτιφδαιπεπιϊ {\medskip } +\gdef \
{\bigskip} \gdef \χτιφδβγεμδ {\bigskip } +\gdef \
{\rightline} \gdef \ωεψδιξιο {\rightline} +\gdef \
{\leftline} \gdef \ωεψδωξΰμ {\leftline} +\gdef \ {\centerline} \gdef \ξψλζ {\centerline} +\gdef \
{\hebday} \gdef \διεν {\hebday} +\endgroup + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + |