unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-devel@gnu.org
Cc: auctex-devel <auctex-devel@gnu.org>
Subject: BIDI, LaTeX (auctex) and the «evil» backslash
Date: Sat, 21 May 2016 13:55:18 +0000	[thread overview]
Message-ID: <874m9r4it5.fsf@mat.ucm.es> (raw)

[-- 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 --]

             reply	other threads:[~2016-05-21 13:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-21 13:55 Uwe Brauer [this message]
2016-05-21 17:34 ` BIDI, LaTeX (auctex) and the «evil» backslash 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874m9r4it5.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=auctex-devel@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).