<div dir="ltr">Hi<br><br>I have written an initial version of the package, the package is located at <a href="http://code.google.com/p/luabidi" target="_blank">http://code.google.com/p/luabidi</a><br><br>You can get the files by the command: <tt>svn checkout <strong><em>http</em></strong>://<a href="http://luabidi.googlecode.com/svn/trunk/" target="_blank">luabidi.googlecode.com/svn/trunk/</a> luabidi-read-only<br>

<br>only test.tex is the example file. Please report issues, suggestions, ideas at the google page.<br><br>What has been done so far:<br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br><br>1- The main direction of the document is LTR, but \setRTLmain swtich the main direction of the document to RTL.<br>

<br>2- Paragraph directions: CSs \setRTL and setLTR are provided that
make the directions of the paragraphs RTL and LTR. Also two
environments LTR and RTL are provided for RTL and LTR paragraphs.<br>  <br>Note: in addition to \setRTL and \setLTR, \unsetRTL and \unsetLTR are also provided.<br>
<br>3- By default we have LTR (Persian) maths but if you would like to
have RTL maths, an option namely arabmaths is provided i.e.
\usepackage[arabmaths]{luabidi}<br><br>4- Footnotes:<br><br></tt><div style="margin-left: 40px;">
<tt>a) In the default mode, where \setRTLmain is not declared there is
only one footnote and the footnote rule is in the left hand side.<br><br>b)
If the main direction is RTL via \setRTLmain, then we have two
footnotes, \footnote and \Footnote for RTL and LTR footnotes
respectively. The footnote rule always appear in the right hand side.<br>
<br>c) there is an option &quot;textwidthfootnoterule&quot; which makes the footnote rule as wide as the textwidth.<br><br>d) (Incomplete): also &quot;autofootnoterule&quot; exist which is for Persian.<br><br></tt></div>
<tt>5- by default lists are fine, no need to write macros.<br>
<br>What will be done next:<br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>1:
Lamport&#39;s tabular: RTL inside RTL paragraph and LTR otherwise, also
needs to provide a CS that makes tabular RTL and LTR globally.<br><br>2.
Check other things and packages and provide extra macros if required to
take care of bidirectional matters but with LuaTeX&#39;s bidiirectional
commands, things are mostly done correctly.</tt></div>