2

The following example shows that there is the letter "A." missing in the caption of the appendix in the pdf when xepersian is used. Is there a way to fix this?

\documentclass{scrbook}

\usepackage{hyperref}


\usepackage{scrpage2}

\usepackage{xepersian}

\settextfont{XB Niloofar} 


\begin{document}
\begin{latin}


\frontmatter

\pagestyle{scrheadings}

\chapter*{Preface}


We thank for discussion.

\newpage

We thank the \LaTeX{} developers for support.

\mainmatter

\chapter{Chapter Title}

Some text.

\newpage

Even more text.

\appendix
\chapter{Appendix}

This is an appendix.

\end{latin}
\end{document}
  • 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 '12 at 11:28
2

The package xepersian (via scrbook-xepersian.def) redefines \appendix so that it contains the declaration

\gdef\thechapter{\@harfi\c@chapter}

However, in the latin environment the default Roman font is used (in your example it's Latin Modern), which might not have the characters used by the harfi numerals (whatever they be). Indeed in the log file you find the lines

Appendix آ<U+200D>.
Missing character: There is no آ in font [lmsans10-bold]:mapping=tex-text!
Missing character: There is no <U+200D> in font [lmsans10-bold]:mapping=tex-text!

(U+200D is ZERO WIDTH JOINER)

For completeness, here's the replacement text of \@harfi

\@harfi=macro:
#1->\ifcase #1\or آ\or ب\or پ\or ت\or ث\or ج\or چ\or ح\or خ\or د\or
 ذ\or ر\or ز\or ژ\or س\or ش\or ص\or ض\or ط\or ظ\or ع\or غ\or ف\or
 ق\or ک\or گ\or ل\or م\or ن\or و\or ه\or ی\else \@ctrerr \fi

Solution

You get your letter back by saying

\appendix
\renewcommand{\thechapter}{\Alph{chapter}}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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