Function: ethio-fidel-to-tex-buffer
ethio-fidel-to-tex-buffer is an autoloaded, interactive and
byte-compiled function defined in ethio-util.el.gz.
Signature
(ethio-fidel-to-tex-buffer)
Documentation
Convert each FIDEL characters in the current buffer into a fidel-tex command.
FIDEL is the Amharic/Ethiopic alphabet.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/language/ethio-util.el.gz
;;
;; TeX support
;;
;;;###autoload
(defun ethio-fidel-to-tex-buffer nil
"Convert each FIDEL characters in the current buffer into a fidel-tex command.
FIDEL is the Amharic/Ethiopic alphabet."
(interactive)
(let ((buffer-read-only nil)
comp)
;; Special treatment for geminated characters.
;; Geminated characters la", etc. change into \geminateG{\laG}, etc.
(goto-char (point-min))
(while (re-search-forward "፟\\|\x1A01CA" nil t)
(setq comp (find-composition (match-beginning 0)))
(if (null comp)
(replace-match "\\\\geminateG{}" t)
(decompose-region (car comp) (cadr comp))
(delete-char -1)
(forward-char -1)
(insert "\\geminateG{")
(forward-char 1)
(insert "}")))
;; Special Ethiopic punctuation.
(goto-char (point-min))
(while (re-search-forward "\\ce[».?]\\|«\\ce" nil t)
(let ((ch (preceding-char)))
(cond
((eq ch ?\»)
(delete-char -1)
(insert "\\rquoteG"))
((eq ch ?.)
(delete-char -1)
(insert "\\dotG"))
((eq ch ??)
(delete-char -1)
(insert "\\qmarkG"))
(t
(forward-char -1)
(delete-char -1)
(insert "\\lquoteG")
(forward-char 1)))))
;; Ethiopic characters to TeX macros
(robin-invert-region (point-min) (point-max) "ethiopic-tex")
(goto-char (point-min))
(set-buffer-modified-p nil)))