4

I typeset Arabic text with LuaLaTeX and recognised that quite often a character occurs in the resulting pdf that is invisible in the sourcetext -- it is unicode character 200f: the right-to-left mark. I don't know why this character is printed in the output at all, but it is and it shouldn't be there.

Of course, I could delete all of them manually, but there are many of them and I fear that they will appear in the printed book.

The input is: للشى ء (here on tex.sx it is visible, in TexShop it isn't).

The output is:

the printed unicode character 200F

So is there a way how I could just simply get rid of all of them? (search/replace doesn't work), i. a command I could add to the preamble without ruining anything else in my document?

This is a MWE:

% !TEX TS-program = lualatex
\documentclass[36pt]{scrartcl}

\usepackage{fontspec}
    \setmainfont[Ligatures=TeX]{Times New Roman}
    \newfontfamily\arabicfont[Script=Arabic]{Arabic Typesetting}
\newcommand{\arabtext}[1]   % Arabic inside LTR
    {\bgroup\luatextextdir TRT\arabicfont #1\egroup}

\begin{document}
    \arabtext{للشى‏ء}
\end{document}
2
  • Very good question. You are right: RLM is a control character that can be necessary in bidirectional text but is not to be printed. A minimal example might help, as a solution might be specific to your setup. I don't know how necessary bidi controls are in the source to LuaLaTeX; it might be that the source doesn't require an RLM (but there is one in your source). Apr 26, 2013 at 7:04
  • @Lover of Structure : I added a MWE. Apr 26, 2013 at 7:21

1 Answer 1

6

You can set the \catcode of the Right-to-Left Mark to 9, which will make it ignored. The code for this is

\catcode"200F=9

You must log in to answer this question.

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