1

I am trying to enclose arabic text in Parentheses but the left parentheses prints before the first word. Example:

%!TEX TS-program = xelatex
\documentclass[14pt]{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script = Arabic]{Simplified Arabic}
\begin{document}
\begin{Arabic}
\begin{itemize}
\item  (الاسم (عند النحويّين
\item (الفعل (عند النحويّين
\item (الحرف (عند النحويّين 
\end{itemize}
\end{Arabic}
\end{document}

Print out is

I think I need the Control-Right-Left ghost character (U+200F), but I cannot seem to get it to work with \char"hex or any other method.

  • Welcome to the Tex–LaTeX Stack Exchange! – Thérèse May 12 '18 at 20:48
1

Your source file looks OK on screen, but if you paste it into a Unicode code converter, you’ll see that you have two opening parentheses instead of one opening parenthesis and one closing parenthesis.

Typing bidirectional text can make anyone feel dizzy, and it’s more confusing in some editors than others, but when you come to the end of your parenthetical phrase, reach for the key that looks like ) even though the PDF output should look like (. You don’t need to insert the right-to-left mark.

Here’s your example, repaired (there’s no 14pt option for the article class):

\documentclass[12pt]{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}% I don’t have Simplified Arabic
\begin{document}
\begin{Arabic}
\begin{itemize}
\item الاسم (عند النحويّين)‏
\item الفعل (عند النحويّين)
\item الحرف (عند النحويّين)
\end{itemize}
\end{Arabic}
\end{document}

output of MWE

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.