ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mehdi Omidali" <mehdioa@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Passing unicode characters
Date: Wed, 23 Jul 2008 21:22:04 +0330	[thread overview]
Message-ID: <6048c4180807231052g3d522ecdt78049b4cbf8e10aa@mail.gmail.com> (raw)
In-Reply-To: <6faad9f00807221421n1f956817j451ad0ff30479e63@mail.gmail.com>

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 <mojca.miklavec.lists@gmail.com> wrote:
> 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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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
___________________________________________________________________________________


  reply	other threads:[~2008-07-23 17:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22 14:48 Mehdi Omidali
2008-07-22 15:23 ` Idris Samawi Hamid ادريس سماوي حامد
2008-07-22 16:31   ` Mehdi Omidali
2008-07-22 18:14   ` Mehdi Omidali
2008-07-22 18:40     ` Idris Samawi Hamid
2008-07-22 19:24       ` Mehdi Omidali
2008-07-22 19:42         ` Aditya Mahajan
2008-07-22 20:50           ` Mehdi Omidali
2008-07-23  6:37             ` Wolfgang Schuster
2008-07-27 21:25               ` Khaled Hosny
2008-07-27 22:38                 ` Mehdi Omidali
2008-07-28 14:41                   ` Hans Hagen
2008-07-22 18:10 ` Mojca Miklavec
2008-07-22 19:39   ` Mehdi Omidali
2008-07-22 21:21     ` Mojca Miklavec
2008-07-23 17:52       ` Mehdi Omidali [this message]
2008-07-27 12:39         ` Taco Hoekwater
2008-07-28 14:37       ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6048c4180807231052g3d522ecdt78049b4cbf8e10aa@mail.gmail.com \
    --to=mehdioa@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).