Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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 –  Vafa Nov 4 '12 at 11:31
add comment

1 Answer

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.