%$Lamed
\documentclass[12pt]{article}

\pagestyle{headings}

%\tracingmacros2

\usepackage[charset=isoara, english, arabic]{mem}

\languageproperties{arabic}{rmfamily=omarb}
\languageproperties{english}{rmfamily=ptm}

% Quick and dirty fix

   \let\origshipout\shipout
   \def\shipout#1{\origshipout#1 dir TLT}

\begin{document}


\begin{quote}
\begin{english}
This sample shows a mixture of Arabic and English. Arabic is
the main script. There are running heads, too.

\verb|\bodydir| apparently can be used only in the preamble
of the document. {\tracingmacros2 \tracingcommands2 \verb|\textdir|
should} reverse
\verb|\hbox|es with TLT,
but for some reason in Aleph does not work (Omega reverses
hboxes correctly). This is important in lists and sections.
Currently, the \verb|\bodydir| is that of the main language
(the last one in the package options), which means the
document has a fixed TLT layout.
\end{english}
\end{quote}

% Cannot be used in the middle of a document??

 ��� ���� ������ ������ ������ ������ ���� � �� ���� �����
 \englishtext{Hello} ������ ��� ����� ���� �� ����� �� ������ �� �����
 �� ������� ��� ���� ��� �� ������ �� �� ��� ����� � �� �� ����� �
 ������� � �������� � �� �� ������� � ������� �� �� ��� ������ ����
 ������ ����� �� ��� �� ��� ���� ����� � �� ����� ������ � ����� � ���
 �� � ������ ������� ����.

\englishtext{A list, with random item breaks:}
\begin{enumerate}
\item%[\rlap{���}]
 ��� ���� ������ ������ ������ ������ ���� � �� ���� �����
 \englishtext{Hello} ������ ��� ����� ���� �� ����� �� ������ �� �����
 
\item[��)]
�� ������� ��� ���� ��� �� ������ �� �� ��� ����� � �� �� ����� �
 ������� � �������� � �� �� ������� � ������� �� �� ��� ������ ����
 
\item[\englishtext{Third})]
 ������ ����� �� ��� �� ��� ���� ����� � �� ����� ������ � ����� � ���
 �� � ������ ������� ����.
\end{enumerate}

\englishtext{A section follows:}

\section{��� ���� ������ ������ ������ ������ ����  � �� ���� �����}

 \englishtext{Blah. English \textit{text} in an arabic context. Note
 it is indented still at the right, as it must be.}
 
\section{��� ���� ������ ������ ������ ������ ����}

\begin{languageset}{english}
 
Now an English paragraph.  Arabic paragraph as a quote:
\begin{quote}
\begin{languageset}{arabic}
��� ���� ������ ������ ������ ������ ���� � �� ���� �����
 \englishtext{Hello} ������ ��� ����� ���� �� ����� �� ������ �� �����
 �� ������� ��� ���� ��� �� ������ �� �� ��� ����� � �� �� ����� �
 ������� � �������� � �� �� ������� � ������� �� �� ��� ������ ����
 ������ ����� �� ��� �� ��� ���� ����� � �� ����� ������ � ����� � ���
 �� � ������ ������� ����.
\end{languageset}
\end{quote}

 \section{A title in the English part to see what happens and if the
 format es correct}

By the way, page numbers are more or less correct (but still to be
improved). Note the section in latin script has a wrong format.

Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah.
Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah.
Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah.

    
\end{languageset}

\end{document}
