Dear Mojca,
Thanks to the conversion option I found a clean way to setup a good
left-to-right layout. But I found a mysterious bug in the
bidirectional algorithm. Please run the attached file and look at the
formula.
%%%%%%%%%%%%%%%%%%
% engine=luatex
\def\FarsiGlobalDir {\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT}
\definestartstop
[farsidocument]
[commands={\FarsiGlobalDir},before=\page,after=\page]
\starttext
\startfarsidocument
\placeformula[formula1] $$y=123456789x^2$$
hi\footnote{hi}
\page
\stopfarsidocument
Why the formula in the previous page is not shown correct.
\stoptext
On 7/23/08, Mojca Miklavec
On Tue, Jul 22, 2008 at 9:39 PM, Mehdi Omidali wrote:
Dear Mojca, Thanks for your complete answer. In fact, in persian (and maybe arabic) documents, we need every digit be in persian,
But when you write, you probably write numbers in persian already?
like chapter, section,
\chapter and \section are a bit buggy as far as numbering is concerned, but you can use \setuphead [section] [conversion=arabicnumerals]
figure, and even formula numbers
Try \defineconversion [ar] [numbers] [\arabicnumerals]
This one doesn't work on sections (same argument as Aditya pointed out), but it does quite a lot already :) Can you try it out and report? I didn't try it out (no idea how to work with Arabic), but I consider it a much cleaner approach than redefining characters in fonts.
(You could also use \setupformulas[conversion=arabicnumerals], similar for tables, ..., but in theory you should not need anything else but \defineconversion [ar] [numbers] [\arabicnumerals] in lang-ara.tex if that's of general interest.)
(most of the people even prefer persian digits in formulas which is possible in xetex). As you know, the Mapping=farsidigits in a font definition works perfect in xelatex.
I would say that ConTeXt lacks a nice interface for that at the moment. There is tlig/trep feature that works that way (remaps ' to rightquote for example), but it's spread all over the place and might be likely to change. One option are fea files (like the one Idris pointed you to).
Still, I would go for "conversion", not for redefining fonts. Redefining fonts is just an ugly hack that happens to solve a problem temporary. People use it just because it's too difficult to do it in some other way.
Mojca ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________