Uwe Brauer <[email protected]> writes:

Hi Uwe,

> I just found this message from 3th of september 2015 by Tassilo
>
> ,----
> | I guess what Uwe wants is that `prettify-symbols-mode' in a (La)TeX
> | buffer (with stock latex-mode or AUCTeX; doesn't really matter) could
> | have the option to make the ^ and _ invisible, too.
> | 
> | I already told him that this is not what p-s-m is meant for.  But it's
> | easy enough to write a custom font-lock rule for that:
> | 
> | --8<---------------cut here---------------start------------->8---
> | (defun th/invisible-super-sub-scripts ()
> |   (interactive)
> |   (cl-pushnew 'invisible font-lock-extra-managed-props)
> |   (font-lock-add-keywords
> |    nil
> |    '(("[^\\\\]\\([_^]\\)" (1 '(face nil invisible t) t))))
> |   (font-lock-flush))
> | --8<---------------cut here---------------end--------------->8---
> | 
> | Uwe, if you want you could do something like that:
> | 
> | --8<---------------cut here---------------start------------->8---
> | (add-hook 'prettify-symbols-mode-hook
> |           (lambda ()
> |             (when (eq major-mode 'latex-mode)
> |               (th/invisible-super-sub-scripts))))
> | --8<---------------cut here---------------end--------------->8---
> `----
>
> My question is: is this feature implemented in either GNU emacs core or
> in auctex?
> If not it should be added to the documentation of auctex.

It's a standard emacs feature and has nothing to do with AUCTeX.

Bye,
Tassilo


_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to