Can anyone help me with \hl function. How to use it for a paragraph if the text contains Lithuanian letters "ą","į" etc. If the letter is in the middle of the word then it is ok, but some strange things happen when the letter is at the end of word.
Thank You.
\documentclass[11pt,twoside]{extarticle}
\usepackage{polyglossia}
\setdefaultlanguage{lithuanian}
\setotherlanguage{english}
\usepackage{soul,color}
\makeatletter
\let\SOUL@tt\relax
\newfontface{\SOUL@tt}[Ligatures=TeX]{texgyrecursor-regular.otf}
\makeatother
\begin{document}
\hl{Here is some text in Lithuanian. When the special character is in the middle "sąryšis" of the word then "hl" works good and "mbox" is not necessary but if the word ends with special character "mergaitė glostė katę" then special characters "ė", "ė" and "ę" (and other š, ą, ų, į etc) are omitted and "mbox" fixes that although "mbox" does not break the line.
}
\end{document}
The code does not work with XeLaTex and TexMaker. Can anyone help me?
\usepackage{fontspec}\setmainfont[Ligatures = TeX]{TeX Gyre Pagella}– Rasa Nov 26 '16 at 12:39soul(and before\begin{document}), you're done. Depending on your font setup you may need to changeTeX Gyre Cursorintotexgyrecursor-regular.otf– egreg Nov 26 '16 at 13:31xelatexas well aslualatex: ė vanishes (though not ę). Adding the four lines from the other thread does not solve the problem, even after changing the font name: Both processors yield the errorPackage soul Error: Reconstruction failed.So I'd not consider this issue as resolved. – gernot Nov 26 '16 at 14:45soulis fundamentally broken with XeLaTeX – egreg Nov 26 '16 at 15:07soul, consider switching topdflatex(instead ofxelatexorlualatex) using the preamble\usepackage[utf8]{inputenc} \usepackage[L7x]{fontenc} \usepackage[english,lithuanian]{babel} \usepackage{soulutf8,color}(instead ofpolyglossiaetc). – gernot Nov 26 '16 at 15:37texgyrecursor-regular.otf. Nothing good with xelatex (Xelatex is necessary for my fonts). Maybe there is any other idea how to highlight the new inserts or changes made in documents? – Rasa Nov 26 '16 at 16:01