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.

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}
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:28
add comment

1 Answer

up vote 2 down vote accepted

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}}
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.