Emacs: automatically replace LaTeX to Unicode symbols

扶醉桌前 提交于 2019-12-20 09:02:23

问题


In Emacs I frequently use math symbols when I write my theory summaries of math textbooks. I use org-mode to structure information and I know about at least two methods of entering special symbols:

  1. Using embedded LaTeX: enter its representation in the form \land then press C-c C-x \ (org-toggle-pretty-entities) to view it literally;
  2. Using C-x 8 RET (insert-char).

I want it however to behave the following way: I enter the LaTeX representation, and it is automatically converted into the physical Unicode form (abbrev?). Is there a package for that and if not, what elisp should I write to implement this behavior?


回答1:


M-x set-input-method RET TeX sounds like what you want.

View available symbols by executing M-x describe-input-method RET TeX (or its binding C-h I).

If you'll want to use this often, you can customize the variable default-input-method and set it to TeX. That way, you can activate the input method with C-\ (for toggle-input-method) in any buffer where you need it.




回答2:


There's also latex-pretty-symbols, which may be a bit less finnicky.



来源:https://stackoverflow.com/questions/11863576/emacs-automatically-replace-latex-to-unicode-symbols

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!