seloumi/beamer-rl

Highlight with package soul

Closed this issue · 1 comments

Highlighting text is not working properly for RTL with \usepackage{soul}, is there an alternative for this amazing tool?

\documentclass{beamer}

\usepackage{soul}
\makeatletter
\let\HL\hl
\renewcommand\hl{%
  \let\set@color\beamerorig@set@color
  \let\reset@color\beamerorig@reset@color
  \HL}
\makeatother
\begin{document}

\begin{frame}
 \begin{block}{P1}
  Some \hl{العربية} here
 \end{block}
\end{frame}

\end{document}

For lualatex there is lua-ul

\documentclass{beamer-rl}
\usepackage{luacolor,lua-ul}
\babelprovide[import,main]{arabic}

\LuaULSetHighLightColor{yellow}

\begin{document}

\begin{frame}
 \begin{block}{P1}
  Some \highLight{العربية} here
 \end{block}
\end{frame}

\end{document}

image