From 845b6cfd7a5a89408543e87631df59908c77bd4b Mon Sep 17 00:00:00 2001 From: Phuntsok Drak-pa Date: Tue, 13 Aug 2019 16:39:23 +0200 Subject: [PATCH] added function for org macros --- funcs.el | 228 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 125 insertions(+), 103 deletions(-) diff --git a/funcs.el b/funcs.el index aad5453..d4c3579 100644 --- a/funcs.el +++ b/funcs.el @@ -9,111 +9,111 @@ ;; ;;; License: GPLv3 -(setq conlanging//matter-latin-to-runes '((", *" . "᛬") +(setq conlanging//matter-latin-to-runes '((", *" . "᛬") ("\\. *" . "᛭") - (" +" . "᛫") - ("ċ" . "ᛇ") - ("ch" . "ᛇ") - ("ae" . "ᚫ") - ("æ" . "ᚫ") - ("dh" . "ᛋ") - ("z" . "ᛋ") - ("ð" . "ᛋ") - ("th" . "ᚦ") - ("s" . "ᚦ") - ("þ" . "ᚦ") - ("w" . "ᚹ") - ("ƿ" . "ᚹ") - ("g" . "ᚷ") - ("ᵹ" . "ᚷ") - ("ea" . "ᛠ") - ("f" . "ᚠ") - ("u" . "ᚢ") - ("o" . "ᚩ") - ("r" . "ᚱ") - ("c" . "ᚳ") - ("h" . "ᚻ") - ("n" . "ᚾ") - ("i" . "ᛁ") - ("j" . "ᛄ") - ("p" . "ᛈ") - ("v" . "ᛝ") - ("t" . "ᛏ") - ("b" . "ᛒ") - ("e" . "ᛖ") - ("m" . "ᛗ") - ("l" . "ᛚ") - ("d" . "ᛞ") - ("é" . "ᛟ") - ("a" . "ᚪ") - ("y" . "ᚣ"))) + (" +" . "᛫") + ("ċ" . "ᛇ") + ("ch" . "ᛇ") + ("ae" . "ᚫ") + ("æ" . "ᚫ") + ("dh" . "ᛋ") + ("z" . "ᛋ") + ("ð" . "ᛋ") + ("th" . "ᚦ") + ("s" . "ᚦ") + ("þ" . "ᚦ") + ("w" . "ᚹ") + ("ƿ" . "ᚹ") + ("g" . "ᚷ") + ("ᵹ" . "ᚷ") + ("ea" . "ᛠ") + ("f" . "ᚠ") + ("u" . "ᚢ") + ("o" . "ᚩ") + ("r" . "ᚱ") + ("c" . "ᚳ") + ("h" . "ᚻ") + ("n" . "ᚾ") + ("i" . "ᛁ") + ("j" . "ᛄ") + ("p" . "ᛈ") + ("v" . "ᛝ") + ("t" . "ᛏ") + ("b" . "ᛒ") + ("e" . "ᛖ") + ("m" . "ᛗ") + ("l" . "ᛚ") + ("d" . "ᛞ") + ("é" . "ᛟ") + ("a" . "ᚪ") + ("y" . "ᚣ"))) (setq conlanging//matter-latin-to-native '((" +" . " ") ("ch" . "ċ") ("ae" . "æ") ("th" . "þ") - ("s" . "þ") + ("s" . "þ") ("dh" . "ð") - ("z" . "ð") - ("w" . "ƿ") - ("j" . "i"))) -(setq conlanging//matter-latin-to-latex-runes '((", *" . ":") - ("\\. *" . "*") - (" +" . ".") - ("ch" . "I") - ("ċ" . "I") - ("ae" . "æ") - ("ea" . "\\\\ea") - ("ƿ" . "w") - ("dh" . "s") - ("z" . "s") - ("ð" . "s") - ("th" . "þ") - ("s" . "þ") - ("v" . "\\\\ng") - ("é " . "\\\\oe"))) + ("z" . "ð") + ("w" . "ƿ") + ("j" . "i"))) +(setq conlanging//matter-latin-to-latex '((", *" . ":") + ("\\. *" . "*") + (" +" . ".") + ("ch" . "I") + ("ċ" . "I") + ("ae" . "æ") + ("ea" . "\\\\ea") + ("ƿ" . "w") + ("dh" . "s") + ("z" . "s") + ("ð" . "s") + ("th" . "þ") + ("s" . "þ") + ("v" . "\\\\ng") + ("é " . "\\\\oe"))) -(setq conlanging//einnlanda-latin-to-latex '((", *" . "\\\\tripledot") +(setq conlanging//einnlanda-latin-to-latex '((", *" . "\\\\tripledot") ("\\. *" . "\\\\tripledot") - (" +" . ":") - ("hw" . "x") - ("ø" . "\\\\o") - ("ö" . "\\\\oO") - ("ó" . "v") - ("ń" . "\\\\ndot") - ("v" . "b"))) -(setq conlanging//einnlanda-latin-to-runes '((", *" . "⁝") + (" +" . ":") + ("hw" . "x") + ("ø" . "\\\\o") + ("ö" . "\\\\oO") + ("ó" . "v") + ("ń" . "\\\\ndot") + ("v" . "b"))) +(setq conlanging//einnlanda-latin-to-runes '((", *" . "⁝") ("\\. *" . "⁝") - (" +" . "᛬") - ("hw" . "ᛪ") - ("i" . "ᛁ") - ("j" . "ᛁ") - ("y" . "ᛦ") - ("u" . "ᚢ") - ("e" . "ᛂ") - ("ø" . "ᚯ") - ("o" . "ᚮ") - ("ö" . "ᚰ") - ("ó" . "ᚤ") - ("æ" . "ᛅ") - ("a" . "ᛆ") - ("m" . "ᛘ") - ("n" . "ᚾ") - ("ń" . "ᛀ") - ("p" . "ᛔ") - ("b" . "ᛒ") - ("t" . "ᛐ") - ("d" . "ᛑ") - ("k" . "ᚴ") - ("g" . "ᚵ") - ("f" . "ᚠ") - ("v" . "ᛒ") - ("þ" . "ᚦ") - ("ð" . "ᚧ") - ("s" . "ᛋ") - ("h" . "ᚼ") - ("w" . "ᚥ") - ("r" . "ᚱ") - ("l" . "ᛚ"))) + (" +" . "᛬") + ("hw" . "ᛪ") + ("i" . "ᛁ") + ("j" . "ᛁ") + ("y" . "ᛦ") + ("u" . "ᚢ") + ("e" . "ᛂ") + ("ø" . "ᚯ") + ("o" . "ᚮ") + ("ö" . "ᚰ") + ("ó" . "ᚤ") + ("æ" . "ᛅ") + ("a" . "ᛆ") + ("m" . "ᛘ") + ("n" . "ᚾ") + ("ń" . "ᛀ") + ("p" . "ᛔ") + ("b" . "ᛒ") + ("t" . "ᛐ") + ("d" . "ᛑ") + ("k" . "ᚴ") + ("g" . "ᚵ") + ("f" . "ᚠ") + ("v" . "ᛒ") + ("þ" . "ᚦ") + ("ð" . "ᚧ") + ("s" . "ᛋ") + ("h" . "ᚼ") + ("w" . "ᚥ") + ("r" . "ᚱ") + ("l" . "ᛚ"))) (defun conlanging//replace-string-by-char (t-string t-correspondance-table) "Return a copy of t-string converted with the correspondance @@ -159,30 +159,52 @@ with." ; Mattér ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun conlanging/matter-to-runes () - "Replaces transliterated Mattér to its runic writing system" + "Replaces transliterated Mattér with its runic writing system" (interactive) (conlanging//replace-char-by-table conlanging//matter-latin-to-runes)) (defun conlanging/matter-to-native-latin () - "Replaces transliterated Mattér by its corresponding native + "Replaces transliterated Mattér with its corresponding native latin writing system" (interactive) (conlanging//replace-char-by-table conlanging//matter-latin-to-native)) (defun conlanging/matter-to-latex () - "Replaces transliterated Mattér by its corresponding runes" + "Replaces transliterated Mattér with its corresponding runes" (interactive) - (conlanging//replace-char-by-table conlanging//matter-latin-to-latex-runes)) + (conlanging//replace-char-by-table conlanging//matter-latin-to-latex)) + +(defun conlanging/matter-org-export-runes (text) + "Replaces transliterated Mattér with its corresponding runes during org-mode +export" + (interactive) + (if (org-export-derived-backend-p org-export-current-backend + 'latex) + (concat "\\textarm{" + (conlanging//replace-string-by-char text conlanging//matter-latin-to-latex) + "}") + (conlanging//replace-string-by-char text conlanging//matter-latin-to-runes))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Einnlanda ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun conlanging/einnlanda-to-runes () - "Replaces transliterated Mattér to its runic writing system" + "Replaces transliterated Einnlandic with its runic writing system" (interactive) (conlanging//replace-char-by-table conlanging//einnlanda-latin-to-runes)) (defun conlanging/einnlanda-to-latex () - "Replaces transliterated Mattér by its corresponding runes" + "Replaces transliterated Einnlandic with its corresponding runes" (interactive) - (conlanging//replace-char-by-table conlanging//einnlanda-latin-to-latex-runes)) + (conlanging//replace-char-by-table conlanging//einnlanda-latin-to-latex)) + +(defun conlanging/einnlanda-org-export-runes (text) + "Replaces transliterated Einnlandic with its corresponding runes during +org-mode export" + (interactive) + (if (org-export-derived-backend-p org-export-current-backend + 'latex) + (concat "\\textarm{" + (conlanging//replace-string-by-char text conlanging//einnlanda-latin-to-latex) + "}") + (conlanging//replace-string-by-char text conlanging//einnlanda-latin-to-runes)))