14

How do I use Agda's input method to enter unicode characters in non-Agda mode? I don't see its name showing up when I try set-input-method. The reason I want to use Agda's input method instead of TeX is because there are characters I want that can't enter in TeX.

Or, maybe an alternate question would be "How do I add more shortcuts to enter unicode characters in the existing TeX input method?"

Thank you very much

Alex
  • 1,184
  • 7
  • 15

1 Answers1

13

Add the following commands in your .emacs file:

;; Using the input method of Agda in LaTeX files.
(require 'agda-input)
(add-hook 'LaTeX-mode-hook
          (lambda () (set-input-method "Agda")))
asr
  • 1,166
  • 6
  • 18
  • 2
    Turns out `(require 'agda-input)` was all I needed in my case. Thanks a lot! – Alex Aug 16 '14 at 20:30
  • Actually in my case, my LaTeX files use the input method of Agda because I added the hook to the Text mode instead of the LaTeX mode. – asr Aug 16 '14 at 20:43
  • 1
    `(require 'agda-input)` should be put *after* `(load-file (let ((coding-system-for-read 'utf-8)) (shell-command-to-string "agda-mode locate")))` – int_index Dec 07 '16 at 13:44