On 11/07/2017 01:48 PM, Sava Maksimović wrote:
Is there a way in context, that for some*text*  ascii input (in source .tex
file) define mapping in internal tex system ?

For example, if i put two ascii characters "dj" in .tex file, can i  get
cyrillic character "ђ" in .pdf ?
And so on, for input b, v, g, d, ... to get output б, в, г, д, ...

Or more general, for every letter/string in unicode to define the way that
it should be read.

It's benefit for non ascii language users, because in that case they don't
need to switch keyboard layout all the time between command, math input and
text input.

When mkiv was in its infancy, Hans helped me in writing something like this for my Greek module. It basically applies a Lua string.gsub to the input to produce and typeset utf8 output. But I pretty soon gave up using it. We're in the twenty-first century, and this sort of trickery really is not needed any more. And, as Mojca has said, you would have to have your text delimited, you don't want your ConTeXt commands to be transliterated as well. I can send you the relevant code if you want, and you could adapt it to your case. But I would advise against it. In the long run, changing keyboards is less hassle than this sort of semi-solution to an obsolete problem.

In Latex, package fontenc(precisely OT2 encoding) do that things.

Yes, LaTeX stays firmly in the 1970s. But the world has moved on.

Thomas
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to