[XeTeX] problem with ~ in Mapping=velthuis-sanskrit

François Patte francois.patte at mi.parisdescartes.fr
Thu Nov 12 11:27:58 CET 2020


Bonjour,

Using the velthuis tranliteration scheme to type devanagari texts, I 
recently came accross some problem with ~n to produce ञ glyph.

In tabular like environment, the ~ returns to its non -break space 
status and ~n is rendered as न

Here is a MWE:
<----------------------------------------
\documentclass[a4paper,twoside,11pt]{report}

\usepackage{fontspec}

\setmainfont{FreeSerif}[%
Script=Default,%
Mapping=tex-text,%
Fractions=On,%
Numbers=OldStyle,%
]

\newfontfamily{\sanskritdev}{%
   FreeSerif}

\newenvironment{deva}{%
   \catcode`\~=12%
   \sanskritdev%
   \addfontfeature{%
     Mapping=velthuis-sanskrit,%
     Scale=MatchLowercase,
   }%
}%
{\catcode`\~=13}

\usepackage{stackengine}

\begin{document}

\newcommand{\vaq}[2]{%
   \begin{tabular}{@{\,}c@{\,}}
     #1\\
     {\deva #2}
   \end{tabular}%
}

\newcommand{\vak}[2]{%
   \stackon{#1}{\deva #2}%
}

{\deva ~na}

\vaq{2}{~na}

  \vak{3}{~na}

\end{document}
<-------------------------------------------

-- 
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
FSF
https://www.fsf.org/blogs/community/presenting-shoetool-happy-holidays-from-the-fsf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x744E82D9D855D895.asc
Type: application/pgp-keys
Size: 7362 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20201112/f11e1f1c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <https://tug.org/pipermail/xetex/attachments/20201112/f11e1f1c/attachment.sig>


More information about the XeTeX mailing list.