fixed bad consonant choosing
This commit is contained in:
parent
757ac2ea2d
commit
fd36457790
29
funcs.el
29
funcs.el
@ -249,11 +249,14 @@ runes during org-mode export"
|
||||
(defun conlanging//is-dorsal (elem)
|
||||
(nth 2 elem))
|
||||
|
||||
(defun conlanging//nyqy-get-phoneme (consonant phon need-dorsal)
|
||||
(let* ((is-dorsal (nth 1 phon)))
|
||||
(nth (if (or (eq need-dorsal 2) (not consonant)) 3
|
||||
(if (eq is-dorsal need-dorsal) 3 4))
|
||||
phon)))
|
||||
(defun conlanging//nyqy-get-phoneme (consonant phon need-dorsal is-dorsal)
|
||||
(nth (if (or (eq need-dorsal 2)
|
||||
(not consonant))
|
||||
3
|
||||
(if (eq is-dorsal need-dorsal)
|
||||
3
|
||||
4))
|
||||
phon))
|
||||
|
||||
(defun conlanging//find-elem-in-list (elem list)
|
||||
"In a list containing lists, returns the element of `list'
|
||||
@ -276,7 +279,8 @@ need-dorsal: initial = 2, sinon t ou nil
|
||||
(curr-phon-list (conlanging//find-elem-in-list curr-char conlanging//nyqy-phonetics))
|
||||
(consonant (conlanging//is-consonant curr-phon-list))
|
||||
(dorsal (conlanging//is-dorsal curr-phon-list))
|
||||
(phon (conlanging//nyqy-get-phoneme consonant curr-phon-list need-dorsal)))
|
||||
(phon (conlanging//nyqy-get-phoneme consonant curr-phon-list
|
||||
need-dorsal dorsal)))
|
||||
(if (eq need-dorsal 2)
|
||||
(setq need-dorsal dorsal))
|
||||
(conlanging//nyqy-convert (cdr text)
|
||||
@ -294,11 +298,12 @@ Arguments:
|
||||
- text: text to convert to phonetics"
|
||||
(interactive)
|
||||
(setq-local phonetics
|
||||
(conlanging//nyqy-convert (split-string text "" t)
|
||||
(conlanging//nyqy-convert (split-string (downcase text)
|
||||
""
|
||||
t)
|
||||
()
|
||||
2))
|
||||
(if (org-export-derived-backend-p org-export-current-backend
|
||||
'latex)
|
||||
(concat text " /" phonetics "/")
|
||||
(concat text " <span class=\"tooltip\">/"
|
||||
phonetics "/</span>")))
|
||||
(concat "@@html:<span class=\"tooltip\"><i>"
|
||||
text "</i><span class=\"tooltiptext\">/" phonetics
|
||||
"/</span></span>@@@@latex:\\textit{" text
|
||||
"} (/" phonetics "/)@@"))
|
||||
|
Reference in New Issue
Block a user