<div dir="ltr">I have changed the definition of \normalcolor from color.sty so that it works in RTL too:<br><br>\def\normalcolor{\let\current@color\default@color\ifhmode\if@RTL\beginL\aftergroup\endR\fi\fi\set@color\ifhmode\if@RTL\beginR\aftergroup\endL\fi\fi}<br>
<br>If I write anywhere \normalcolor, no problem appears. I get and not problem, if I use it inside a \vbox but if I use it inside an hbox such as \hbox{\normalcolor This is a test.}, TeX complains that misiing \beginL or \endL inserted, of course that can be solved by having \hbox{{\normalcolor This is a test}} but I was wondering if anyone knows the cause of the problem and if there is any good solution for it.<br>
<br>Likewise, it is not possible to use \beginL and \endL in mathmode as far as I tested, but I need to change \normalcolor in math mode as well so that it works for RTL text, any solution for this?<br><br>Thanks<br></div>