I'm using xelatex to write some grammatical remarks of biblical Hebrew. I need a different color for some vowels, for example, to illustrate some suffixes. I can't get a correct position of vowel when I change the color. In the MWE you get twice the expression "my horse". Note the different position of vowel.
I review some other similar questions (posted here 10 years ago or more, with no solutions at the time).
% !TEX program = xelatex
\documentclass{minimal}
\usepackage{xcolor}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguages{hebrew}
\newfontfamily\hebrewfont[Scale=5]{SBL Hebrew}
\def\r{\color{red}}
\begin{document}
\begin{hebrew}
סוּסִי
סוּס\r ִי
\end{hebrew}
\end{document}
I added here also an image of the expected result in xelatex, but made with Inkscape.
xelatex
. I’ suggest switching tolualatex
, which is now the recommended engine. See an example here: es.overleaf.com/learn/latex/…