mercredi 3 décembre 2014

highlighting RTL text - ulem with bidi and color


following this: http://ift.tt/1pRPKtL, I tried this code:



\documentclass{article}
\usepackage{ulem}
\usepackage{xcolor}
\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\newfontfamily\hebrewfont[Script=Hebrew]{Arial} %or use any other font, even Bitstream Vera Sans

\begin{document}
\newcommand\hl{\bgroup\markoverwith{\textcolor{yellow}{\rule[-.5ex]{2pt}{2.5ex}}}\ULon}
this is a \LR{\hl{hightlighted text}}. and this is \hl{unseen}.
\end{document}


as stated in the code itself, the ulem macros don't work well when trying to color an RTL text.


why is it so, and how can that be solved (even by rewriting parts of ulem package)?





Aucun commentaire:

Enregistrer un commentaire