Switching from local keyboard language to English then backing to local keyboard language outside of math mode is common in non-English latex users.

How to write an Script for TexStudio to auto switch into English language inside of math mode?


texstudio have a built in such script (Configure Texstudio-> Adv. Editor-> Bi-Di->check last two check boxes) but it is so laggy. sometimes it switches keyboard wrongly. sometimes it switches keyboard rapidly after each keypress.

Posting the source code of this script as answer would suffices.

KeyBoard Lang: Non-En: --> enter image description here

KeyBoard Lang: En: --> enter image description here

  • Could you provide a small example? I'm not quite sure what the problem is.
    – campa
    Mar 18 at 14:52
  • @campa: see update
    – C.F.G
    Mar 18 at 14:57


You must log in to answer this question.

Browse other questions tagged .