auctex
[Top][All Lists]
Advanced

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

Re: Making LaTeX-math-mode insert Unicode characters


From: Arash Esbati
Subject: Re: Making LaTeX-math-mode insert Unicode characters
Date: Mon, 10 Jun 2024 13:15:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Andreas Matthias <andreas.matthias@gmail.com> writes:

> I'm referring to an email from Fred Akalin from 2018,
> <https://lists.gnu.org/archive/html/auctex/2018-02/msg00009.html>.
>
> Fred wrote:
>
>> Would it be possible to make the various LaTeX-math-mode
>> abbreviations insert Unicode characters instead of LaTeX commands?
>> For example, making "` a" insert "α" (the Unicode character for
>> alpha) instead of "\alpha".
>
>> I have a gist to modify AUCTeX to do so here:
>> https://gist.github.com/akalin/b524942b0b3776dfd26c45841253ee4a .  Of
>> course, it would be great if AUCTeX had built-in support for this,
>> although I'm not quite sure the best way to do so. Perhaps a
>> customizable predicate that controls which abbreviations should
>> insert Unicode characters? ("LaTeX-set-unicode-p" in my gist).
>
> IMHO this is a great contribution. Mathematical equations are so much
> easier to read and write by using unicode characters instead of TeX
> commands, especially for greek letters.

You can give `prettify-symbols-mode' a roll.  It will prettify more than
just math symbols, but it is a starter.

> Using unicode-math.sty all greek letters are supported and much more.

I'm not familiar with the package, what is "much more"?

> Unfortunately this code didn't make it into the official AUCTeX
> distribution so far.  And I wonder why this email got no replies at
> all. Or did I miss something?

Probably not; the usual reason, I guess, that nobody picked up the idea
and implemented it properly into AUCTeX.

> I'd really like to see this feature in the official AUCTeX
> distribution. Nudge ;)

Patches welcome ;-)

> There's one small issue:In text mode AUCTeX provides <C-u ` b> to
> insert $\beta$. This doesn't seem to work with Fred's code that
> inserts β instead of $β$.

I think one has to hook the idea into `LaTeX-math-insert' in order to
get the entire beauty.  I will think about it, but which symbols are
covered by the unicode-math.sty?

Best, Arash



reply via email to

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