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.

\settextfont[Scale=1.1]{B Nazanin}
\defpersianfont\titr[Scale=1]{B Titr}
\defpersianfont\traffic[Scale=1]{B Traffic}

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
  • 1
    Refer this link for more details on the spaces: tex.stackexchange.com/a/41488/75818. You can also create macro in your editor for repeated usage. Aug 19 '16 at 12:35
  • In Linux, it simply works with Shift + B and in Windows, it works with Shift + Space Mar 1 at 7:13

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.


If you have the standard keyboard, no matter what editor or application you use, shift+space will produce half-space. However, there are some editors that have bugs (like the ones that use QT-5). You haven't mentioned the editor you are using (TexLive is a Latex distribution, not an editor). If you are using Tex Studio or TeXworks, you will find solutions on here, and here.

  • Thank you for your answer. I did mention the editor I use in the question body which is TeXworks, and also the forum I mentioned in my question is the one you linked to... Unfortunately the random shortcuts suggested there do not work for me.
    – Gigili
    Aug 20 '16 at 11:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.