ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "J.A.J. Pater" <jajpater@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: XeTeX and/or LuaTeX?
Date: Sat, 31 Jan 2009 00:14:31 +0100	[thread overview]
Message-ID: <498389D7.1080006@gmail.com> (raw)
In-Reply-To: <49830B8A.8050008@wxs.nl>

[-- Attachment #1: Type: text/plain, Size: 2126 bytes --]

I've already send a mail in reply to Hans, but it was to big since I 
attached the TTF.
I don't know if the moderator will approve of posting fonts.
But it can also be found on the web: 
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=EzraSIL_Home
So the moderator can drop my last mail, it was to extensive anyway.
Installed on my computer [Ubuntu Intrepid 8.10] 
/usr/share/fonts/truetype/ttf-sil-ezra/SILEOT.ttf

I got the font working by adapting the ara-sty from 
http://wiki.contextgarden.net/Arabic_and_Hebrew to heb-sty (attached)
I also adapted the example from the above link (attached as test.tex).
I ran it with the minimals.

Issues I still have:
I don't know how to use Hebrew and Latin text next to each other.
I don't like the font I get with \setlatin
I don't want every word on a new page
I don't have the faintest clue as to what I'm doing inside of heb-sty.

What's important for me is to use hebrew text inside of latin text.
I'd like to be able to do things like:

\starttext
This is the word for peace: \hebrew[שלם].
Isn't that what we all wish for?
\stoptext

Many thanks to Hans and Mojca!

Adriaan.

P.S. If you're interested in what I don't get in ara-sty casu quo heb-sty:

1. \mainlanguage[hebrew]
The wiki: "Sets the main language to hebrew, so that translatable titles
are translated to Arabic."
What exactly does "translatable titles" mean in this senctence?
The main language of my document is in Latin.

2a. Why all the following stuff:

\starttypescript [serif] [hebrew] [name]
\usetypescript[serif][fallback]
\definefontsynonym [Serif] [Ezra SIL] [features=hebrew]
\definefontsynonym [SerifItalic] [Ezra SIL] [features=hebrew]
\definefontsynonym [SerifBold] [Ezra SIL] [features=hebrew]
\definefontsynonym [SerifBoldItalic] [Ezra SIL] [features=hebrew]
\stoptypescript

2b. What does serif mean?

3. I don't get the defining of the directional commands either.

4. I absolutely don't get what I'm doing here

\definestartstop
[hebrewpar]
[commands=\Hebrew\HebrewParDir]

\define[1]\RT
{{\Hebrew\HebrewTextDir#1}}

[-- Attachment #2: heb-sty.tex --]
[-- Type: text/x-tex, Size: 1591 bytes --]

\startenvironment heb-sty

\mainlanguage[hebrew]

% Font setup

\definefontfeature
   [hebrew]
   [mode=node,language=dflt,script=hebr,
    init=yes,medi=yes,fina=yes,isol=yes,
    liga=yes,dlig=yes,rlig=yes,clig=yes,
    mark=yes,mkmk=yes,kern=yes,curs=yes]

\starttypescript [serif] [hebrew]
 \definefontsynonym [Ezra SIL] [name:SILEOT] [features=hebrew]
\stoptypescript

\starttypescript [serif] [hebrew] [name]
 \usetypescript[serif][fallback]
 \definefontsynonym [Serif]           [Ezra SIL] [features=hebrew]
 \definefontsynonym [SerifItalic]     [Ezra SIL] [features=hebrew]
 \definefontsynonym [SerifBold]       [Ezra SIL] [features=hebrew]
 \definefontsynonym [SerifBoldItalic] [Ezra SIL] [features=hebrew]
\stoptypescript

\starttypescript [Hebrew]
  \definetypeface [Hebrew] [rm] [serif] [hebrew] [default] 
\stoptypescript 

\def\HebrewGlobalDir {\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT}
\def\HebrewParDir    {\textdir TRT\pardir TRT}
\def\HebrewTextDir   {\textdir TRT}
\def\LatinParDir     {\textdir TLT\pardir TLT}
\def\LatinTextDir    {\textdir TLT}
\def\LatinGlobalDir  {\pagedir TLT\bodydir TLT\pardir TLT\textdir TLT}

\define\sethebrew
  {\HebrewGlobalDir%
   \usetypescript[Hebrew]%
   \setupbodyfont[Hebrew,20pt]}

\definestartstop
  [hebrewpar]
  [commands=\Hebrew\HebrewParDir]

\define[1]\RT
  {{\Hebrew\HebrewTextDir#1}}

\define\setlatin
  {\LatinGlobalDir%
   \usetypescript[lm]%
   \setupbodyfont[lm,20pt]}

\definestartstop
  [latinpar]
  [commands=\Hebrew\LatinParDir]

\define[1]\LT
  {{\LatinTextDir#1}}

\setcharactermirroring[1]

\stopenvironment


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: test.tex --]
[-- Type: text/x-tex; name="test.tex", Size: 134 bytes --]

% engine=luatex 

\environment heb-sty

\starttext
This is a test.

\sethebrew הָלַך

\setlatin walking

\stoptext


[-- Attachment #4: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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:[~2009-01-30 23:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-30 10:29 J.A.J. Pater
2009-01-30 10:39 ` Yue Wang
2009-01-30 11:12   ` J.A.J. Pater
2009-01-30 11:20     ` Wolfgang Schuster
2009-01-30 14:15     ` Hans Hagen
2009-01-30 23:14       ` J.A.J. Pater [this message]
2009-01-30 23:50         ` Hans Hagen
2009-01-31  9:33           ` J.A.J. Pater
2009-01-31 10:30           ` J.A.J. Pater
2009-01-31 12:21           ` Mojca Miklavec
2009-01-31 13:37             ` J.A.J. Pater
2009-01-31 18:54             ` J.A.J. Pater
2009-01-31 21:16               ` Mojca Miklavec
2009-02-01 12:07                 ` Hans Hagen
2009-02-01 12:04             ` Hans Hagen
2009-01-30 14:14 ` Hans Hagen
2009-01-30 22:08 ` Mojca Miklavec

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=498389D7.1080006@gmail.com \
    --to=jajpater@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).