[Top][All Lists]

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

Re: [AUCTeX-devel] latex-pretty-symbols.el and subscripts (x-symbol): do

From: Tassilo Horn
Subject: Re: [AUCTeX-devel] latex-pretty-symbols.el and subscripts (x-symbol): don't display _ or ^
Date: Tue, 25 Aug 2015 09:24:03 +0200
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Uwe Brauer <address@hidden> writes:

>    > Just for the record: I've just added `prettify-symbols-mode' support for
>    > (La)TeX to Emacs' built-in tex-mode.el.  If you run a very, very recent
>    > emacs, you could activate that in AUCTeX using
> 21.4.1 is recent enough?

Hehe, just what David said.  I guess you mean 24.1, right?  And the
answer is no.  "Very, very recent" means a Git version of emacs which is
more recent than 4 days.  So 25.1 will the first release have that

>    >   (setq-local prettify-symbols-alist tex--prettify-symbols-alist)
>    >   (add-function :override (local 'prettify-symbols-compose-predicate)
>    >                 #'tex--prettify-symbols-compose-p)
> Does this function also provide the inverse
> conversation/recoding/translation/unprettifying?
> The package  latex-pretty-symbols.el does not.

Not exactly sure what you mean, but when you write \alpha the greek
letter will be displayed, and when you then continue writing quux so
that it becomes \alphaquux, it will be displayed "normally" again
(assuming that you didn't define a pretty char for \alphaquux, of

>    > in a function in LaTeX-mode-hook.  I'll add that do AUCTeX, too (if
>    > p-s-m is available).
> Aehm what is p-s-m?


>    > The above also displayes the _ and 1 as-is. I didn't really test,
>    > but I think `prettify-symbols-mode' can't really do this. It can
>    > just take symbols (in the syntax-table sense) and compose them to
>    > some unicode character. That doesn't suffice for what you are
>    > looking for.
> Well but it is better than nothing. BTW what is about TeX-folding as you
> type as I discussed with Mosè?

I don't use folding but there's the option `TeX-fold-auto' which will
fold macros automatically as soon as you've inserted them using `C-c
RET' (TeX-insert-macro).  Of course that won't help if you just write
out the macros.

You could try adding the lambda which is added to
`TeX-after-insert-macro-hook' by `TeX-fold-mode' to the buffer local
value of `post-command-hook'.  Maybe that gives you some as-you-type


reply via email to

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