Subject: Re: bug#61290: 28.2; Ligatures messing up fontify subscripts in AUCTeX

From: Tassilo Horn <[email-masked]>
Date: Sun, 05 Feb 2023 10:28:42 +0100

Eli Zaretskii <[email-masked]> writes:

Hi Jeremy & Eli,

> My guess would be that the method used by AUCTeX for displaying
> subscripts is somehow incompatible with character compositions.  How
> are subscripts displayed by AUCTeX?

AUCTeX simply adds a 'raise text property with some computed value per
level, e.g., (raise -0.5) for the first subscript level.

> OTOH, if this is a problem in the Emacs display engine, I'd appreciate
> a simple reproducer that doesn't require AUCTeX to be installed and
> used.
>
> CC'ing Tassilo, in case he has some comments and idea.

I'm somewhat relieved to say its the very same with the stock emacs
tex-mode.el which does pretty much the same as AUCTeX, i.e., a simple
reproducer is to open the tex file

--8<---------------cut here---------------start------------->8---
\documentclass{article}
\begin{document}
\begin{equation}
  A_{x+b-c*d/e}
\end{equation}
Here is a ligature -> and another one !=.
\end{document}
--8<---------------cut here---------------end--------------->8---

with emacs -Q.  It looks correct but gets wonky after evaluating
Jeremy's ligature setup.

Bye,
Tassilo