[XeTeX] Binding control sequence to input character

ShreeDevi Kumar shreeshrii at gmail.com
Mon Dec 22 06:52:55 CET 2014


Thank you for your reply. Initially I could not figure out how to
deactivate the catcode in the definition.

Now, I have got it to work. It is for increasing the size of A8F3 DEVANAGARI
SIGN CANDRABINDU VIRAMA in the Siddhanta font.

Here is the code that worked for me ...
----
% This is a Unicode file in devanagari script for processing with XeLaTex.
\documentclass[11pt]{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{xcolor}
\setmainfont{FreeSerif}
\newfontfamily\englishfont{FreeSerif}
\newfontfamily\sanskritfont[Script=Devanagari]{Siddhanta}
%\newfontfamily\devanagarifont[Script=Devanagari,Language=Sanskrit]{FreeSerif}
\setdefaultlanguage{sanskrit}
\setotherlanguage{english}
%
\begingroup
  \lccode`\~=`ꣳ
  \lowercase{\endgroup
    \def~{{\Large\textcolor{red}{ꣳ}}}%
  }
\catcode`ꣳ=\active
%
\begin{document}
आपो॒ वा इ॒दꣳ सर्वं॒ विश्वा॑ भू॒तान्यापः॑ प्रा॒णा वा आपः॑ \\
प॒शव॒ आपोऽन्न॒मापोऽमृ॑त॒मापः॑ स॒म्राडापो॑ वि॒राडापः॑ \\
स्व॒राडाप॒श्छन्दा॒ꣳस्यापो॒ ज्योती॒ꣳष्यापो॒ \\
यजू॒ꣳष्याप॑स्स॒त्यमाप॒स्सर्वा॑ दे॒वता॒ आपो॒  \\
भूर्भुव॒स्सुव॒राप॒ ओं॥
\end{document}
%%
--------------

I have another question now... is it possible to move this letter a bit to
left - at the larger size the intercharacter spacing is larger than the
rest of the text.

I have attached the generated pdf - the 'mark' in question is in red.

Thanks,
Shree

ShreeDevi
____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

On Sun, Dec 21, 2014 at 10:45 PM, Philip Taylor <P.Taylor at rhul.ac.uk> wrote:

>
>
> Philip Taylor wrote:
>
>>
>> ShreeDevi Kumar wrote:
>>
>
>  Is it possible in xelatex to bind a control sequence to an input
>>> character ?
>>>
>>
>> I cannot think why not :  can you not simply write :
>>
>>      \def \mycontrolsequence {...}
>>
>
> or even :
>
>         \let \mycontrolsequence = ...
>
>
> Philip Taylor
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20141222/f0ad7fb3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chandra.pdf
Type: application/pdf
Size: 36418 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20141222/f0ad7fb3/attachment-0001.pdf>


More information about the XeTeX mailing list