unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* BIDI, LaTeX (auctex) and the «evil» backslash
@ 2016-05-21 13:55 Uwe Brauer
  2016-05-21 17:34 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2016-05-21 13:55 UTC (permalink / raw)
  To: emacs-devel; +Cc: auctex-devel

[-- Attachment #1: Type: text/plain, Size: 1647 bytes --]



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 #2: bidi-pargraph-left-to-right --]
[-- Type: application/octet-stream, Size: 74159 bytes --]

[-- Attachment #3: bidi-pargraph-left-to-right-LRM --]
[-- Type: application/octet-stream, Size: 77816 bytes --]

[-- Attachment #4: bidi-pargraph-nil --]
[-- Type: application/octet-stream, Size: 72472 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-21 20:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-21 13:55 BIDI, LaTeX (auctex) and the «evil» backslash Uwe Brauer
2016-05-21 17:34 ` Eli Zaretskii
2016-05-21 17:37   ` Eli Zaretskii
2016-05-21 17:44   ` Uwe Brauer
2016-05-21 18:34     ` Eli Zaretskii
2016-05-21 20:20       ` Uwe Brauer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).