ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Example for Persian
@ 2000-09-18 14:08 Behnam Tabatabai
  2000-09-18 15:08 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Behnam Tabatabai @ 2000-09-18 14:08 UTC (permalink / raw)
  Cc: ntg-context

Hi Hans!
Thank you for having examined my Persian exmaple!

>Your file says:
>
>\font\OMARAB=omarab
>
>far better is a definition like
>
>\definefont[OMARAB][omarab sa 1]
>

That's right. I have still very little experience in Context, that's why I 
chose the most straightforward way of switching to "omarab". In the next 
examples I'll use this construct.

>
>Then there is the OTP mechanism, which chains a series of filters. Whet we
>need there is something similar, like (maybe we can leave the synonym here,
>and auto resolve indirect mappings)
>
>\definefiltersynonym [OTF8 to UNICODE16]   [inutf8]
>\definefiltersynonym [farsi to arabic]     [FarsiToArabic]
>\definefiltersynonym [preprocess arabic]   [uni2cuni]
>\definefiltersynonym [build arabic glyphs] [cuni2oar]
>
>next there is:
>
>\definefiltersequence[Farsi][OTF8 to UNICODE16, farsi to arabic, preprocess
>arabic, build arabic glyphs]
>

Besides "normal" OTP's Omega can also use so called "external" OPT's, which 
are any executables (perl scripts, ...) acting as filters. These can also be 
interfaced by similar macros.

>[what is the 1000 in \ocplist\OCPListFarsiUTF=\addbeforeocplist 1000
>\OCPutf ?]
>

This a positive value which can be used to fine tune the bahavior of 
\pushocplist in respect of the final placement of ocp's in the list. A 
detailed description can be found in the Omega documentation doc-1.8.dvi, 
pp. 31-34.

Personally I have not seen any real examples using this feature: All 
examples I have seen so far use 1 or 1000 uniquely for all ocp's added to 
the list.

>now we can say:
>
>\Farsi\OMARABIC
>
>and get thoce nice sequences of glyphs. In this way we can hide the otp
>interface and protect macros.
>

