9.23 right to left babel

  9.23.1 Arabi

tex4ht.sty indert Rregion and Lregion end hooks within \beginL/R and \endL/R, mainly to void the inverse produced by the elatex compiler.

<..configure html4 rlbabel..>
 <.shared rlbabel, arabicore.>
 \Configure{!P}{\a:LRdir}
 \Configure{!BODY}{\a:LRdir}
-_-_-

<..shared rlbabel, arabicore..>
 \Configure{LRdir}{ <.dir ltr/rtl.> }
 \Configure{Rregion} {\beginL} {\endL}
 \Configure{TITLE+}{\HCode{\jobname}}
-_-_-

<..dir ltr/rtl..>
 dir="\if@rl rtl\else ltr\fi"
-_-_-

<..configure html4 rlbabel..>+
 \Configure{moreL}
   {\ifvmode \let\end:moreRL=\empty
    \else\HCode{<span dir="ltr" >}\def\end:moreRL{\HCode{</span>}}\fi}
   {\end:moreRL}
 \Configure{moreR}
   {\ifvmode \let\end:moreRL=\empty
    \else\HCode{<span dir="rtl" >}\def\end:moreRL{\HCode{</span>}}\fi}
   {\end:moreRL}
-_-_-

<..configure html4-math rlbabel..>
 \:CheckOption{pic-m} \if:Option
 \else
    \Configure{$}
       {\HCode{<span <.dir ltr/rtl.>>}}
       {\HCode{</span>}}{}
 \fi
-_-_-

<..configure html4-math rlbabel..>+
 \Configure{[]}
    {\bgroup
        \protect\nested:math
        \PicDisplay
        $$\everymath{}\everydisplay{}}
    {$$\EndPicDisplay \egroup
     <.try inline par.>\if@rl \beginL\fi \beginR }
-_-_-

Test data

\def\providehyphenmins#1#2{}  
\documentclass[english,hebrew]{article}  
\usepackage[T1]{fontenc}  
 
\makeatletter  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.  
%% Bold symbol macro for standard LaTeX users  
\newcommand{\boldsymbol}[1]{\mbox{\boldmath $#1$}}  
 
 
\usepackage{babel}  
\makeatother  
\begin{document}  
   
 \[F=ma\quad(\textrm{\L{Newton’s 2nd Law}\R{ }})\]  
 \[F=ma\quad(\mbox{Newton’s 2nd Law } )\]  
 \R{\[F=ma\quad(\mbox{Newton’s 2nd Law } )\]}  
    
\end{document}  

9.23.1 Arabi

<..configure html4 arabicore..>
 <.shared rlbabel, arabicore.>
 \NewConfigure{dtd-lang}{1}
 \Configure{dtd-lang}{AR}
 \def\A:charset{charset=utf-8}
-_-_-