# Hyphenation issue with pdfLatex and Greek

Ok so, we have the following MWE:

\documentclass[a4paper,12pt,final]{memoir}

\usepackage[T1,LGR]{fontenc}
\usepackage[utf8]{inputenx}
\usepackage[english,greek]{babel}

% Fonts
\usepackage[p,osf]{libertine}
\usepackage{libertinegc}
\usepackage{libertinust1math}
\usepackage{newtxtt}

\begin{document}
\selectlanguage{greek}
\parbox{0pt}{\hspace{0pt}επίλυση}
\end{document}


Which produces the following output:

However, I am not happy with this hyphenation so I add the following line to the preamble:

\babelhyphenation[greek]{επί-λυ-ση}


which produces an error, namely:

! Improper \hyphenation will be flushed.
\LGR\textsigma ->s\noboundary


It seems to have a problem with words hyphenated before a σ. Any suggestions?

Edit: I've tried following this post and the encoding map from here, but to no avail. So I've tried using the primitive \hyphenate as follows:

\hyphenation{\detokenize{^^65^^70^^d0-^^6c^^75-^^73^^68}}


but both

\parbox{0pt}{\hspace{0pt}επίλυση}\par
\parbox{0pt}{\hspace{0pt}\detokenize{^^65^^70^^d0^^6c^^75^^73^^68}}\par


produce the same output as before. I've also tried adding the tonos accent seperately on ι as:

\parbox{0pt}{\hspace{0pt}\detokenize{^^65^^70^^27^^69^^6c^^75^^73^^68}}\par


but when trying to define a hyphenation pattern as

\hyphenation{\detokenize{^^65^^70^^27^^69-^^6c^^75-^^73^^68}}


I get the following error:

! Not a letter.
<inserted text> ep'
i-lu-sh
l.19 ...kenize{^^65^^70^^27^^69-^^6c^^75-^^73^^68}
}


However, note that even without that hyphenation pattern it produces a different result, i.e.:

• – Ulrike Fischer May 6 '18 at 16:30
• I have seen this topic, but this refers to the \hyphenation command. Wouldn't using the babel equivalent be free of such problems? Because it works fine with other words. – svart May 6 '18 at 16:36
• Also, the referenced table does not contain σ, only ς (twice). – svart May 6 '18 at 16:42
• at the end babel has to use the primitive \hyphenation too. And if it works depends on the char, e.g. ε and π are ok as they map to simple chars, ί not as it uses an accent and σ gives an error as its definition contains the \noboundary command. – Ulrike Fischer May 6 '18 at 17:34
• You’ve probably thought of this already, but if you aren’t forced to use PDFLaTeX, you can use fontspec and polyglossia. That’s what somebody reaching this question from a search engine probably ought to do. – Davislor May 6 '18 at 17:52