#1942 formulars with bidi-autoswitching are written in the wrong direction

None
open
nobody
None
1
2016-10-22
2016-10-19
No

reported in [feature-requests:#1135]:

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.

Related

Feature Requests: #1135

Discussion

  • Alex Goldvard

    Alex Goldvard - 2016-10-20

    The problem with LTR and RTL languages in the same line is the using of the marks: $ ^ & ( ) - = + / [ { ] }
    For example, the text $1-x$ displayed as $x-1$, the text $1+x+x^2$ dispayed as x+x^2$+1$. The marks [ { dispayed as ] }.

     
  • Tim Hoffmann

    Tim Hoffmann - 2016-10-22

    What would be the correct step-by step behavoir be? Is this step-by-step example correct (| denotes the cursor)?

    line so far `| [rtl-stuff]`
    press `$`: `|$ [rtl-stuff]` mode switched to LTR
    press `x`: `|x$ [rtl-stuff]`
    press `^`: `x^|$ [rtl-stuff]`
    press `2`: `x^2|$ [rtl-stuff]`
    press `$`: `|$x^2$ [rtl-stuff]`. mode switched to RTL
    
     
    Last edit: Tim Hoffmann 2016-10-22
    • Alex Goldvard

      Alex Goldvard - 2016-10-23

      Dear Tim.

      I will use your example: We need to type $x^2$ in the RTL line and display
      it in the proper direction: It is math formula and we want to display it in
      LTR direction.
      Since I am not sure that I properly understand your step by step
      description I will rewrite it as follows:
      ========================================================
      Suppose we in RTL text.
      1. Switch to LTR language
      2. Type $ The cursor need to be at the right of $
      3. Type x The cursor need to be at the right of x
      4. Type ^ The cursor need to be at the right of ^
      5. Type 2 The cursor need to be at the right of 2
      6. Type $ The cursor need to be at the right of $
      Now we want to type RTL text:
      Switch to RTL language. Now cursor need to be at the left of the last typed
      $ mark.
      ==========================================================
      Note that in typing marks like $ in RTL line there is no need to change
      position of the cursor.
      Note also that there is no need to to autocomplete the pair like () in RTL
      mode since it is good only in writing LaTeX. That is, there is no need of
      any autocompletion of math marks in RTL mode. Autocompletion of pairs like
      {} or [ ] in RTL mode issues unexpected visual results and I propose to
      stop it in RTL mode.

      In order to be clear: I use the term RTL mode to describe the state after
      switching from left to right language to right to left language.

      Regards,

      Alex

      On 22 October 2016 at 19:06, Tim Hoffmann t_hoffmann@users.sf.net wrote:

      What would be the correct step-by step behavoir be? Is this step-by-step
      example correct (| denotes the cursor)?
      - line so far [rtl-stuff]
      - press x: x$ [rtl-stuff]
      - press ^: x^ $ [rtl-stuff]
      - press 2: x^2 $ [rtl-stuff]
      - press $: $x^2$ [rtl-stuff]. mode switched to RTL


      • [bugs:#1942] formulars with bidi-autoswitching are written in the wrong
        direction*

      Status: open
      Group: None
      Created: Wed Oct 19, 2016 08:31 PM UTC by Tim Hoffmann
      Last Updated: Thu Oct 20, 2016 07:03 AM UTC
      Owner: nobody

      reported in [feature-requests:#1135]
      https://sourceforge.net/p/texstudio/feature-requests/1135/:

      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.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/texstudio/bugs/1942/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Dr. Alexander Goldvard
      Senior Lecturer
      Mathematical Department
      Braude College of Engineering
      Office Phone: 972-4-9901878

       

      Related

      Feature Requests: #1135


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks