# \colorbox with Hebrew

When using a \colorbox (or derivates such as framed's shadedbox) with Hebrew and pdflatex, the color stack seems to get confused:

pdfTeX warning: pdflatex: pop empty color page stack 0

and the output is wrong (black background color).

Is there a workaround for this issue? (I am aware that XeTeX/bidi works, but I want to know whether there is also some way in [pdf]latex)

\documentclass{article}

\usepackage{color}

\usepackage[hebrew]{babel}

\begin{document}
\end{document}

• Can you please explain how you are using Latex or Lyx In hebrew? I tried to fix the problem after I moved from Lyx 2.2 to lyx 2.3, but I could not find a solution. what font packages are you using? – Jneven yesterday

Answering my own question: it seems that wrapping into \beginL...\endL seems to work:

\documentclass{article}

\usepackage{color}