[XeTeX] Mixed Roman and Indian alphabets for Sanskrit

Dominik Wujastyk wujastyk at gmail.com
Sun Feb 19 22:05:18 CET 2017


Dear Javier,

In this scheme, "arabic" can mean two things.  Can that be avoided?  Could
Babel use terms like "Nastaʿlīq", "Naskh", or "Kufic", or even
"ArabicScript" for writing systems, and "arabic|Arabic" for the language?

The more I look into this, the more I think that usages like your style

​

\fontspec[Language=Sanskrit,Script=Grantha]{FontName}


are the right way to go.

You say,

​

But if we want two different fonts, we could say

\usebabelfont[arabic]{ArabicFontName}
\usebabelfont[urdu]{UrduFontName}

​
I didn't understand this at first glance, but I think I do now.  Saying
"[urdu]" is a shorthand for "[Language=Urdu]", is that right?  But this
appears not to meet the case where the user wants two different fonts for
the same language.

Say I'm writing a book in Hindi language explaining the use of the
Devanagari, Grantha, Bangla, and Śāradā scripts for writing Sanskrit, with
keys in Latin script.

I'd need statements like this:

​
\fontspec[Language=Hindi,Script=Devanagari]{FontName}
\fontspec[Language=Sanskrit,Script=Devanagari]{FontName}

\fontspec[Language=Sanskrit,Script=LatinScript]{FontName}

\fontspec[Language=Sanskrit,Script=Sarada]{FontName}
\fontspec[Language=Sanskrit,Script=Grantha]{FontName}
\fontspec[Language=Sanskrit,Script=BanglaLipi]{FontName}


Problems:

   - "Bangla" and "Latin" are awkward, like "Arabic,"  because they're the
   names of both a language and a script.  "Bangla lipi" just means "Bengali
   writing," and is what Bengalis say when they specifically refer to the
   script.
   - Saying \selectlanguage{sanskrit} isn't going to be any use in my
   document, because "{Sanskrit}" could be any of several scripts.

Best,
Dominik


On 18 February 2017 at 04:59, Javier Bezos <listas at tex-tipografia.com>
wrote:

>     \usebabelfont[*devanagari]{FontName}
>>
>
> Just a little explanation about its behavior. If we say
>
> \selectlanguage{sanskrit}
>
> then both the language and the script will be set. More precisely,
> using the info in the new language files I'm writing (almost by hand!),
> babel will do at this point something similar to:
>
> \fontspec[Language=Sanskrit,Script=Devanagari]{FontName}
>
> (Actually, things are a bit more complicated.) Note the selection
> will be always with the language, not with the script. This means
> the following makes sense
>
> ​​
> \usebabelfont[*arabic]{FontName}
>
> \selectlanguage{arabic}
> \selectlanguage{urdu}
>
> which will do:
>
> ​​
> ​​
> \fontspec[Language=Arabic,Script=Arabic]{FontName}
> \fontspec[Language=Urdu,Script=Arabic]{FontName}
>
> ​​
> But if we want two different fonts, we could say
>
> \usebabelfont[arabic]{ArabicFontName}
> \usebabelfont[urdu]{UrduFontName}
>
>
> Javier
>
>
>
>
>
> --------------------------------------------------
> 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/20170219/d4858ebb/attachment.html>


More information about the XeTeX mailing list