Note: we should distinguish between hebrew.ldf and hebrew.sty
<..hebtex.4ht..>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% hebtex.4ht 2014-07-12-22:36 %
% Copyright (C) 2000--2009 Eitan M. Gurari %
<.TeX4ht copyright.>
<.hebtex body.>
\Hinput{hebtex}
\endinput
-_-_-
<..hebtex body..>
\let\:tempc=\arabtext
\pend:def\:tempc{\a:arabtext}
\HLet\arabtext=\:tempc
\let\:tempc=\endarabtext
\pend:def\:tempc{\Configure{HtmlPar}{}{}{}{}}
\append:def\:tempc{\b:arabtext}
\HLet\endarabtext=\:tempc
\HLet\RLtext \arabtext \HLet\endRLtext \endarabtext
\HLet\hebtext \arabtext \HLet\endhebtext \endarabtext
\HLet\hebtex \arabtext \HLet\endhebtex \endarabtext
-_-_-
<..hebtex body..>+
\let\:tempc=\a@arab@codes
\pend:def\:tempc{%
\chardef\up:de = \catcode‘\^ \catcode‘\^=7
\chardef\dn:de = \catcode‘\_ \catcode‘\_=8 }
\append:def\:tempc {%
\catcode‘\^=\up:de \catcode‘\_=\dn:de}
\HLet\a@unarab@codes=\:tempc
-_-_-
<..hebtex body..>+
\let\put@ab@x=\:tempc
\pend:def\:tempc{%
\let\sv:noindent=\noindent
\def\rc:noindent{\let\noindent=\sv:noindent}%
\def\noindent{\rc:noindent \noindent \c:arabtext
\let\sv:endgraf=\endgraf
\def\endgraf{\d:arabtext\sv:endgraf \aftergroup\rc:noindent }}%
}
\append:def\:tempc{\let\noindent=\sv:noindent}
\HLet\put@ab@x=\:tempc
\def\:tempc {\:nbsp}
\HLet\arab@space=\:tempc
\NewConfigure{arabtext}{4}
-_-_-
<..hebtex body..>+
\def\:tempc{\a:chireq} \HLet \put@chireq=\:tempc
\NewConfigure{chireq}{1}
\def\:tempc{\a:cholem} \HLet \put@cholem=\:tempc
\NewConfigure{cholem}{1}
\def\:tempc{\a:cholem} \HLet\h@cholem=\:tempc
\NewConfigure{cholem}{1}
\def\:tempc{\a:chpatach} \HLet \put@chpatach=\:tempc
\NewConfigure{chpatach}{1}
\def\:tempc{\a:chqames} \HLet \put@chqames=\:tempc
\NewConfigure{chqames}{1}
\def\:tempc{\a:chsegol} \HLet \put@chsegol=\:tempc
\NewConfigure{chsegol}{1}
\def\:tempc{\a:dagesh} \HLet\put@dagesh=\:tempc
\NewConfigure{dagesh}{1}
\def\:tempc{\a:meteg} \HLet\h@meteg=\:tempc
\NewConfigure{meteg}{1}
\def\:tempc{\a:patachf} \HLet \put@patachf=\:tempc
\NewConfigure{patachf}{1}
\def\:tempc{\a:patach} \HLet \put@patach=\:tempc
\NewConfigure{patach}{1}
\def\:tempc{\a:qameschat} \HLet\put@qameschat=\:tempc
\NewConfigure{qameschat}{1}
\def\:tempc{\a:qames} \HLet \put@qames=\:tempc
\NewConfigure{qames}{1}
\def\:tempc{\a:qibbus} \HLet\put@qibbus=\:tempc
\NewConfigure{qibbus}{1}
\def\:tempc{\a:rdot} \HLet\h@rdot=\:tempc
\NewConfigure{rdot}{1}
\def\:tempc{\a:segol} \HLet\put@segol=\:tempc
\NewConfigure{segol}{1}
\def\:tempc{\a:sere} \HLet \put@sere=\:tempc
\NewConfigure{sere}{1}
\def\:tempc{\a:shindot} \HLet\h@shindot=\:tempc
\NewConfigure{shindot}{1}
\def\:tempc{\a:shwa} \HLet \put@shwa=\:tempc
\NewConfigure{shwa}{1}
\def\:tempc{\a:sindot} \HLet\h@sindot=\:tempc
\NewConfigure{sindot}{1}
-_-_-
<..abidir.4ht..>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% abidir.4ht 2014-07-12-22:36 %
% Copyright (C) 2001 Eitan M. Gurari %
<.TeX4ht copyright.>
<.arabtex bidir.>
\Hinput{abidir}
\endinput
-_-_-
<..arabtex bidir..>
\def\a@Rinsert#1{%
\leavevmode \a:RL\vbox{\everypar{}\a@sequence {#1}}\b:RL }
\NewConfigure{RL}{6}
-_-_-
<..hewrite.4ht..>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% hewrite.4ht 2014-07-12-22:36 %
% Copyright (C) 2001 Eitan M. Gurari %
<.TeX4ht copyright.>
<.reverse hebrew words.>
\Hinput{aparse}
\endinput
-_-_-
<..reverse hebrew words..>
\def\:temp #1#2+#3*#4<{%
\def \next {\heb@mid #4}%
\ifnum \act@cd = \m@qqeph
\def \next {\heb@end #4}\put@b@x {\the\act@cd }%
\ifhcl@s \else \put@box {\raise .6ex \hbox
{\kern.05em\unhbox \ab@x \kern.05em}}%
\fi
\else \ifnum \act@cd = \illch@r
\put@b@x {\the\act@cd }%
\else
\ifnum \act@cd = \hc@@
\heb@cd \hc@y \advance \heb@cd \heb@dsp
\put@box {\hphantom{\char \the\heb@cd }}%
\else \heb@cd \act@cd \advance \heb@cd \heb@dsp
\put@b@x {\the\heb@cd }%
\fi
\ifhv@wel \heb@accent #2+#3*%
\ifcase \act@mod \or \h@sindot \or \h@shindot \fi
\if@dagesh \put@dagesh \fi
\fi
\fi\fi
\:heblet \unhbox \ab@x \end:heblet
\h@test@chr #4}
\HLet\h@put@mid=\:temp
-_-_-
<..reverse hebrew words..>+
\def\:temp #1>{%
\iftest@write \iftest@parse \else \a@verb (#1 )>\fi
\tracingmacros = 1 \fi
\a@write@hook
\ifa@@write {\heb@beg #1>0+0*>\end:hebword}\fi
\iftest@write \tracingmacros = 0
\fi }
\HLet\heb@write=\:temp
-_-_-
<..reverse hebrew words..>+
\def\:heblet{\a:hewrite}
\def\end:heblet{\b:hewrite}
\let\end:hebword=\empty
\:CheckOption{rl2lr}\if:Option
\csname newbox\endcsname\heb:box
\setbox\heb:box=\hbox{}
\pend:def\:heblet{\setbox\heb:box=\hbox\bgroup}
\append:def\end:heblet{\unhbox\heb:box\egroup}
\def\end:hebword{\unhbox\heb:box}
\else
\Log:Note{to reverse the direction of
Hebrew words, use the command line option ‘rl2lr’}
\fi
\NewConfigure{hewrite}{2}
-_-_-
<..aoutput.4ht..>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% aoutput.4ht 2014-07-12-22:36 %
% Copyright (C) 2001 Eitan M. Gurari %
<.TeX4ht copyright.>
<.aoutput sentences.>
\Hinput{aoutput}
\endinput
-_-_-
<..aoutput sentences..>
\let\:tempc=\put@ab@x
\pend:def\:tempc {%
\setbox\a@tempb@x=\hbox{\c:RL \box\a@tempb@x \d:RL}}
\HLet\put@ab@x=\:tempc
-_-_-
<..aoutput sentences..>+
\:CheckOption{RL2LR}\if:Option
<.reverse sentences.>
\else
\Log:Note{to reverse direction of RL sentences,
use the command line option ‘RL2LR’}
<.non reverse sentences.>
\fi
-_-_-
<..non reverse sentences..>
\let\:tempc=\put@word
\pend:def\:tempc{\setbox\wordb@x \hbox {\e:RL \unhcopy \wordb@x \f:RL }}
\HLet\put@word=\:tempc
-_-_-
<..reverse sentences..>
\def\:tempc{%
\ifa@space \putlineb@x
{\unhcopy \lineb@x \arab@space \e:RL \unhcopy \wordb@x \f:RL}%
\else \add@word \fi }
\HLet\addt@line=\:tempc
\def\:tempc{%
\putlineb@x {\unhbox \lineb@x \e:RL \unhbox \wordb@x \f:RL}}
\HLet\add@word=\:tempc
-_-_-