I propose to improve the bidirectional support in TXS in the following way. Currently, if I write in arabic and math in the same line the math input go in the wrong direction. The available solution in the current version of TXS is to separate two language by putting them in the different lines. In my opinion, the better solution is to create mechanism which will check the begining and end of LaTeX math command and automatically change direction in this construction to LTR. Such mechanism is implemented, for example, in bluefish editor.
Anonymous
This feature does already exist:
Options -> Advanced Editor -> Bi-Di -> Automatically switch keyboard layout -> depending on text/math modeWhen enabled and you have multiple keyboard languages defined, it switches e.g. from arabic to english when you start a math environment.
Thanks for responce. I don't have "Options -> Advanced Editor -> Bi-Di -> Automatically switch keyboard layout -> depending on text/math mode" in my version 2.6.6 (I install it from Ubuntu 14.04 repository). Please, let me know in which version of TexStudio the above feature exists and is it possible to install this version on Ubuntu 14.04.
the home page provides links to all linux builds. Latest is 2.11.2.
I installed the latest version 2.11.2. Indeed I have Options -> Advanced Editor -> Bi-Di -> Automatically switch keyboard layout -> depending on text/math mode. It is not working properly: When I start the LaTeX enviroment the editor indeed switch to english but write formulas in the wrong direction. For example, the formula $1-x$ is written as $x-1$. Moreover, if I type $1-x+x^2$ I get a messy output. When I start a new line for formulas I get a proper output as in previous versions of TexStudio.
My conclusion: there is a bug in implementation of bidi algorihtm.
opened a bug report for this [bugs:#1942] https://sourceforge.net/p/texstudio/bugs/1942/
Last edit: Tim Hoffmann 2016-10-19
The problem is not gone. The "Options -> Advanced Editor -> Bi-Di -> Automatically switch keyboard layout -> depending on text/math mode" does not work.
Several years ago when texstudio was texmaker a solution was developed for full support of BIDI, the source can be found here
https://bitbucket.org/srazi/biditexmaker3/get/798634712e2a.zip
additional fix: hg 6656 (140d7fd268a7)