I need to color a specific word in my document compiled with XeLaTeX engine, following this answer automatically apply special formatting to selected words in text.
\documentclass{article}
\usepackage{color,xesearch}
\SearchList*{redwords}{\textcolor{red}{#1}}{hello}
\begin{document}
This is hello and this is hellow.
\end{document}
I have Error
! Undefined control sequence. \xdef \xs@String {\xs@String h}\xs@LearnLetter l.7 Thi s is hello and this is hellow. The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., '\hobx'), type 'I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.