0

I use GNU Emacs 24.3.1. I want to write multilingual text including Arabic text and English text in one buffer. Problem is how to write Hindi numbers instead of Arabic numbers when writing Arabic text (ironically arabic numbers are the 1,2,3,...). Yep, that is a misnomer may be.

Hindi numbers I cannot write them over here (the second line in the screenshot below).

MS Word screenshot: enter image description here

Notes:

  • Windows 7-32 bit

closed as off-topic by Svend Tveskæg, Malipivo, Kurt, Jesse, Martin Schröder Dec 22 '14 at 12:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Svend Tveskæg, Malipivo, Kurt, Jesse, Martin Schröder
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Perhaps this link might help: emacswiki.org/emacs/DisplayEngineForArabic – user31729 Jul 11 '14 at 13:50
  • @ChristianHupfer, Hi. I already tried it but to no avail, neither direction nor Hindi numerals. Emacs is very good though, if not the best, to show diacritics of arabic letters. I am sure this editor is the one to go Arabic latexing. – doctorate Jul 11 '14 at 14:09
  • Im am pretty sure that Arab speaking/writing users are available here and some of them will use (X)Emacs too. – user31729 Jul 11 '14 at 16:16
  • Better to ask on Emacs.SE; this doesn't have much to do with TeX. – Sean Allred Dec 22 '14 at 19:46
1

You can enter them using C-x 8 followed by Enter and then the code point (e.g., 0661 for the Arabic-Indic digit one). That’s tedious, but a more satisfactory answer would not be about TeX or even about Emacs, but rather about configuration of the keyboard in Microsoft Windows. In GNU/Linux, I can enter Arabic digits directly by setting XKBLAYOUT to ara and XKBVARIANT to digits; that works in all of my text editors, which suggests that the problem you’re experiencing is not an Emacs problem.

EDIT

I use Debian, but Ubuntu is probably configured in much the same way. /etc/default/keyboard looks like this:

XKBMODEL="pc104"
XKBLAYOUT="us,gr,ara"
XKBVARIANT=",polytonic,digits"
XKBOPTIONS="grp:lwin_toggle,compose:rwin,grp_led:scroll"

Translation: The left windows key toggles between the usual US keyboard, polytonic Greek, and Arabic with the digits you want. The right windows key is a compose key, allowing me to get the characters needed to spell my name, among others. An LED lights up to alert me that the keyboard is in Greek or Arabic mode.

In .bashrc, I have export GTK_IM_MODULE=xim to make gtk programs acknowledge the compose key instead of doing their gnomish thing.

You’ll need to remember to toggle back to a Latin keyboard whenever you want to do something in the minibuffer, like saving the file. That wouldn’t be necessary if you found an ELisper who could customize the arabic input method of Emacs for you.

There’s a diagram of the keyboard on Dropbox.

  • you are right a tedious job to hit each time the code! But better than off-topic is to transfer the question to whatever StackExchange site that would answer this question more likely. My suggestion is Emacs SE. Changing keyboard in windows is not the right solution because it will undesirably change numbers of all windows interface to Hindi! So chances that an Emacs solution can be found if it were transferred to Emacs SE. – doctorate Dec 22 '14 at 13:46
  • @doctorate I haven’t touched Windows in years, but I still think this is a Windows question, not an Emacs question. In GNU/Linux, one can toggle between different keyboards — I have things configured to go from Latin to polytonic Greek to Arabic whenever I press the otherwise useless Windows key. What you need to find out is whether it’s possible to toggle between keyboard layouts in Windows. – Thérèse Dec 22 '14 at 14:19
  • @doctorate If you use M-x list-input-methods and select arabic, you’ll get a keyboard chart from which it’s clear that the input method doesn’t provide the digits you want. However, possibly someone at Emacs SE or emacswiki.org could cook up some elisp to fix that for you. – Thérèse Dec 22 '14 at 15:21
  • I use Ubuntu rarely, can you please post your settings of how to write Arabic text with Hindi numerals in Linux. In Ubuntu, switching keyboard to Arabic (Space + Win key) and set-input-method to Arabic didn't work either. – doctorate Dec 22 '14 at 16:01
  • In LibreOffice I could have the desired effect by going to Tools --> Options -->Language Settings --> Complex Text Layout and set Numerals to Context (for bidirectional). How to replicate that in Emacs. You answer would be helpful for Linux at least and would be much appreciated. I am ready to open new post if you want. – doctorate Dec 22 '14 at 16:34

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