[Tex/LaTex] half space for Persian words in xepersian

persianspacingxepersian

I have windows 10 installed on my laptop and the system default Persian standard keyboard is also installed and used in text editors like notepad and MS Word. I have had no problem with typing half space since it is defined in the standard keyboard as shift+space. In LaTeX (TeXLive and TeXworks) this shortcut key does not work and since half space is widely used (at least once in every sentence), I'm tired of the copy-paste trick where I type the word with half space in another editor and copy-paste it in LaTeX editor. Google search yield some other suggestions/shortcuts that don't work for me. (e.g. ctrl + shift + 2). What should I do about it? The font I am using for Persian text is what I had in the MWE in my other question.

\documentclass[a4paper,12pt]{report}
\usepackage{titlesec}
\usepackage{xepersian}
\usepackage{./styles/tempfix}
\settextfont[Scale=1.1]{B Nazanin}
\defpersianfont\nastaliq[Scale=2]{IranNastaliq}
\defpersianfont\titr[Scale=1]{B Titr}
\defpersianfont\traffic[Scale=1]{B Traffic}
\deflatinfont\calibri{Calibri}
\begin{document}

\begin{equation}
P_J{:}\quad \min_{x} J(x) \quad \textrm{subject to} \quad y=Dx
%P_J{:}\quad \min_{x} J(x) \quad \lr\textrm{subject to} \quad y=Dx
\end{equation}
\end{document}

Best Answer

I installed a persian keyboard on my windows 10 and tried it out. "shift + space" inserted for me not a half-space but U+200C (ZERO WIDTH NON-JOINER). ] I had no problem to insert and use with my normal latex editor (winedt) but it doesn't work in texworks.

Looking at the texworks bug tracker I found a related issue: https://github.com/TeXworks/texworks/issues/747.

Related Question