Re: [XeTeX] Mixed Roman and Indian alphabets for Sanskrit

2017-02-14 Thread alessandro
Yes, exactly. I'm using this newcommand to get devanagari with Sanskrit 
hyphenation:


\newcommand{\dn}[1]{\textsanskrit{\devanagarifont{#1}}}

I also use this for occasional romanized Sanskrit passages within 
English prose, to switch the hyphenation from English to Sanskrit and 
also get the italics along:


\newcommand{\romskt}[1]{\textsanskrit{\emph{#1}}}

Cheers,

Alessanro



On 02/14/2017 03:00 PM, Dominik Wujastyk wrote:
Nice to see you here, Alessandro!  Many thanks for your code.  So it's 
the \begin{sanskrit} that switches on the correct hyphenation. And the 
string "devanagari" in \devanagarifont is the same as switching on 
[Script=Devanagari], I guess.


So for the common situation like this:

 संस्कृतभाषा (/saṃskṛtabhāṣā/)

​one could construct

\newcommand{\skt}[1]{%

\begin{sanskrit}{\devanagarifont #1} (\emph{{\sanskritfont
#1}})\end{sanskrit}%

}​

​and get the right scripts and hyphenations.

Even if this works, I am unhappy with the terminological confusion 
between scripts and languages.  This seems to be built in to 
Polyglossia.  As we both know, many languages are written in 
Devanagari, and Sanskrit is written in many scripts, including Latin. 
 ​This isn't very clearly expressed in Polyglossia.



​Must rush,
Best, and greetings to the family,
Dominik​


​
--
Professor Dominik Wujastyk 
​,​

Singhmar Chair in Classical Indian Society and Polity
​,​

Department of History and Classics 


​,​
University of Alberta, Canada
​.​

South Asia at the U of A:
​sas.ualberta.ca​ 
​​


On 14 February 2017 at 04:01, Zdenek Wagner > wrote:


As already mentioned, Script=Devanagari switches the correct
shaping of the font so that ki appears as कि and not as क followed
by ि matra. Try to enter किताब with and without it and you will
see the difference.


Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml

http://icebearsoft.euweb.cz

2017-02-14 11:30 GMT+01:00 Ulrike Fischer >:

Am Mon, 13 Feb 2017 16:47:09 -0700 schrieb Dominik Wujastyk:

> Does "Script=Devanagari" turn on the hypy-sa hyphenation fil

No. hyphenation patterns are turned on with \selectlanguage{XXX}
commands  (and similar commands from polyglossia, babel or the
engines).

--
Ulrike Fischer
http://www.troubleshooting-tex.de/




--
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex






--
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex






--
Subscriptions, Archive, and List information, etc.:
   http://tug.org/mailman/listinfo/xetex


--
Dr. Alessandro Graheli
Institute for the Cultural and Intellectual History of Asia
Austrian Academy of Sciences
Hollandstrasse 11-13, 2nd Floor
1020 Vienna
Austria
Tel +43 1 51581 6406
http://homepage.univie.ac.at/alessandro.graheli



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] misaligned math if \smash used in subscripts

2017-02-14 Thread jfbu
Le 14/02/2017 à 15:42, Herbert Schulz a écrit :
> 
>> On Feb 14, 2017, at 2:36 AM, jfbu  wrote:
>>
>> Hi,
>>
>> just to point out that there is interesting effect if the
>> very first \smash. is simply replaced by an x
>>
>> \hrule
>> $$
>> \hbox{$\left)\vbox to15pt{}\right.$}_{x} % or also _{\hbox{x}}
>> \hbox{$\left)\vbox to15pt{}\right.$}_{\smash.}
>> \hbox{$\left)\vbox to15pt{}\right.$}_{\smash.}
>> $$
>> \hrule
>>
>> Jean-François
> 
> 
> Howdy,
> 
> I only see a single sub-scripted x from the first line. This is with a fully 
> updated TeX Live 2016 originally installed by the MacTeX package.
> 

Hi Herb

I should have reproduced David's lines selecting an OpenType font

\font\m= "[latinmodern-math.otf]/OT:script=math;language=DFLT;" at 10pt
\font\sm= "[latinmodern-math.otf]/OT:script=math;language=DFLT;" at 7pt
\font\ssm= "[latinmodern-math.otf]/OT:script=math;language=DFLT;" at 5pt

\textfont0=\m
\scriptfont0=\sm
\scriptscriptfont0=\ssm


\Umathcode`.= 0 0 `.


The code snippet

>> \hrule
>> $$
>> \hbox{$\left)\vbox to15pt{}\right.$}_{x} % or also _{\hbox{x}}
>> \hbox{$\left)\vbox to15pt{}\right.$}_{\smash.}
>> \hbox{$\left)\vbox to15pt{}\right.$}_{\smash.}
>> $$
>> \hrule

