auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-devel] BIDI, LaTeX (auctex) and the «evil» backslash


From: Uwe Brauer
Subject: [AUCTeX-devel] BIDI, LaTeX (auctex) and the «evil» backslash
Date: Sat, 21 May 2016 13:55:18 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)


Hello

I was going to continue my message about displaying latex environments,
such as equations in a BIDI file, till I recognized that the basic
problem is the LaTeX backslash.

In my understanding UTF distinguish between

    -  LTR chars such as a,b,c

    -  RLT chars such as א,ב,ג

    -  «neutral» chars such as (),\ etc.

The problem is now that \ is part of a LaTeX command. So a LaTeX file
with hebrew text, has a problem, as the  sreenshot below of the file
(bidi-paragraph-direction nil) bidi-pargraph-nil shows, for example

begin{equation}\
instead of
\begin{equation}

Worse
[\ x^2=2x-1 \]

Instead of
\[ 2x-1=x^2 \]

Now there are at least four solutions to this problem


    -  set bidi-paragraph-direction to left (shown in the next
       screenshot.) The display is correct, however typing Hebrew, when
       bidi-paragraph-direction is set to left is as unpleasant as
       writing English with bidi-paragraph-direction set to right.

    -  use LRM chars before the backslash (see the last screenshot;
       having set `glyphless-char-display-control' to `acronym'.
       This looks well to but adding these chars is cumbersome.

    -  hack auctex (CC to the auctex list): a new variable is
       introduced, say bidi-support, which is per default nil, but if it
       is t, then LRM chars are inserted before a backslash. I am
       pretty sure the auctex team will not like this idea very much.

    -  back emacs: in a LaTeX buffer, backslash is considered as LTR, I
       don't know whether this can be done one the lisp level or whether
       it can be done at all.

Comments?

regards


Uwe Brauer



Attachment: bidi-pargraph-left-to-right
Description: Binary data

Attachment: bidi-pargraph-left-to-right-LRM
Description: Binary data

Attachment: bidi-pargraph-nil
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]