0

The following:

\begin{Arabic}بالدم_فريق_السحمان_مايروح\end{Arabic}

does not print the whole sentence,

\begin{Arabic}بالدم_فريق_السحمان\textunderscore مايروح\end{Arabic} 

also doesnt work,

\begin{Arabic}السحمان_مايروح\end{Arabic}\textunderscore\begin{Arabic}بالدم_فريق\end{Arabic}

does work, but adds an extra space after the underscore.

is there a better/proper way to do this, or remove the space?

8
  • Welcome to TeX.SE! Please provide a minimal and complete example of your code and a sample output image. It will make it a lot more easier for us to help! Commented Jul 1, 2019 at 21:12
  • 2
    Welcome back! As in tex.stackexchange.com/questions/481448/…, could you provide a complete example to test things out? Preferably with a freely available font like Amiri.
    – Marijn
    Commented Jul 1, 2019 at 21:13
  • \documentclass[] %for arabic - start \usepackage{fontspec} \usepackage{polyglossia} \setmainlanguage{english} \setotherlanguage{arabic} \newfontfamily\arabicfont[Script=Arabic]{Geeza Pro Regular} \csname @Latintrue\endcsname %for arabic - end \begin{document} \#\begin{Arabic}بالدم_فريق_السحمان_مايروح\end{Arabic} \end{document}
    – Dr T
    Commented Jul 1, 2019 at 21:30
  • cant get the linebreaks to appear...supposed be 2 spaces at the end of the line, but not working.
    – Dr T
    Commented Jul 1, 2019 at 21:34
  • 1
    do not add code to comments (as you see, it doesn't work) add the test document to your question then use the {} button to mark it as a code block. Then all line endings are shown naturally and need no special markup Commented Jul 1, 2019 at 22:12

1 Answer 1

5

You can use \_ to include a literal underscore in Arabic just like for other text. For RTL text, this looks like _\:

\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\begin{document}
this\_is\_it
\begin{Arabic}بالدم\_فريق\_السحمان\_مايروح\end{Arabic}
\end{document}

Result:

enter image description here

You must log in to answer this question.

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