in my post was supposedly following those lines


The effect is that the presence of the x changes the size of the second
parenthesis, Also tested on TL2016.

best

Jean-François





--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] Mixed Roman and Indian alphabets for Sanskrit

2017-02-14 Thread Ulrike Fischer
Am Tue, 14 Feb 2017 08:58:25 -0700 schrieb Dominik Wujastyk:

> So why does Polyglossia make \devanagarifont and \sanskritfont equivalent?
> There should be no such entity as \sanskritfont.  Sanskrit isn't a font or
> a script, it's a language.

Sure, as neither russian nor german are scripts. Nevertheless when
switching to russian you normally expect that the font setup
switches to cyrillic and when switching to german you want a latin
font. 

This means when you set up packages to change languages you can't
avoid to have to worry about scripts too. 

Btw: when doing this here

\setmainlanguage[Script=Gujarati]{sanskrit}
\newfontfamily\sanskGujarati{Code2000}[Script=Gujarati]

The you shouldn't confuse the two occurances of the Script-key.
The first Script-key is processed by polyglossia, the second by
fontspec. They are related but not identical.


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] Mixed Roman and Indian alphabets for Sanskrit

2017-02-14 Thread Philip Taylor


Dominik Wujastyk wrote:
> So why does Polyglossia make \devanagarifont and \sanskritfont equivalent?  
> There should be no such entity as \sanskritfont.  Sanskrit isn't a font or a 
> script, it's a language.
I assume (and as Dominik knows, I know nothing about Polyglossia whatsoever) 
that "\sanskritfont" means "the font I wish used when I typeset something 
written in the Sanskrit language".

Philip Taylor


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] Mixed Roman and Indian alphabets for Sanskrit

2017-02-14 Thread Dominik Wujastyk
So why does Polyglossia make \devanagarifont and \sanskritfont equivalent?
There should be no such entity as \sanskritfont.  Sanskrit isn't a font or
a script, it's a language.

​
--
Professor Dominik Wujastyk 
​,​

Singhmar Chair in Classical Indian Society and Polity
​,​

Department of History and Classics 
​,​
University of Alberta, Canada
​.​

South Asia at the U of A:

​sas.ualberta.ca​
​​


On 14 February 2017 at 07:59, Zdenek Wagner  wrote:

> 2017-02-14 15:29 GMT+01:00 Philip Taylor :
>
>>
>>
>> Dominik Wujastyk wrote:
>>
>> Even if this works, I am unhappy with the terminological confusion
>> between scripts and languages.  This seems to be built in to Polyglossia.
>>
>> Is this not, rather, a feature of Opentype [1, 2] fonts, where one writes
>> (in XeTeX, for example)
>>
>> \font \thisfont = "Whatever:script=xxx;language=yyy" ?
>>
>
> Yes, that's right. \language has been in TeX for a long time. Its role is
> to switch hyphenation patterns and the packages as Babel and Polyglossia
> switch other parameters in addition, \lefthyphenmin, \righthyphenmin,
> \frenchspacing etc. Script is defined in OpenType. This consists of a set
> of rules used to render the series of Unicode codepoints to glyphs. These
> rules are not defined by Sanskrit as such, because, for instance, the
> Malayalam script contains two-part matras but Devanagari does not have such
> a feature. The rendering rules are independent of the language, if you use
> Devanagari, you will use the same rendering rules for Hindi, Marathi,
> Nepali.
>
>
>> Philip Taylor
>> 
>> [1] http://www.microsoft.com/typography/otspec/scripttags.htm
>> [2] http://www.microsoft.com/typography/otspec/languagetags.htm
>>
>>
>>
>
> Zdeněk Wagner
> http://ttsm.icpf.cas.cz/team/wagner.shtml
> http://icebearsoft.euweb.cz
>
>
>
>>
>> --
>> Subscriptions, Archive, and List information, etc.:
>>   http://tug.org/mailman/listinfo/xetex
>>
>>
>


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] Mixed Roman and Indian alphabets for Sanskrit

2017-02-14 Thread Zdenek Wagner
2017-02-14 15:29 GMT+01:00 Philip Taylor :

>
>
> Dominik Wujastyk wrote:
>
> Even if this works, I am unhappy with the terminological confusion between
> scripts and languages.  This seems to be built in to Polyglossia.
>
> Is this not, rather, a feature of Opentype [1, 2] fonts, where one writes
> (in XeTeX, for example)
>
> \font \thisfont = "Whatever:script=xxx;language=yyy" ?
>

Yes, that's right. \language has been in TeX for a long time. Its role is
to switch hyphenation patterns and the packages as Babel and Polyglossia
switch other parameters in addition, \lefthyphenmin, \righthyphenmin,
\frenchspacing etc. Script is defined in OpenType. This consists of a set
of rules used to render the series of Unicode codepoints to glyphs. These
rules are not defined by Sanskrit as such, because, for instance, the
Malayalam script contains two-part matras but Devanagari does not have such
a feature. The rendering rules are independent of the language, if you use
Devanagari, you will use the same rendering rules for Hindi, Marathi,
Nepali.


> Philip Taylor
> 
> [1] http://www.microsoft.com/typography/otspec/scripttags.htm
> [2] http://www.microsoft.com/typography/otspec/languagetags.htm
>
>
>

Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz



>
> --
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex
>
>


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] misaligned math if \smash used in subscripts

2017-02-14 Thread Herbert Schulz

> On Feb 14, 2017, at 2:36 AM, jfbu  wrote:
> 
> Hi,
> 
> just to point out that there is interesting effect if the
> very first \smash. is simply replaced by an x
> 
> \hrule
> $$
> \hbox{$\left)\vbox to15pt{}\right.$}_{x} % or also _{\hbox{x}}
> \hbox{$\left)\vbox to15pt{}\right.$}_{\smash.}
> \hbox{$\left)\vbox to15pt{}\right.$}_{\smash.}
> $$
> \hrule
> 
> Jean-François


Howdy,

I only see a single sub-scripted x from the first line. This is with a fully 
updated TeX Live 2016 originally installed by the MacTeX package.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)




--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] Mixed Roman and Indian alphabets for Sanskrit

2017-02-14 Thread Philip Taylor


Dominik Wujastyk wrote:
> Even if this works, I am unhappy with the terminological confusion between 
> scripts and languages.  This seems to be built in to Polyglossia.
Is this not, rather, a feature of Opentype [1, 2] fonts, where one writes (in 
XeTeX, for example)

\font \thisfont = "Whatever:script=xxx;language=yyy" ?

Philip Taylor

[1] http://www.microsoft.com/typography/otspec/scripttags.htm
[2] http://www.microsoft.com/typography/otspec/languagetags.htm


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] Mixed Roman and Indian alphabets for Sanskrit

2017-02-14 Thread Dominik Wujastyk
Nice to see you here, Alessandro!  Many thanks for your code.  So it's the
\begin{sanskrit} that switches on the correct hyphenation.  And the string
"devanagari" in \devanagarifont is the same as switching on
[Script=Devanagari], I guess.

So for the common situation like this:

 संस्कृतभाषा (*saṃskṛtabhāṣā*)

​one could construct

