1

I found the page about page numbers in xepersian, but the problem seems to be more general. I cannot get the page headings with scrpage2 in the KomaScript classes to work. I tried the following:

\documentclass{scrbook}


\usepackage{hyperref}


\usepackage{xepersian}\renewcommand{\thepage}{\texorpdfstring{\lr{\arabic{page}}}{\arabic{page}}}

\usepackage{scrpage2}


\pagestyle{scrheadings}

\begin{document}
\begin{latin}

\chapter{First Chapter}

\section{Test 1}
Text

\newpage

\section{Test 2}

Text 2

\newpage

\section{Test 3}

\end{latin}

\end{document}

But this gives me Persian characters in the header.

1
  • Make a bug report in github.com/vafa/xepersian/issues but I do not promise updating xepersian package unless there is some donations to the project
    – user22486
    Nov 4, 2012 at 11:31

1 Answer 1

1

Adding \ohead{\lr{\headmark}} to your preamble (after loading scrpage2) seems to do the trick.

\documentclass{scrbook}

\usepackage{hyperref}

\usepackage{xepersian}

\renewcommand{\thepage}{\texorpdfstring{\lr{\arabic{page}}}{\arabic{page}}}

\usepackage{scrpage2}
\pagestyle{scrheadings}
\ohead{\lr{\headmark}}

\begin{document}

\begin{latin}

\chapter{First Chapter}

\section{Test 1}

Text

\newpage

\section{Test 2}

Text 2

\newpage

\section{Test 3}

\end{latin}

\end{document}

Output (p. 2):

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .