Created
September 27, 2013 18:56
-
-
Save natfarleydev/6733510 to your computer and use it in GitHub Desktop.
Emacs functions to insert \sfrac{n}{m}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun insert-half () | |
"Insert '\sfrac{1}{2} '" | |
(interactive) | |
(insert "\\sfrac{1}{2} ")) | |
(defun insert-third () | |
"Insert '\sfrac{1}{3} '" | |
(interactive) | |
(insert "\\sfrac{1}{3} ")) | |
(defun insert-quarter () | |
"Insert '\sfrac{1}{4} '" | |
(interactive) | |
(insert "\\sfrac{1}{4} ")) | |
(global-set-key (kbd "C-c 2") 'insert-half) | |
(global-set-key (kbd "C-c 3") 'insert-third) | |
(global-set-key (kbd "C-c 4") 'insert-quarter) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment