[tex-hyphen] Error in hypenation of Russsian accented «ы»

Claudio Beccari claudio.beccari at gmail.com
Tue Sep 20 16:15:42 CEST 2016


Your XeLaTeX MWE has \hyphenation in the wrong place. See this MWE 3

% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = XeLaTeX

\documentclass[twoside]{article}

\usepackage{fontspec}

\newfontfamily\cyrillicfont[Mapping=tex-text]{PT Serif}

\usepackage{polyglossia}

\setmainlanguage{russian}

\begin{document}
\hyphenation{ны́-не}

\parbox{1pt}{Почему́ перено́сы в словах ны́не и мы́ши ухо́дят на 
сле́дующую стро́чку, а в мя́со брэ́кет слу́хи ворю́га — нет?}

\end{document}

The explanation is that the \hyphenation exceptions introduced with 
command \hyphenation are connected with the current language. The 
russian language, the only one specified after polyglossia, becomes 
active only after \begin{document}; before that the default language is 
language 0, that is english.

Claudio

On 20/09/2016 11:21, Philip Taylor wrote:
> Claudio Beccari <claudio.beccari at gmail.com> wrote :
>
>>     That pattern is responsible of that error.  But if you have a
>>     pattern such as 2^^^^0301 in the pattern list the error should
>>     vanish; if code 2 is not sufficient to eliminate alla errors,
>>     maybe 4 is OK (the lowest the best, but if 4 works and 2 doesn't,
>>     use 4 -- do not try to use 8, the highest value to forbid
>>     hyphenation).
>>
> But why is it, Claudio, that I can successfully over-ride the pattern 
> using \hyphenation {} using plain XeTeX but it cannot be over-ridden 
> using \hyphenation when using XeLaTeX & polyglossia ?
>
> Philip Taylor
> --------
> Annexe 1 :  MWE (XeTeX) :
>
> % !TeX Program = XeLaTeX
>
> \font \thisfont = "Palatino Linotype"
>
> \uselanguage {russian}
>
> \thisfont
>
> \hsize = 1pt
>
> \overfullrule = 0 pt
>
> \XeTeXinputnormalization = 0
>
> \hyphenation {ны́-не}
>
> \noindent Почему́ перено́сы в словах ны́не и мы́ши ухо́дят на 
> сле́дующую стро́чку, а в мя́со брэ́кет слу́хи ворю́га — нет?
>
> \end
>
>
>
> Annexe 2 :  MNWE (XeLaTeX)
>
> % !TeX Program = XeLaTeX
>
>
> \documentclass[twoside]{article}
>
> \usepackage{fontspec}
>
> \usepackage[T2A]{fontenc}
>
> \newfontfamily\cyrillicfont[Mapping=tex-text]{PT Serif}
>
> \usepackage{polyglossia}
>
> \setdefaultlanguage{russian}
>
> \fontsize{10}{12}\selectfont
>
>
> \hyphenation{ны́-не}
>
>
> \begin{document}
>
> \parbox{1pt}{Почему́ перено́сы в словах ны́не и мы́ши ухо́дят на 
> сле́дующую стро́чку, а в мя́со брэ́кет слу́хи ворю́га — нет?}
>
> \end{document}
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex-hyphen/attachments/20160920/e12c596d/attachment.html>


More information about the tex-hyphen mailing list