auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] sub and super scripts in prettifying


From: Tassilo Horn
Subject: Re: [AUCTeX-devel] sub and super scripts in prettifying
Date: Sun, 28 Aug 2016 11:35:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Uwe Brauer <address@hidden> 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




reply via email to

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