I'm using the hyphenat
package but it seems that it doesn't work with all words. I have a document with a lot of foreign Arabic words and this functionality is important.
My MWE,
\documentclass{article}
\usepackage{testhyphens}
\usepackage{hyphenat}
\hyphenation{
ha-kimm
sugh-ra
}
\begin{document}
\begin{checkhyphens}{}
al\-Hakimm
al\hyp{}Hakimm
\textit{al\hyp{}Hakimm}\\
al\-Sughra
al\hyp{}Sughra
\textit{al\hyp{}Sughra}\\
complication
\textit{complication}
\end{checkhyphens}
\end{document}
The output,
I expect al-Sughra
to hyphenate as al-Sugh-ra
but it doesn't. What could be the problem?
I will be using XeLaTeX in the end, so I would prefer a solution that will work there as well.
\hyp{}
command in thehyphenat
manual. It deals with this scenario specifically. Also, the first word example shows that it does indeed hyphenate words with a hyphen in them already. – Khalid Hussain Jul 14 '17 at 8:44