Well, this example was a more or less brute force hack for getting Farsi 
with the help of Omega primitives. Relying on these Omega features 
(direction switching commands and OTP's) do you see any chances for a more 
structured support in future versions of Context (e.g., a "lang-far.tex")?

Regards,
Behnam

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Example for Persian
  2000-09-18 14:08 Example for Persian Behnam Tabatabai
@ 2000-09-18 15:08 ` Hans Hagen
  2000-09-18 19:56   ` Behnam Tabatabai
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2000-09-18 15:08 UTC (permalink / raw)
  Cc: ntg-context

At 04:08 PM 9/18/00 CEST, Behnam Tabatabai wrote:

>Well, this example was a more or less brute force hack for getting Farsi 
>with the help of Omega primitives. Relying on these Omega features 
>(direction switching commands and OTP's) do you see any chances for a more 
>structured support in future versions of Context (e.g., a "lang-far.tex")?

Sure, but for that you should provide me with a detailed list of what I
need to get farsi runnung and where i can fetch it: fonts, filters etc

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Example for Persian
  2000-09-18 15:08 ` Hans Hagen
@ 2000-09-18 19:56   ` Behnam Tabatabai
  0 siblings, 0 replies; 6+ messages in thread
From: Behnam Tabatabai @ 2000-09-18 19:56 UTC (permalink / raw)
  Cc: ntg-context

Hans Hagen wrote:
> 
> At 04:08 PM 9/18/00 CEST, Behnam Tabatabai wrote:
> 
> >Well, this example was a more or less brute force hack for getting Farsi
> >with the help of Omega primitives. Relying on these Omega features
> >(direction switching commands and OTP's) do you see any chances for a more
> >structured support in future versions of Context (e.g., a "lang-far.tex")?
> 
> Sure, but for that you should provide me with a detailed list of what I
> need to get farsi runnung and where i can fetch it: fonts, filters etc
> 
> Hans

Hi Hans!

All you need to run the example is Omega Verion 1.15, which you can
download from /CTAN/systems/omega at any CTAN, e.g.,
  http://gd.tuwien.ac.at/publishing/CTAN/systems/omega/

Here you find following files:

(1) README. This is a short description of direction commands (Version
1.10)
(2) omega-doc-1.8.tar.gz. This is the latest official the documentation
(Version 1.8!)
(3) omega-lib-1.15.tgz. This is the collection of fonts, OTP's, etc.
(4) torture.tex contains detailed information on Arabic/Farsi/...
support
(5) utf8.tgz is a sample document in Arabic, English, Hebrew, Russian,
and Chinese
(6) web2c-7.3.1-omega-1.15.tgz contains the latest sources.

I have never built Omega from the sources (I don't have the know-how and
the means to do that). I use the binaries for version 1.11 which come as
an update for MiKTeX-1.20e together with the library 1.15, which I
downloaded from CTAN.

In my example I use "omarab", which is a 16-bit virtual font upon the
8-bit fonts "omsea1", "omsea2", and "omsea3". Further I use the filters
"inutf8", "uni2cuni", and "cuni2oar". All these are part of the official
Omega distribution and are included in omega-lib-1.15.tgz. The only
self-made filter I use is "FarsiToArab.otp" to work around the problem
with "Arabic Letter Farsi Yeh".

Please note that Omega produces 16-bit dvi-files. Therefore you must use
"odvips", "oxdvi", etc. instead of dvips, xdvi, ... For previewing I use
the MiKTeX previewer "yap" which seems to have no problems with the
16-bit dvi-files of Omega.

Regards,
Behnam


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Example for Persian
  2000-09-16 21:08 ` Example for Persian Behnam Tabatabai
  2000-09-17  4:00   ` Radhakrishnan C V
@ 2000-09-17 21:44   ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2000-09-17 21:44 UTC (permalink / raw)
  Cc: ntg-context

At 11:08 PM 9/16/00 +0200, Behnam Tabatabai wrote:

>I have uploaded an example for utf-8 encoded Persian text to be used
>with Context+Omega to http://meineseite.i-one.at/behnam-tabatabai/
>I would be very thankful if you would have a look into it.

We may continue this thread off list, but some aspects may be interesting
to others so let me for the moment use the list:

Your file says: 

\font\OMARAB=omarab

far better is a definition like

\definefont[OMARAB][omarab sa 1] 

because it adapts itself to the body font size. Even better, if the beta
version we change the following [i'll add it to the beta]. 

\def\dododefinefont#1#2%
  {\parsefontspec[#2]{\bodyfontsize}{*#1*}\getvalue{*#1*}}

the \OMARAB\ command will now honor changes in size halfway the document
[for those interested: there is no real delay in resolving the font spec
each time and since persian is not used in math formulas, we don't need the
tex family concept here; this \definefotn mechanism is btw more powerful
than it may seem at first sight, since it scales, maps, etc quite nicely].

Then there is the OTP mechanism, which chains a series of filters. Whet we
need there is something similar, like (maybe we can leave the synonym here,
and auto resolve indirect mappings)

\definefiltersynonym [OTF8 to UNICODE16]   [inutf8]
\definefiltersynonym [farsi to arabic]     [FarsiToArabic]
\definefiltersynonym [preprocess arabic]   [uni2cuni]
\definefiltersynonym [build arabic glyphs] [cuni2oar]

next there is: 

\definefiltersequence[Farsi][OTF8 to UNICODE16, farsi to arabic, preprocess
arabic, build arabic glyphs]

[what is the 1000 in \ocplist\OCPListFarsiUTF=\addbeforeocplist 1000
\OCPutf ?]

[it's no problem to call sequences inside filter sequences] 

now we can say: 

\Farsi\OMARABIC

and get thoce nice sequences of glyphs. In this way we can hide the otp
interface and protect macros. 

Hans

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Example for Persian
  2000-09-16 21:08 ` Example for Persian Behnam Tabatabai
@ 2000-09-17  4:00   ` Radhakrishnan C V
  2000-09-17 21:44   ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Radhakrishnan C V @ 2000-09-17  4:00 UTC (permalink / raw)
  Cc: Hans Hagen, ntg-context

On Sat, 16 Sep 2000, Behnam Tabatabai wrote:

: The only Omega documentation I know is "omega-doc-1.8.tar.gz" in
: /CTAN/systems/omega. You find there also the latest library stuff and
: cweb sources for version 1.15. Concerning TeX ==> XML/MathML primitives
: I must admit that they are totally unknown to me. Perhaps I have not
: read the documentation carefully enough.

There is absolutely no documentation for XML/MathML, except one article
in French by Yannis which is available at: 

 http://genepi.louis-jean.com/omega/lyonmathml.pdf

But it is very basic and doesn't say anything about the primitives
available. You can find the summary of this article in "Goossens et
al: LaTeX Web Companion" (MathML section).

I just scanned through the original Web sources of Omega and discovered
around 26 primitives (which seem to be sufficient to write a decent
filter package), the usage of which has been discovered through trial
and error. 

Hans, Behnam, if you need these, I can send you the list of primitives
with usage I found, so that you can save a hell of time. Also, you can
help me, if you discover anything new. I am sorry to say that Yannis and
John Plaice are absolutely silent and didn't bother to reply any of my
mails on this problem.

-- 
Radhakrishnan


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Example for Persian
  2000-09-15 10:19 Building format with TeX [and Omega] Hans Hagen
@ 2000-09-16 21:08 ` Behnam Tabatabai
  2000-09-17  4:00   ` Radhakrishnan C V
  2000-09-17 21:44   ` Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: Behnam Tabatabai @ 2000-09-16 21:08 UTC (permalink / raw)
  Cc: ntg-context

Hans Hagen wrote:
> 
> I can look into that if I have the resources (fonts and so). One thing to
> sort out [i did some experiments with etex] is to get color things and so
> right, due to special swapping. No big deal, once i know the problems at
> hand.
> 

I have uploaded an example for utf-8 encoded Persian text to be used
with Context+Omega to http://meineseite.i-one.at/behnam-tabatabai/
I would be very thankful if you would have a look into it.

> Where can I find the (really) latest omega specs? [since i also want to
> look into the tex->xml part]
> 
> Hans

The only Omega documentation I know is "omega-doc-1.8.tar.gz" in
/CTAN/systems/omega. You find there also the latest library stuff and
cweb sources for version 1.15. Concerning TeX ==> XML/MathML primitives
I must admit that they are totally unknown to me. Perhaps I have not
read the documentation carefully enough.

Regards,
Behnam


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-09-18 19:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-18 14:08 Example for Persian Behnam Tabatabai
2000-09-18 15:08 ` Hans Hagen
2000-09-18 19:56   ` Behnam Tabatabai
  -- strict thread matches above, loose matches on Subject: below --
2000-09-15 10:19 Building format with TeX [and Omega] Hans Hagen
2000-09-16 21:08 ` Example for Persian Behnam Tabatabai
2000-09-17  4:00   ` Radhakrishnan C V
2000-09-17 21:44   ` Hans Hagen

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).