Open jspitz opened 5 years ago
bidi is (depending on the loading order of the various packages) trying to patch eso-pic, which imho the wrong place. It would make more sense to switch back to LTR before the atbegshi picture.
\documentclass[a4paper]{book}%
\usepackage{atbegshi}
\usepackage{etoolbox}
\usepackage{xcolor,graphicx}
%
\makeatletter
\patchcmd\AtBegShi@BeginPicture{\begingroup}{\begingroup\@RTLfalse}{}{\fail}
\makeatother
\usepackage{polyglossia}
\setdefaultlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
%load later to avoid the eso-pic patch:
\usepackage{showframe}
\usepackage{wallpaper}
\begin{document}
\ThisCenterWallPaper{1}{example-image-duck}
A\newpage B\newpage C
\end{document}
(Moving from https://github.com/reutenauer/polyglossia/issues/33)
When compiling this example:
it becomes obvious that showframe does not recognize text area and margins correctly when
\setdefaultlanguage{arabic}
is used.This problem is not restricted to the showframe package but to packages using the information about the page layout in general, of course, for example the thumbs package.