2016-03-26 1 views
0

私はこのように私のorg-mode文書に絵文字を追加しました:emojisを置き換えるためにorg-mode html出力をカスタマイズする方法は?

BLAのBLA:カメ:GitHubのビューアを通じてそれを見て

が、彼らは、対応するUnicodeの文字エンティティに置換しますBLA yadda 。

org-mode html(esp。ox-reveal)エクスポートで同じ効果を得るには、どのフックを引っ張る必要がありますか?

答えて

0

company-emojiパッケージを使用できます。それをダウンロードして、あなたのinitファイルに以下を入れてください:

(require 'company-emoji) 
(add-to-list 'company-backends 'company-emoji) 

これはorg-html-export-to-htmlで私のために働きます。しかし、暴露についてはわかりませんが、それには擬人化も表示されると仮定します。

0

それは、この目的のためにカスタマイズ可能な変数があることが判明:

org-export-html-protect-char-alist is a variable defined in `org-html.el'. 
Its value is (("&" . "&amp;") ("<" . "&lt;") (">" . "&gt;")) 

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 
    '(("&" . "&amp;") 
    ("<" . "&lt;") 
    (">" . "&gt;") 
    (":turtle:" . "&#x1f422;") 
    (":dash:" . "&#x1f4a8;") 
    (":-)" . "&#x1f60a;") 
    (":-(" . "&#x1f61e;")) 
    "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")))) 

これはうまく動作しますが、カスタマイズ可能な変数に追加するだけの方が良いでしょうか?

関連する問題