On Tue, 07 Oct 2008 04:53:40 -0600, Mojca Miklavec  
<[EMAIL PROTECTED]> wrote:

> On Mon, Oct 6, 2008 at 1:57 AM, Idris Samawi Hamid ادريس سماوي حامد

>> Sometimes I use the following for simple substitutions:
>>
>> \defineactivecharacter  '  {\otfchar{quoteright}}
>>
>> But is there a more general mechanism to do things
>>
>> \definesubstitution{<string1>}{<string2>}
>>
>> eg
>>
>> \definesubstitution{--}{–}
>>
>> Of course ConTeXt already provides this particular substitution
>
> In mkii it doesn't. Fonts do that substitution. In mkiv a hack is
> applied to fonts (not to TeX macros), so that this particular
> substitution works.

Hmm, so this is much more complicated than I thought...

>> but I'm
>> interested in such a mechanism for more general purposes.
>
> In mkii this is not possible, except with some ugly hacks. You can
> easily substitute a single character by making it active. To
> substitute whole words, you either need to modify fonts, or write some
> dirty macros.

I see. In any case, mkii is "obsolete" for my purposes, if/when I get to  
writing a book on ConTeXt it will cover mkiv only.

> In mkiv you can either apply some "patches" to fonts (search for tlig
> in ConTeXt source, for example font-otf.lua, also, there are some fea
> files in fonts/fea/context capable of doing that), or change input
> text while reading/digesting some TeX file.

tlig was buggy, but it works in the latest beta. Thank you, Hans!

> Hans and Taco can probably tell you more.

And Thank you, Mojca!

Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___________________________________________________________________________________
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 via email to