\newcommand{\skt}[1]{%

\begin{sanskrit}{\devanagarifont #1} (\emph{{\sanskritfont
#1}})\end{sanskrit}%

}​

​and get the right scripts and hyphenations.

Even if this works, I am unhappy with the terminological confusion between
scripts and languages.  This seems to be built in to Polyglossia.  As we
both know, many languages are written in Devanagari, and Sanskrit is
written in many scripts, including Latin.  ​This isn't very clearly
expressed in Polyglossia.


​Must rush,
Best, and greetings to the family,
Dominik​


​
--
Professor Dominik Wujastyk 
​,​

Singhmar Chair in Classical Indian Society and Polity
​,​

Department of History and Classics 
​,​
University of Alberta, Canada
​.​

South Asia at the U of A:

​sas.ualberta.ca​
​​


On 14 February 2017 at 04:01, Zdenek Wagner  wrote:

> As already mentioned, Script=Devanagari switches the correct shaping of
> the font so that ki appears as कि and not as क followed by ि matra. Try to
> enter किताब with and without it and you will see the difference.
>
>
> Zdeněk Wagner
> http://ttsm.icpf.cas.cz/team/wagner.shtml
> http://icebearsoft.euweb.cz
>
> 2017-02-14 11:30 GMT+01:00 Ulrike Fischer :
>
>> Am Mon, 13 Feb 2017 16:47:09 -0700 schrieb Dominik Wujastyk:
>>
>> > Does "Script=Devanagari" turn on the hypy-sa hyphenation fil
>>
>> No. hyphenation patterns are turned on with \selectlanguage{XXX}
>> commands  (and similar commands from polyglossia, babel or the
>> engines).
>>
>> --
>> Ulrike Fischer
>> http://www.troubleshooting-tex.de/
>>
>>
>>
>> --
>> Subscriptions, Archive, and List information, etc.:
>>   http://tug.org/mailman/listinfo/xetex
>>
>
>
>
>
> --
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex
>
>


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] Mixed Roman and Indian alphabets for Sanskrit

2017-02-14 Thread Zdenek Wagner
As already mentioned, Script=Devanagari switches the correct shaping of the
font so that ki appears as कि and not as क followed by ि matra. Try to
enter किताब with and without it and you will see the difference.


Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz

2017-02-14 11:30 GMT+01:00 Ulrike Fischer :

> Am Mon, 13 Feb 2017 16:47:09 -0700 schrieb Dominik Wujastyk:
>
> > Does "Script=Devanagari" turn on the hypy-sa hyphenation fil
>
> No. hyphenation patterns are turned on with \selectlanguage{XXX}
> commands  (and similar commands from polyglossia, babel or the
> engines).
>
> --
> Ulrike Fischer
> http://www.troubleshooting-tex.de/
>
>
>
> --
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex
>


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] Mixed Roman and Indian alphabets for Sanskrit

2017-02-14 Thread Ulrike Fischer
Am Mon, 13 Feb 2017 16:47:09 -0700 schrieb Dominik Wujastyk:

> Does "Script=Devanagari" turn on the hypy-sa hyphenation fil

No. hyphenation patterns are turned on with \selectlanguage{XXX}
commands  (and similar commands from polyglossia, babel or the
engines).

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] misaligned math if \smash used in subscripts

2017-02-14 Thread Ulrike Fischer
Am Tue, 14 Feb 2017 00:41:48 + schrieb David Carlisle:

> The following first reported at the unicode-math github
> https://github.com/wspr/unicode-math/issues/383
> but the problem can be seem with plain tex.
> 
> 
> In the tex below there are six repeated instances of a subscripted bracket
> they should all be the same but the first one is misaligned.

It works ok on miktex. See
http://chat.stackexchange.com/transcript/message/35423834#35423834
for my output. (On texlive I get the wrong one too).

Imho it is part of a number of questions and bug reports regarding
leaking fontdimens (e.g.
https://sourceforge.net/p/xetex/bugs/75/#b012) which should be fixed
in the development version.

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] misaligned math if \smash used in subscripts

2017-02-14 Thread jfbu
Hi,

just to point out that there is interesting effect if the
very first \smash. is simply replaced by an x

\hrule
$$
\hbox{$\left)\vbox to15pt{}\right.$}_{x} % or also _{\hbox{x}}
\hbox{$\left)\vbox to15pt{}\right.$}_{\smash.}
\hbox{$\left)\vbox to15pt{}\right.$}_{\smash.}
$$
\hrule

Jean-François


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex