Emacs:自动将 LaTeX 替换为 Unicode 符号 [英] Emacs: automatically replace LaTeX to Unicode symbols

查看:14
本文介绍了Emacs:自动将 LaTeX 替换为 Unicode 符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Emacs 中,我在编写数学教科书的理论摘要时经常使用数学符号.我使用 org-mode 来构造信息,并且我知道至少有两种输入特殊符号的方法:

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. 使用 嵌入式 LaTeX:以 land 然后按 Cc Cx (org-toggle-pretty-entities) 以逐字查看;
  2. 使用 C-x 8 RET (insert-char).
  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).

但是我希望它表现如下:我输入 LaTeX 表示,它会自动转换为物理 Unicode 形式(缩写?).有没有一个包,如果没有,我应该写什么 elisp 来实现这个行为?

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?

推荐答案

Mx set-input-method RET TeX 听起来像你想要的.

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

通过执行Mx describe-input-method RET TeX(或其绑定第一章).

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

如果您想经常使用它,您可以自定义变量default-input-method 并将其设置为TeX.这样,您可以在任何需要的缓冲区中使用 C-(对于 toggle-input-method)激活输入法.

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.

这篇关于Emacs:自动将 LaTeX 替换为 Unicode 符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