Bonjour,

the problem is that catcodes are examined and interpreted upon input
but TECkit mapping occurs during output, thus special characters will
never go that far. If possible, you can change the catcodes only
locally within a block where you need them. I admit that it can be too
cumbersome thus another possibility is to do:

\def\subscript{_}
\catcode`\_=11

Now \subscript contains the original character usable in math, you can
thus write \subscript{i}, while _ can be used in the mapping for
virama.

And if you use Linux, you can use my keyboard and write directly in
Devanagari, I made it to be as much similar to the Velthuis system as
possible. Although I provide several keyboards in one package, you can
install just one of them, they are independent. It is available from
here:

http://icebearsoft.euweb.cz/cze-dvng-xkb/

pá 7. 2. 2025 v 17:12 odesílatel François Patte
<francois.pa...@mi.parisdescartes.fr> napsal:
>
> Bonjour,
>
> I am facing a problem with virama while using the velthuis
> tranliteration scheme : according the velthuis-sanskrit.map file, virama
> is mapped to "&" and "_".
>
> I use FreeSerif fonts and some ligatures can be acceeded using a virama
> eg.:
>
> r+r-vocalic (r.r) gives: रृ or
> r+virama+r-vocalic (r&.r) gives: र्ऋ
>
> To get the second ligature (र्ऋ), which I prefer, I have to change the
> catcode of "&" or"_":
>
> \catcode`\&=11\relax or \catcode`\_=11\relax
>
> Both cases have one major disadvantage: for "&", I can't use tabular
> environments, for "_"; I can't use mathematical mode...
>
> Is there a way around this problem? Is there a feature in fontspec
> allowing the use of alternative ligatures?
>
> Or do I have to map the virama to an other character (which one?) in
> velthuis-sanskrit.map file?
>
> Thank you.
>
> Regards
> --
> François Patte
> UFR de mathématiques et informatique
> Laboratoire CNRS MAP5, UMR 8145
> Université Paris Descartes
> 45, rue des Saints Pères
> F-75270 Paris Cedex 06
> Tél. +33 (0)6 7892 5822
> http://www.math-info.univ-paris5.fr/~patte


Zdeněk Wagner
https://www.zdenek-wagner.eu/

Reply via email to