On 8-3-2010 10:38, Taco Hoekwater wrote:
Graham Douglas wrote:

And so to my question. I would very much like to explore using (or
writing (eventually...)???) commands that let me "format" Arabic words
etc as part of my notes. I have not explored this yet, so I apologise if
this is already possible 'out of the box'. I just wanted to ask the
experts here, before spending too much time exploring the wrong things!

The expert on the practical side of this would be Idris, but he is on
the road for a while. If you want to make sure to get his attention,
best would be to email him personally.

For example, I would like to be able to use colour with certain
glyphys in (any location) within Arabic words. For example
\somecommand{Arabic text} where \somecommand{...} would (for example)
put certain glyphs in colour --- particularly for grammar, where you
are writing out verb tables, or dual/plural endings for
adjectives/nouns etc.

You can use \color in the middle of an arabic word without disrupting
anything in the processing, so perhaps it would be good enough to just
do something like this:

\def\coloredalef{{\color[green]ا}}
\catcode`ا=\active
\defا{\coloredalef}

but for more advanced stuff, node processing will be needed.

In essence, where do I need to start exploring to be able to write
such things --- LuaTeX node processing, colour attributes etc??

I would have to say: the context source code (for now). There are
no articles specifically on luatex node/attribute processing yet,
just the reference manual.

we have been working on an experimental mechanism 'font goodies' which provides means to enhance fonts and one application is coloring arabic

for instance, for the husayni font (by idris, presented last week at the dante meeting), we have a goodies file that looks like:

return {
    name = "husayni",
    version = "1.00",
comment = "Goodies that complement the Husayni font by Idris Samawi Hamid.",
    author = "Idris Samawi Hamid and Hans Hagen",
    featuresets = {
        default = {
basics, analysis, regular, positioning, -- xxxx = yes, yyyy = 2,
        },
    },
    stylistics = {
        ss01 = "Allah, Muhammad",
        ....
        ss55 = "idgham-tanwin",
        js01 = "Raawide",
        ....
        js21 = "Haa.final_alt2",
    },
    colorschemes = {
        default = {
            [1] = {
"Onedotabove", "Onedotbelow", "Twodotsabove", "Twodotsbelow", "Threedotsabove", "Twodotsabove.vrt", "Twodotsbelow.vrt", "Twodotsabove.KBA", "Threedotsabove.KBA", "Threedotsbelowinv", "Hamzahabove", "Hamzahbelow", "MaaddahHamzah.identity", "Waslah","Hamzah.initial_medial",
            },
            ....
            [5] = {
                "Ayah", "Ayah.alt1", "Ayah.alt2", "Ayah.alt3", "Ayah2",
            }
        }
    }
}

Of course such a file should match a font, but it permits things like:

\definefontfeature
  [husayni-colored]
  [goodies=husayni,
   colorscheme=default,
   featureset=default]

I can imagine that we make a collection of goodies for fonts that make sense. Concerning the arabic ... best coordinate this with idris as he's working on the benchmark arabic font.

And no, this is not documentted (yet) apart from an 'article' in hybrid.pdf which is not net on line.

Hans



-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to