Closed momeni closed 7 years ago
This issue requires the scrlayer-scrpage package to be patched to become bidi-aware.
Have you heard anything back from koma-script developer? if not, I can look into it. Please include a non-working minimal example.
Very Thanks. I contacted Mr. Kohm about mid September and received this response:
The usual way is, that the bidi packages supports other packages not other packages supports the bidi package.
To change the behaviour of scrlayer-scrpage, I first have to understand the bidi package. Sorry, currently there's no time for this. But I will see, what I can do, when I find some time.
Here is a minimal non-working example:
\documentclass[fontsize=12pt,paper=A4,chapterprefix=true]{scrbook}
%\usepackage{scrpage2} % working % see headers of pages 2 and 3
\usepackage{scrlayer-scrpage} % non-working % headers are shifted out of the page
\newpagestyle{samplepagestyle}
{% header definition
(0pt,0pt)
{\leftmark\hfill}% even pages
{\hfill\rightmark}% odd pages
{\leftmark\hfill\rightmark}% one-sided layout pages
(\textwidth,0.45pt)
}{% footer definition
{\hfill\pagemark\hfill}% even pages
{\hfill\pagemark\hfill}% odd pages
{\hfill\pagemark\hfill}% one-sided layout pages
(0pt,0pt)
}
\usepackage{xepersian}
\settextfont{XB Niloofar}
\title{SampleTitle}
\usepackage{lipsum}
\begin{document}
\pagestyle{samplepagestyle}\mainmatter
\renewcommand{\chaptermark}[1]{\markboth{Chapter~\thechapter:~#1}{}}
\renewcommand{\sectionmark}[1]{\markright{Section~\thesection:~#1}}
\chapter{Introduction}
\section{FirstSection}
Text Text Text
\lipsum[1-12]
\end{document}
If I comment line 3 of the above example and uncomment line 2, headers/footers will be shown in their expected locations.
Could you please see the updated tex-xet/bidi#4. I have added a comment with the necessary fix that works with your example but I need more user feedback so that I can add it to the bidi
package. Thanks
The scrbook now includes the scrlayer module. We should either directly use the scrlayer or use the scrlayer-scrpage package as a semi-compatible interface with the scrpage2. Just swapping the usepackage commands will shift header/footer contents out of the page.