我已經加入表情符號,我org-mode
文件是這樣的:如何自定義org-mode html輸出來替換emojis?
BLA BLA:烏龜:BLA yadda
當它通過GitHub的觀衆看,他們得到代入相應的Unicode字符實體。
哪些鉤子必須在組織模式html(尤其是ox-reveal)導出中獲得相同效果?
我已經加入表情符號,我org-mode
文件是這樣的:如何自定義org-mode html輸出來替換emojis?
BLA BLA:烏龜:BLA yadda
當它通過GitHub的觀衆看,他們得到代入相應的Unicode字符實體。
哪些鉤子必須在組織模式html(尤其是ox-reveal)導出中獲得相同效果?
您可以使用company-emoji包。下載它,然後把你的init文件如下:
(require 'company-emoji)
(add-to-list 'company-backends 'company-emoji)
它爲我加上org-HTML出口到HTML。雖然不知道ox-reveal,但會認爲它也會顯示emojis。
事實證明,沒有用於此目的的自定義變量:
org-export-html-protect-char-alist is a variable defined in `org-html.el'.
Its value is (("&" . "&") ("<" . "<") (">" . ">"))
Documentation:
Alist of characters to be converted by `org-html-protect'.
You can customize this variable.
This variable was introduced, or its default value was changed, in
version 24.1 of Emacs.
所以現在(不是硬核的Emacs Lisp的用戶),我只是把這個在我的.emacs
:
(defcustom org-export-html-protect-char-alist
'(("&" . "&")
("<" . "<")
(">" . ">")
(":turtle:" . "🐢")
(":dash:" . "💨")
(":-)" . "😊")
(":-(" . "😞"))
"Alist of characters to be converted by `org-html-protect'."
:group 'org-export-html
:version "24.1"
:type '(repeat (cons (string :tag "Character")
(string :tag "HTML equivalent"))))
這很好,但也許有更好的方法來追加到可定製的變量?