> Sent: Wednesday, September 21, 2022 at 6:53 PM > From: "Tassilo Horn" <t...@gnu.org> > To: "Christopher Dimech" <dim...@gmx.com> > Cc: "Stefan Monnier" <monn...@iro.umontreal.ca>, "David Kastrup" > <d...@gnu.org>, auctex-devel@gnu.org > Subject: Re: AUCTeX and "builtin latex mode" integration > > Christopher Dimech <dim...@gmx.com> writes: > > > Have seen that the built-in tex-mode and latex-mode have two powerful > > features: 1) the prettify-symbols-mode where things such as \alpha are > > displayed with the corresponding greek glyph symbol; and 2) the > > ability to reposition the height of superscripts and subscripts. > > > > For the two features, I seem to remember than the rendering proves to > > be superior in Auctex. > > AUCTeX basically uses the prettify-symbols setup from the builtin latex > mode. I don't know what you mean with repositioning the height of > sub/superscripts. AUCTeX (font-latex.el) allows to fontify them as such > even on multiple levels, e.g., x^y^z.
Superscipted entries are positioned at a higher height level and the font size is decreased. Correspondingly, subscripted entries are positioned at a lower height with font size decreased. But the Superscipted "^" and Subscripted "_" signs remain showing in the text Thus "x^a" and "y_b", will show "a" positioned higher relative to "x", whilst "b" is positioned lower relative to "y". But the "^" and "_" will still show up. > > Could you see whether using the functionality from the Auctex > > implementation be used. > > AUCTeX font-lock implementation heavily relies on the information > gathered by AUCTeX's parsing abilities and its style files, so I guess, > no. If so, it would be pleasant to have the functionalities in tex-mode and-latex built-in that are similar to Auctex in a separate file. That would include tex--prettify-symbols-alist and the tex-suscript part. And let the user decide what features to activate - whether the basic prettify engine or the Auctex one.