latex3 / babel

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

Adjust lscape for TRT pagedir #202

Closed seloumi closed 1 year ago

seloumi commented 1 year ago

Using lscape or pdflscape with the Landscape environment on a TRT page causes the contents of the environment to appear out of page.

Patching of \LS@rot command solves the problem, please Javier look to the patching if it is possible to add it with layouts, thanks.

\documentclass{article}
\usepackage{lscape}
\usepackage[bidi=basic]{babel}
\babelprovide[import, main]{arabic}
\babelfont{rm}{Amiri}

\parindent=0pt

\makeatletter
\def\LS@rot{%
  \setbox\@outputbox\vbox{\hbox dir TLT{\rotatebox{90}{\box\@outputbox}}}}
\makeatother  

\begin{document}
Test
\begin{landscape}
\Huge 
Test
\end{landscape}

\end{document}