From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/25344 Path: news.gmane.org!not-for-mail From: "Idris Samawi Hamid" Newsgroups: gmane.comp.tex.context Subject: Aleph in ConTeXt: A Guide to the Perplexed Date: Wed, 18 Jan 2006 15:47:51 -0700 Organization: Colorado State University Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1137624520 25439 80.91.229.2 (18 Jan 2006 22:48:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Jan 2006 22:48:40 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Jan 18 23:48:37 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1EzM6F-0003Gl-EJ for gctc-ntg-context-518@m.gmane.org; Wed, 18 Jan 2006 23:48:19 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6906A12868; Wed, 18 Jan 2006 23:48:18 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10217-02; Wed, 18 Jan 2006 23:48:14 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2EAF612856; Wed, 18 Jan 2006 23:48:14 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 58A9312856 for ; Wed, 18 Jan 2006 23:48:12 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10216-02 for ; Wed, 18 Jan 2006 23:48:10 +0100 (CET) Original-Received: from trueband.net (director.trueband.net [216.163.120.8]) by ronja.ntg.nl (Postfix) with SMTP id C728E127BA for ; Wed, 18 Jan 2006 23:48:09 +0100 (CET) Original-Received: (qmail 28341 invoked by uid 1006); 18 Jan 2006 22:48:08 -0000 Original-Received: from ishamid@colostate.edu by rs0 by uid 1003 with qmail-scanner-1.16 (spamassassin: 2.64. Clear:SA:0(0.0/100.0):. Processed in 4.319882 secs); 18 Jan 2006 22:48:08 -0000 Original-Received: from unknown (HELO trueband.net) (172.16.0.5) by -v with SMTP; 18 Jan 2006 22:48:03 -0000 Original-Received: (qmail 6930 invoked from network); 18 Jan 2006 22:48:00 -0000 Original-Received: from unknown (HELO walayah1.wildblue.com) (70.41.5.95) by -v with SMTP; 18 Jan 2006 22:48:00 -0000 Original-To: "mailing list for ConTeXt users" User-Agent: Opera M2/8.51 (Win32, build 7712) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:25344 Archived-At: Aleph in ConTeXt: A Guide to the Perplexed (with apologies to Maimonides) Dear gang, I have been helping a number of ConTeXt users off-list with getting aleph= =20 running, along with right-to-left typesetting. The following notes are =20 meant to help ConTeXt users who want to do RL typesetting, particularly =20 Arabic script, get started with a minimal of fuss, as well as point to =20 more advanced applications. This is much more complete than my last post = =20 (and hence the wiki as well) I hope that someone can take this and add it to the wiki. I can then edit= =20 the wiki myself and improve the clarity, etc. Perhaps I will also write a= n =20 augmentation to Hans' Aleph manual later. I also have a support utlities package that could be placed on the wiki o= r =20 somewhere else. Is there anyone who can upload it for me? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D I. Introduction. Aleph is a typesetting engine derived from Omega and eTeX. Reasons for =20 Aleph: 1. ConTeXt depends on the eTeX extensions, and even LaTeX now defaults to= =20 pdfeTeX; 2. Omega provides a nice foundation for multilingual typesetting with =20 large (>256) character sets, including large virtual fonts, but a stable,= =20 dependable version has not been a priority with its developers. a. In particular, the RL-LR code works excellently for the most part =20 (minor bugs, easy to work around). b. Omega 1.15 was the last relatively stable bugfix version, as far as =20 usability is concerned. 3. Some users need a dependable LR-RL TeX engine NOW. Aleph weds Omega 1.15 and eTeX201, removes some extraneous stuff, and =20 fixes a few bugs. I use it for production purposes. It uses dvipdfmx for = =20 pdf production, and can take advantage of most of ConTeXt's capabilities.= =20 Giuseppe Bilotta has done virtually all of the development work. In addition to large character sets Aleph inherits the filter sequence =20 mechanism for script processing (extension ocp, compile from text-editabl= e =20 otp). So you can script whatever input encoding you like to whatever =20 output font encoding you like. It is mechanism powerful enough to do =20 contextual analysis of Arabic script for example, but not powerful enough= =20 for things like vertical glyph positioning for cursive scripts and the =20 like. Aleph, inheriting from Omega, provides many ready-to-go filters, using a = =20 Times Roman like font for Latin, Greek, and Cyrillic scripts. The ConTeXt= =20 module for this setup is called Gamma (m-gamma.tex); this is a port of th= e =20 Lambda (i.e., LaTeX) style files to ConTeXt. The font typescript is calle= d =20 type-omg. II. Installing. This install is based on the stand-alone ConTeXt for Win32 package: http://www.pragma-ade.com/context/install/mswincontext.zip Users of MiKTeX and other OS's will need to adjust the following =20 instructions to their own setups. 1. Make sure you have a very recent version of ConTeXt that supports the = =20 engine path mechanism. This mechanism allows texexec to manage two, e.g.,= =20 cont-en.fmt files at once, one in C:\ConTeXt\tex\texmf-mswin\web2c\aleph and one in C:\ConTeXt\tex\texmf-mswin\web2c\pdfetex How recent, you ask? Just be safe and get the latest-) 2. Some configuration points: a. Make sure you have the following line in ConTeXt\tex\texmf-local\context\config\texexec.ini set to "true", viz., set UseEnginePath to true b. In texmf-local\web2c\texmf.cnf, texmf-local\web2c\context.cnf, and texmf\web2c\texmf.cnf, comment this line as follows %extra_mem_bot.context =3D 2000000 otherwise aleph will crash under some conditions, like overfull boxes and= =20 the like... The XeTeX developer found the source to this bug, and a fix; = =20 hopefully Giuseppe will get to it-)) 3. Get the omega support files: http://www.ctan.org/get?fn=3D/systems/win32/fptex/0.7/package/omega.zip http://www.ctan.org/get?fn=3D/systems/win32/fptex/0.7/package/omegafonts.= zip 4. Get rid of the following directories from omega.zip (not really =20 necessary but if u want to be efficient): texmf/eomega texmf/omega/encodings 5. Put support files in texmf-local; 6. Compile the Aleph format: mktexlsr texexec --make en -tex=3Daleph 7. Here is a test file. Note the preamble % tex=3Daleph output=3Ddvipdfmx at the beginning of every aleph file. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Domarb.tex=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D % tex=3Daleph output=3Ddvipdfmx \input m-gamma.tex \input type-omg.tex \setupbodyfont[omlgc,12pt] \starttext \startlatin This is a test \bf This is a test \stoplatin \startgreek A B G D a b g d {\bf A B G D a b g d} \stopgreek \startarab `rby: A b t th j H kh {\bf \ A b t th j H kh} fArsy: A b p t th j ch H kh {\bf A b p t th j ch H kh} \starturdu ArdU: A b p t 't th j ch H kh {\bf A b p t 't th j ch H kh} \stopurdu \blank \tfc `rby: bsm ALLah Al-rrHmn Al-rrHym fArsy: bh nAm khdAwnd b-kh-sh-nde mhrbAn \starturdu \tfc ArdU: ALLah kE nAm sE jw rHmAn w rHym hE \stopurdu \stoparab \stoptext =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 8. For Arabic script you will probably want to use an encoding that =20 supports direct Arabic-script editing. There are three: utf-8, iso-8859-6= =20 (apple-unix), and cp1256 (micro$oft). We can define the following, using = =20 ConTeXt macros for managing filter sequences. Maybe I will add these to =20 m-gamma and ask Hans to distribute. In the meantime, here are some =20 definitions, samples of all three encodings, and an example of mixed lr-r= l =20 text: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dm-arabic-enc.tex=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D % tex=3Daleph output=3Ddvipdfmx %\input m-gamma.tex \input type-omg.tex \usetypescriptfile[type-omg] \usetypescript[OmegaArab] \hoffset=3D0pt %% Individual Filters % Input filters (from what you type) \definefiltersynonym [UTF8] [inutf8] \definefiltersynonym [ISO8859-6] [in88596] \definefiltersynonym [CP1256] [incp1256] % Contextual filter \definefiltersynonym [UniCUni] [uni2cuni] % Output filters (font mapping) \definefiltersynonym [CUniArab] [cuni2oar] %% Filter Sequences \definefiltersequence [UTFArabic] [UTF8,UniCUni,CUniArab] \definefiltersequence [ISOArabic] [ISO8859-6,UniCUni,CUniArab] \definefiltersequence [WINArabic] [CP1256,UniCUni,CUniArab] % For inner paragraph control within an LR paragraph \def\ArabicTextUTF#1{{\textdir TRT\usefiltersequence[UTFArabic]% \switchtobodyfont[omarb]#1\textdir TLT \clearocplists}} \def\ArabicTextISO#1{{\textdir TRT\usefiltersequence[ISOArabic]% \switchtobodyfont[omarb]#1\textdir TLT \clearocplists}} \def\ArabicTextWIN#1{{\textdir TRT\usefiltersequence[WINFArabic]% \switchtobodyfont[omarb]#1\textdir TLT \clearocplists}} % For global Arabic script \def\ArabicDirGlobal{% \pagedir TRT\bodydir TRT\textdir TRT\pardir TRT % \hoffset=3D-8.88cm} % compensate for a bug in \bodydir TRT \def\ArabicUTF{\ArabicDirGlobal\usefiltersequence[UTFArabic] \switchtobodyfont[omarb]} \def\ArabicISO{\ArabicDirGlobal\usefiltersequence[ISOArabic] \switchtobodyfont[omarb]} \def\ArabicWIN{\ArabicDirGlobal\usefiltersequence[WINArabic] \switchtobodyfont[omarb]} % For separate Arabic-script paragraphs \def\ArabicDirPar{\textdir TRT\pardir TRT} \definestartstop [arabutf] [commands=3D% {\usefiltersequence[UTFArabic] \switchtobodyfont[omarb]% \ArabicDirPar}] \definestartstop [arabiso] [commands=3D% {\usefiltersequence[ISOArabic] \switchtobodyfont[omarb]% \ArabicDirPar}] \definestartstop [arabwin] [commands=3D% {\usefiltersequence[WINArabic] \switchtobodyfont[omarb]% \ArabicDirPar}] \showframe[text] \starttext \startarabutf =C3=98=C2=A7=C3=99=E2=80=9E=C3=99=E2=80=9E=C3=99=E2=80=98=C3=99=C5=BD=C3=99= =E2=80=A1=C3=99=C2=8F=C3=99=E2=80=A6=C3=99=E2=80=98=C3=99=C5=BD =C3=98=C2= =B5=C3=99=C5=BD=C3=99=E2=80=9E=C3=99=E2=80=98=C3=99=C2=90 =C3=98=C2=B9=C3= =99=C5=BD=C3=99=E2=80=9E=C3=99=C5=BD=C3=99=E2=80=B0 =C3=99=E2=80=A6=C3=99= =C2=8F=C3=98=C2=AD=C3=99=C5=BD=C3=99=E2=80=A6=C3=99=E2=80=98=C3=99=C5=BD=C3= =98=C2=AF=C3=99=C2=8D =C3=99=CB=86=C3=99=C5=BD =C3=98=C2=A2=C3=99=E2=80=9E=C3=99=C2=90 =C3=99=E2=80=A6=C3=99=C2=8F=C3=98= =C2=AD=C3=99=C5=BD=C3=99=E2=80=A6=C3=99=E2=80=98=C3=99=C5=BD=C3=98=C2=AF=C3= =99=C2=8D =C3=99=CB=86=C3=99=C5=BD =C3=98=C2=A7=C3=98=C2=B1=C3=99=E2=80=99= =C3=98=C2=B2=C3=99=C2=8F=C3=99=E2=80=9A=C3=99=E2=80=99=C3=99=E2=80=A0=C3=99= =C2=90=C3=99=C5=A0 =C3=98=C2=A7=C3=99=E2=80=9E=C3=99=E2=80=99=C3=99=C5=A0=C3=99=C5=BD=C3=99=E2= =80=9A=C3=99=C2=90=C3=99=C5=A0=C3=99=E2=80=A0=C3=99=C5=BD =C3=99=CB=86=C3= =99=C5=BD =C3=98=C2=AD=C3=99=C2=8F=C3=98=C2=B3=C3=99=E2=80=99=C3=99=E2=80= =A0=C3=99=C5=BD =C3=98=C2=A7=C3=99=E2=80=9E=C3=98=C2=B8=C3=99=E2=80=98=C3= =99=C5=BD=C3=99=E2=80=A0=C3=99=E2=80=98=C3=99=C2=90 =C3=98=C2=A8=C3=99=C2= =90=C3=99=C6=92=C3=99=C5=BD =C3=99=CB=86=C3=99=C5=BD =C3=98=C2=A3=C3=99=C5=BD=C3=98=C2=AB=C3=99=E2=80= =99=C3=98=C2=A8=C3=99=C2=90=C3=98=C2=AA=C3=99=E2=80=99 =C3=98=C2=B1=C3=99= =C5=BD=C3=98=C2=AC=C3=99=C5=BD=C3=98=C2=A7=C3=98=C2=A1=C3=99=C5=BD=C3=99=C6= =92=C3=99=C5=BD =C3=99=C2=81=C3=99=C2=90=C3=99=C5=A0 =C3=99=E2=80=9A=C3=99= =C5=BD=C3=99=E2=80=9E=C3=99=E2=80=99=C3=98=C2=A8=C3=99=C2=90=C3=99=C5=A0 =C3=99=CB=86=C3=99=C5=BD =C3=98=C2=A7=C3=99=E2=80=9A=C3=99=E2=80=99=C3=98= =C2=B7=C3=99=C5=BD=C3=98=C2=B9=C3=99=E2=80=99 =C3=98=C2=B1=C3=99=C5=BD=C3= =98=C2=AC=C3=99=C5=BD=C3=98=C2=A7=C3=98=C2=A6=C3=99=C2=90=C3=99=C5=A0 =C3= =98=C2=B9=C3=99=C5=BD=C3=99=E2=80=A6=C3=99=E2=80=98=C3=99=C5=BD=C3=99=E2=80= =A0=C3=99=E2=80=99 =C3=98=C2=B3=C3=99=C2=90=C3=99=CB=86=C3=99=C5=BD=C3=98= =C2=A7=C3=99=C6=92=C3=99=C5=BD =C3=98=C2=AD=C3=99=C5=BD=C3=98=C2=AA=C3=99=E2=80=98=C3=99=C5=BD=C3=99=E2=80= =B0 =C3=99=E2=80=9E=C3=99=C5=BD=C3=98=C2=A7 =C3=98=C2=A3=C3=99=C5=BD=C3=98= =C2=B1=C3=99=E2=80=99=C3=98=C2=AC=C3=99=C2=8F=C3=99=CB=86=C3=99=C5=BD =C3= =98=C2=BA=C3=99=C5=BD=C3=99=C5=A0=C3=99=E2=80=99=C3=98=C2=B1=C3=99=C5=BD=C3= =99=C6=92=C3=99=C5=BD =C3=99=CB=86=C3=99=C5=BD =C3=99=E2=80=9E=C3=99=C5=BD= =C3=98=C2=A7 =C3=98=C2=A3=C3=99=C5=BD=C3=98=C2=AB=C3=99=C2=90=C3=99=E2=80=9A=C3=99=C5=BD= =C3=98=C2=A5=C3=99=C2=90=C3=99=E2=80=9E=C3=99=E2=80=98=C3=99=C5=BD=C3=98= =C2=A7 =C3=98=C2=A8=C3=99=C2=90=C3=99=C6=92=C3=A2=E2=82=AC=C2=8F \stoparabutf \blank \startarabiso =C3=87=C3=A4=C3=A4=C3=B1=C3=AE=C3=A7=C3=AF=C3=A5=C3=B1=C3=AE =C3=95=C3=AE= =C3=A4=C3=B1=C3=B0 =C3=99=C3=AE=C3=A4=C3=AE=C3=A9 =C3=A5=C3=AF=C3=8D=C3=AE= =C3=A5=C3=B1=C3=AE=C3=8F=C3=AD =C3=A8=C3=AE =C3=82=C3=A4=C3=B0 =C3=A5=C3=AF= =C3=8D=C3=AE=C3=A5=C3=B1=C3=AE=C3=8F=C3=AD =C3=A8=C3=AE =C3=87=C3=91=C3=B2= =C3=92=C3=AF=C3=A2=C3=B2=C3=A6=C3=B0=C3=AA =C3=87=C3=A4=C3=B2=C3=AA=C3=AE=C3=A2=C3=B0=C3=AA=C3=A6=C3=AE =C3=A8=C3=AE= =C3=8D=C3=AF=C3=93=C3=B2=C3=A6=C3=AE =C3=87=C3=A4=C3=98=C3=B1=C3=AE=C3=A6= =C3=B1=C3=B0 =C3=88=C3=B0=C3=A3=C3=AE =C3=A8=C3=AE =C3=83=C3=AE=C3=8B=C3=B2= =C3=88=C3=B0=C3=8A=C3=B2 =C3=91=C3=AE=C3=8C=C3=AE=C3=87=C3=81=C3=AE=C3=A3= =C3=AE =C3=A1=C3=B0=C3=AA =C3=A2=C3=AE=C3=A4=C3=B2=C3=88=C3=B0=C3=AA =C3=A8=C3=AE =C3=87=C3=A2=C3=B2= =C3=97=C3=AE=C3=99=C3=B2 =C3=91=C3=AE=C3=8C=C3=AE=C3=87=C3=86=C3=B0=C3=AA= =C3=99=C3=AE=C3=A5=C3=B1=C3=AE=C3=A6=C3=B2 =C3=93=C3=B0=C3=A8=C3=AE=C3=87= =C3=A3=C3=AE =C3=8D=C3=AE=C3=8A=C3=B1=C3=AE=C3=A9 =C3=A4=C3=AE=C3=87 =C3=83= =C3=AE=C3=91=C3=B2=C3=8C=C3=AF=C3=A8=C3=AE =C3=9A=C3=AE=C3=AA=C3=B2=C3=91=C3=AE=C3=A3=C3=AE =C3=A8=C3=AE =C3=A4=C3=AE= =C3=87 =C3=83=C3=AE=C3=8B=C3=B0=C3=A2=C3=AE =C3=85=C3=B0=C3=A4=C3=B1=C3=AE= =C3=87 =C3=88=C3=B0=C3=A3 \stoparabiso \blank \startarabwin =C3=87=C3=A1=C3=A1=C3=B8=C3=B3=C3=A5=C3=B5=C3=A3=C3=B8=C3=B3 =C3=95=C3=B3= =C3=A1=C3=B8=C3=B6 =C3=9A=C3=B3=C3=A1=C3=B3=C3=AC =C3=A3=C3=B5=C3=8D=C3=B3= =C3=A3=C3=B8=C3=B3=C3=8F=C3=B2 =C3=A6=C3=B3 =C3=82=C3=A1=C3=B6 =C3=A3=C3=B5= =C3=8D=C3=B3=C3=A3=C3=B8=C3=B3=C3=8F=C3=B2 =C3=A6=C3=B3 =C3=87=C3=91=C3=BA= =C3=92=C3=B5=C3=9E=C3=BA=C3=A4=C3=B6=C3=AD =C3=87=C3=A1=C3=BA=C3=AD=C3=B3=C3=9E=C3=B6=C3=AD=C3=A4=C3=B3 =C3=A6=C3=B3= =C3=8D=C3=B5=C3=93=C3=BA=C3=A4=C3=B3 =C3=87=C3=A1=C3=99=C3=B8=C3=B3=C3=A4= =C3=B8=C3=B6 =C3=88=C3=B6=C3=9F=C3=B3 =C3=A6=C3=B3 =C3=83=C3=B3=C3=8B=C3=BA= =C3=88=C3=B6=C3=8A=C3=BA =C3=91=C3=B3=C3=8C=C3=B3=C3=87=C3=81=C3=B3=C3=9F= =C3=B3 =C3=9D=C3=B6=C3=AD =C3=9E=C3=B3=C3=A1=C3=BA=C3=88=C3=B6=C3=AD =C3=A6=C3=B3 =C3=87=C3=9E=C3=BA= =C3=98=C3=B3=C3=9A=C3=BA =C3=91=C3=B3=C3=8C=C3=B3=C3=87=C3=86=C3=B6=C3=AD= =C3=9A=C3=B3=C3=A3=C3=B8=C3=B3=C3=A4=C3=BA =C3=93=C3=B6=C3=A6=C3=B3=C3=87= =C3=9F=C3=B3 =C3=8D=C3=B3=C3=8A=C3=B8=C3=B3=C3=AC =C3=A1=C3=B3=C3=87 =C3=83= =C3=B3=C3=91=C3=BA=C3=8C=C3=B5=C3=A6=C3=B3 =C3=9B=C3=B3=C3=AD=C3=BA=C3=91=C3=B3=C3=9F=C3=B3 =C3=A6=C3=B3 =C3=A1=C3=B3= =C3=87 =C3=83=C3=B3=C3=8B=C3=B6=C3=9E=C3=B3 =C3=85=C3=B6=C3=A1=C3=B8=C3=B3= =C3=87 =C3=88=C3=B6=C3=9F=C3=BE \stoparabwin \blank Here is some mixed {\em Arabic-} (\ArabicTextUTF{=C3=98=C2=B9=C3=98=C2=B1= =C3=98=C2=A8=C3=99=C5=A0}) and Latin-script. As you can see, Aleph does a very good job mixing {\em LR} (\ArabicTextUTF{=C3=99=C5=A0=C3=98=C2=B3=C3=98=C2=A7=C3=98=C2=B1= -=C3=99=C5=A0=C3=99=E2=80=A6=C3=99=C5=A0=C3=99=E2=80=A0}) and {\em RL} (\ArabicTextUTF{=C3=99=C5=A0=C3=99=E2=80=A6=C3=99=C5=A0=C3=99=E2=80=A0-=C3= =99=C5=A0=C3=98=C2=B3=C3=98=C2=A7=C3=98=C2=B1}) texts. \ArabicTextUTF{=C3= =99=CB=86 =C3=99=E2=80=A1=C3=99=E2=80=A0=C3=98=C2=A7 =C3=98=C2=AC=C3=99=E2=80=A6=C3= =99=E2=80=9E=C3=98=C2=A9 =C3=99=E2=80=A6=C3=99=E2=80=A0=C3=99=E2=80=9A=C3= =98=C2=B7=C3=98=C2=B9=C3=98=C2=A9 =C3=99=C2=81=C3=99=C5=A0 =C3=99=CB=86=C3= =98=C2=B3=C3=98=C2=B7 =C3=99=E2=80=9A=C3=98=C2=B1=C3=99=C5=A0=C3=99=E2=80= =A0=C3=98=C2=A9 =C3=99=E2=80=9E=C3=98=C2=A7=C3=98=C2=AA=C3=99=C5=A0=C3=99=E2=80=A0=C3=99=C5= =A0=C3=98=C2=A9}. Aleph even does a great job breaking Arabic phrases across lines. \stoptext =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D III. Going beyond. The last example shows how to make and apply your own filter sequences =20 beyond the basic Gamma module. To go further u need to learn some =20 low-level business. You will also need some working utilities. I have put= =20 together a windows package that you can unzip to C:\ConTeXt. These =20 utilities do work, but they are cobbled together from old fpTeX and MiKTe= X =20 versions. just place the tree in C:\ConTeXt\ 1. Example: If you want to get the final Persian kaaf instead of the =20 default Arabic one: Check to see if your glyph is in the Arabic font. The Arabic font is made= =20 of 6 raw fonts: 3 regular and three bold: C:\ConTeXt\tex\texmf-local\fonts\type1\public\omega omsea1, omsea1b,...omsea3b Using a font viewer or editor you will find the Persian final kaaf in =20 omsea2, named kafswashfin. Now go to C:\ConTeXt\tex\texmf-local\omega\lambda\misc and open omarab.cfg you will find a line 04AA N kafswashfin This means that the 044A is the virtual font position for kafswashfin. =20 Open cuni2oar.otp and add the following at line 263: %@"E343 =3D> @"04AA; Following this line you should see % remaining Arabic glyphs @"E000-@"E3FF =3D> #(\1 - @"DF00); Basically, in uni2cuni.otp final-kaaf gets mapped to E343. In the font, w= e =20 want it mapped to kafswashfin, so we did that. Now recompile the otp: otp2ocp cuni2oar Now you will get kafswashfin for the final kaaf. 2. Want new fonts (Arabic or Latin). Here are the instructions: 1. Read the following two papers carefully again and again; they are your friends:-) http://omega.enstb.org/papers/tsukuba-methods97.pdf http://omega.enstb.org/papers/ridt-omega98.pdf 2. Make a pfb file containing the glyphs you need, or use an existing fon= t 3.Make a cfg file a la texmf\omega\lambda\misc\omlgc.cfg Make sure u list= =20 your glyph positions in hexadecimal notation. 5. Get the following from an old TeXLive distro: \support\makeovp.zip, containing makeovp.pl. There is a SH file with a sample of its use using omlgc. 4. Following are instructions for cooking omarab.ovf. You want your own ovf, say, omlgcch.ovf ( for ). Generate an afm file for your private glyph pfb/pfa plus the afm files that are listed in the SH file (base files for omlgc found in \texmf\fonts\afm\public\omega ) Using the instructions below and the SH file (IGNORE the kernings.afm file!) you can figure out how to make your own ovp and ovf. Before making the ovf file, examine the ovp file created, especially the first few lines, to see how the font-metric info from the afm's are concatenated. Very instructive. 6. Don't forget the rest of the accounting: a) adding lines to a map file and pointing dvips/dvipdfm to it; b) create a typescript file; c) edit your otp's. If u get stuck be sure to read http://omega.enstb.org/papers/tsukuba-arabic97.pdf =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [How to cook omarab.ovf:] [Ingredients: omarab.cfg, omseco.afm, omsea1.afm, omsea2.afm, omsea3.afm] #perl makeovp.pl omarab.cfg omseco.afm omsea1.afm omsea2.afm omsea3.afm =20 omarab.ovp #pltotf omseco.pl omseco.tfm #pltotf omsea1.pl omsea1.tfm #pltotf omsea2.pl omsea2.tfm #pltotf omsea3.pl omsea3.tfm #ovp2ovf omarab.ovp omarab.ovf omarab.ofm [If the last line does not work, try #ovp2ovf omarab.ovp omarab.ovf omarab.tfm rename omarab.tfm to omarab.ofm =3D=3D=3D> ofm directory] ----------------------------- [How to distill omarab.ovp from omarab.ovf:] [Use a different directory or a different name for the output ovp so that omarab.ovp created above is not overwritten] [get omarab.ofm & rename to omarab.tfm] #ovf2ovp omarab.ovf omarab.tfm omarab.ovp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D [How to cook omarabb.ovf:] [Ingredients: omarab.cfg, omsecob.afm, omsea1b.afm, omsea2b.afm, =20 omsea3b.afm] #perl makeovp.pl omarab.cfg omsecob.afm omsea1b.afm omsea2b.afm =20 omsea3b.afm omarabb.ovp #pltotf omsecob.pl omsecob.tfm #pltotf omsea1b.pl omsea1b.tfm #pltotf omsea2b.pl omsea2b.tfm #pltotf omsea3b.pl omsea3b.tfm #ovp2ovf omarabb.ovp omarabb.ovf omarabb.ofm [If the last line does not work, try #ovp2ovf omarabb.ovp omarabb.ovf omarabb.tfm rename omarab.tfm to omarab.ofm =3D=3D=3D> ofm directory] ----------------------------- [How to distill omarabb.ovp from omarabb.ovf:] [Use a different directory or a different name for the output ovp so that omarabb.ovp created above is not overwritten] [get omarab.ofm & rename to omarab.tfm] #ovf2ovp omarabb.ovf omarabb.tfm omarabb.ovp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 3. For more info, there is also the (mostly cryptic) Omega manual: http://omega.enstb.org/roadmap/doc-1.12.ps Don't ask me why it's not in pdf-( See also http://omega.enstb.org/papers/tsukuba-arabic97.pdf IV. Misc. 1. Some people have gotten large opentype fonts to work in Aleph/Omega. =20 Probably they used FontForge to convert to CFF-enriched type1. FF can =20 produce ofm files (large tfms) so that's a help too. 2. Me, I'm working on an advanced Arabic-script typesetting system that =20 really pushes Aleph to the max. At present I don't actually use m-gamma, = =20 etc, but my own macros. I really hope to release something this year... 3. See also http://www.dtek.chalmers.se/~d97ost/omega-example.html V. To the future: 1. The otp mechanism does not seem well suited to support, e.g., opentype= =20 GPOS tables, important for really advanced Arabic (though GDEF and GSUB =20 should work fine with the present mechanism for most purposes). We need a= =20 better model for horizontal and vertical glyph substitutions. 2. The low-level filtersequence mechanism needs to abstract language =20 processing from font mapping. Right now both are hardwired into a single = =20 sequence, so setting up more than one font for a single language is more = =20 of a pain than it should be. 3. The otp language is a bit cryptic. Hans has suggested switching otp's = =20 to a new language (like lua or io) but I don't know how hard that will =20 be... 4. One very important feature which may work better at the =20 primitive/engine level by extending the pdfetex engine: glyph substitution that depends on the paragraph. For example: In =20 traditional Arabic typography, one way to compensate for "underfull" paragraphs is to substitute a "swash" versio= n =20 of a letter. Another way is by stretching the cursive tie between joining characters (which is already =20 implemented in my own Arabic system). Combined with HZ we can get some pretty interesting high-level =20 options, effects, etc. that the user can choose etc. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Ok, there is your (almost?) complete guide to getting going with aleph. =20 Feel free to make suggestions for improving this document. I hope you all= =20 find it useful. Again, we need a volunteer to edit this for the wiki, and= =20 a place to upload the utilities. All the Best Idris --=20 Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/