3

I am type-setting with XeLaTeX using polyglossia with Czech. I encountered a problem with hyphenation the word "výstupní" at the endline is typesetted as "vy-/'stupní" but correct should be "vý-/stupní" ... so the stroke travelled at the beginning of the next line. Any suggestion?

CODE:

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

\documentclass[a4paper,11pt]{book}
\pagestyle{headings}
\setlength{\marginparwidth}{90pt} \setlength{\textwidth}{400pt}

\usepackage{polyglossia} % Balík pro podporu vícejazyčné sazby.
\setmainlanguage{czech} 
\usepackage{fontspec}
\usepackage{lmodern}
\usepackage{xunicode}
\def\uv#1{„#1“} % Definice makra pro sazbu českých uvozovek.

\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\input epsf

\def\figurename{{\bf Obrázek}}
\def\tablename{{\bf Tabulka}}

\makeindex
\renewcommand{\thefootnote}{\alph{footnote}}
\newtheorem{definice}{Definice}[chapter]
\newcommand{\grad}{\mathop{\rm grad}\nolimits}

\def\tucne #1
  {\mbox{\boldmath $#1$} }


\def\souhrn #1
  {{{{\paragraph{Shrnutí}\hspace{1cm} \suma{}\\} #1} }}

\def\cile #1
 {{\bf Cíle kapitoly}:\\
   #1
}

\begin{document}
\chapter{Pevné látky}
\cile{
 - ukázat strukturu pevných látek\\
 }
\\
Libovolný text.

Energie fotonu $h\nu$ se tedy transformuje do kinetické energie
elektronu $E_k$ a výstupní práce $W$
\begin{equation}
    h\nu = E_k + W.
\end{equation}
\end{document}
  • 1
    It doesn't happen if I change y+U0301 into U+00FD (the precomposed character). – egreg Nov 20 '18 at 23:13
  • well the issue is that i have rather long textbook and I do not want to manually change/fix this issue (it will also worsen readability of the source code) – Michal Otyepka Nov 20 '18 at 23:20
2

Add \XeTeXinputnormalization=1 before \begin{document}.

In general, it's better to use the precomposed characters instead of the combining accents.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.