GNU bug report logs - #42799
12.2.0; reftex?: R2L, Hebrew: automatically labeling does not work for sections

Previous Next

Package: auctex;

Reported by: Uwe Brauer <oub <at> mat.ucm.es>

Date: Mon, 10 Aug 2020 12:28:01 UTC

Severity: normal

Tags: notabug

Found in version 12.2.0

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Arash Esbati <arash <at> gnu.org>
To: Uwe Brauer <oub <at> mat.ucm.es>
Cc: 42799 <at> debbugs.gnu.org
Subject: bug#42799: 12.2.0; reftex?: R2L, Hebrew: automatically labeling does not work for sections
Date: Mon, 10 Aug 2020 21:56:54 +0200
Hi Uwe,

Uwe Brauer <oub <at> mat.ucm.es> writes:

> I am not sure whether this is more of a reftex bug. It is my
> understanding that even then, sending a Auctex bug is maybe correct if
> not tell me and I will resend the bug report to the GNU emacs bug mailing list.
> [...]
>
> Running LaTeX-section before \setRL and writing Introduction inserts
>  \section{Introduction}
>  \label{sec:introduction}
>
> Doing the same after \setRL
>
> LaTeX-section
> now inserting the hebrew word mavo מבוא either by turning in the
> X-window environment globally a hebrew keyboard, or much better, running 
> (set-input-method "hebrew" t) 
> in the minibuffer or 
>   (set-input-method "hebrew-phonetic-qwerty" t)
>
> And then typing the word מאוא
> results in 
>
> \section{מבוא}
> \label{sec:}
>
> But is should be 
>
> \section{מבוא}
> \label{sec:מבוא}

I don't think this is a bug in RefTeX, more a documented feature.
Looking at the manual, it says[1]:

    3.1 Creating Labels
    [...]
    1. A label can be derived from context. This means, RefTeX takes the
       context of the label definition and constructs a label from
       that\footnote{Note that the context may contain constructs which
       are invalid in labels. RefTeX will therefore strip the accent
       from accented Latin-1 characters and remove everything else which
       is not valid in labels. This mechanism is safe, but may not be
       satisfactory for non-western languages. Check the following
       variables if you need to change things:
       reftex-translate-to-ascii-function,
       reftex-derive-label-parameters, reftex-label-illegal-re,
       reftex-abbrev-parameters.[2]}

Not heavily tested but it should be sufficient to tweak
`reftex-label-illegal-re', maybe something like this:

    (setq reftex-label-illegal-re "[^-a-zA-Z0-9_+=:;,.א-ת]")

Want to give it a roll?

Best, Arash

Footnotes:
[1]  https://www.gnu.org/software/auctex/manual/reftex.html#SEC12

[2]  https://www.gnu.org/software/auctex/manual/reftex.html#FOOT1





This bug report was last modified 4 years and 284 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.