latex3 / babel

The babel system for LaTeX, LuaLaTeX and XeLaTeX
LaTeX Project Public License v1.3c
125 stars 34 forks source link

layout=graphics fix for breakable tcolorbox in RTL context #185

Closed seloumi closed 1 year ago

seloumi commented 1 year ago

Hello Javier, Breakable tcolorbox appears in wrong direction in right to left context, we can correct this by adding \bbl@pictsetdir\z@ before \tcb@drawcolorbox@breakable command.

\documentclass{article}
\usepackage{lipsum}
\usepackage[most]{tcolorbox}

\usepackage[bidi=basic,layout=graphics]{babel}

\babelprovide[import,main]{arabic}
\babelfont{rm}{Amiri}

%\makeatletter
%\AddToHook{cmd/tcb@drawcolorbox@breakable/before}{\bbl@pictsetdir\z@}
%\makeatother

\begin{document}

\section{Breakable Boxes}

\begin{tcolorbox}[breakable]
  \lipsum[1-7]  
\end{tcolorbox}

\end{document}