Using the techniques described in Coloring combining characters without changing color of a base character I have been able to color red the vedic accents in sanskrit typesetting using ConTexT MIV.

But, the coloring is NOT happening in all cases. For example it is not working in the very first word of the first line - हिर॑ण्यवर्णां॒ - but is working in the second word of fourth line - हिर॑ण्य .

How do I fix it?

(The font can be any unicode devanagari font that supports the vedic accents such as Siddhanta, Chandas, Sanskrit 2003 etc.)

\definefontfeature [vedic] 
\definedfont[name:Siddhanta*vedic at 18pt]
हिर॑ण्यवर्णां॒ हरि॑णीं सु॒वर्ण॑रज॒तस्र॑जाम्।\\
च॒न्द्रां हि॒रण्म॑यीं ल॒क्ष्मीं जात॑वेदो म॒ आव॑ह॥ १॥\\
तां म॒ आव॑ह॒ जात॑वेदो ल॒क्ष्मीमन॑पगा॒मिनी᳚म्।\\
यस्यां॒ हिर॑ण्यं वि॒न्देयं॒ गामश्वं॒ पुरु॑षान॒हम्॥ २॥\\
गं॒ध॒द्वा॒रां दु॑राध॒र्षां॒ नि॒त्यपु॑ष्टां करी॒षिणी᳚म्।\\
ई॒श्वरी॑ꣳ सर्व॑भूता॒नां॒ तामि॒होप॑ह्वये॒ श्रियम्॥ ९॥\\

::::::::::::::::::::::: VEDIC.LFG :::::::::::::::
-- save as 'vedic.lfg'
return {
    name = "vedic",
    version = "1.00",
    comment = "For coloring vedic accents, last updated on Oct 15, 2013",
    author = "Shree Devi Kumar",
    colorschemes = {
        vedic = {
            [1] = { -- category 1
                0x0951, 0x0952, "0xA8E0:0xA8FF", "0x1CD0:0x1CFF",

migrated from stackoverflow.com Nov 4 '13 at 5:22

This question came from our site for professional and enthusiast programmers.

  • It does not allow me to put the tag 'ConText' which is a type of tex/latex. – sdk Nov 3 '13 at 12:39
  • 3
    I would suggest posting a feature request on the context mailing list. ConTeXt already does something similar for Arabic and Korean. – Aditya Nov 4 '13 at 6:11
  • Welcome to TeX.SX! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Martin Schröder Nov 5 '13 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.