Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs mode/method for logic symbol placement in text?

Tags:

emacs

I would like to put actual logic symbols into my emacs buffers, e.g., the logic symbol "∀" or "∃" or "⇒", directly into my (fundamental) text or .org or whatever buffer. I found xmsi-math-symbols-input.el at ErgoEmacs, but I'm wondering if this is "best practice." Maybe the best practice is to just right Tex/Latex copy, especially if I'm doing org-mode?

like image 277
147pm Avatar asked Mar 16 '23 07:03

147pm


2 Answers

You can just use the corresponding Unicode characters normally in Emacs. Bind any that you want to any keys you want. For example:

(global-set-key [f2] "∀")
(global-set-key [f3] "∃")
(global-set-key [f4] "⇒")

To get the string with the char, you can use C-x 8 RET and type the name or code point of the Unicode char. In other words, C-x 8 RET lets you insert any Unicode character.

For example, the Unicode code point for is 2200. C-x 8 RET 2200 RET inserts a character.

And the Unicode name of is FOR ALL. C-x 8 RET for all RET also inserts a character.

The reason you might want to bind a particular character to a key is for convenience - C-x 8 RET is very general, and generally slow.

like image 88
Drew Avatar answered Mar 23 '23 20:03

Drew


At least in org-mode, it is possible to place special symbols in an .org buffer just as their raw latex markup, e.g.:

\forall

becomes the UTF-8

when you do C-c C-x \

... but this isn't a general solution.

like image 33
147pm Avatar answered Mar 23 '23 22:03

147pm