Insert characters around characters in XeLaTeX (for RTL languages)
In typesetting RTL documents in XeLaTeX, I have found that characters such as colons or parentheses don’t set properly—adjacent numbers disappear, etc. The code below makes TeX place empty hbox’s around each colon in a document. No further references to macros are necessary.
\def\colon{:}
\catcode`:=\active
\def:{\hbox{}\colon\hbox{}}
Advertisement