I use AucTeX
as my latex major mode. I have been trying to setup the minor mode latex-pretty-symbols
which is available from melpa. I did:
;; Install from package-list-packages
(require 'latex-pretty-symbols)
(add-hook 'LaTeX-mode-hook
(lambda () (message "Show that my code ran") (latex-unicode-simplified)))
What's supposed to happen is that font-lock should render \alpha = 1
as α = 1
in a latex buffer.
Unfortunately, this doesn't happen in AucTex. Instead I have to either interactively call latex-unicode-simplified
or manually evaluate M-:(latex-unicode-simplified)
from the buffer.
Is there a way to programmatically send keystrokes after a mode is loaded? Is there some other way to tell auctex to do what I want ? I have been trying to solve this for 2.5 hours now so any help is welcome.
NB 1: This problem only happens when I use auctex. When I deleted auctex and
did (add-hook 'latex-mode-hook 'latex-unicode-simplified)
then the problem got resolved. But I can't stop using AucTex.
NB 2: This problem is not resolved through file local variables, I tried to put a % eval: (latex-unicode-simplified)
but that did not work
NB 3: The package author is using bitbucket, with issues disabled.
(add-hook 'LaTeX-mode-hook #'prettify-symbols-mode)
should also do the trick if you use Emacs≥25.prettify-symbols-mode
I would have to write the prettification rules myself. Is there some code with those rules already written? I can understand thatlatex-pretty-symbols
is basically doing that.