Archives | Categories

Unicode Characters for Checkbox in Orgmode-Exported HTML

<2014-05-23 Fri>

Now in orgmode we can set org-html-checkbox-type to unicode (by code (setq org-html-checkbox-type 'unicode) ) to turn

These unicode symbols are nearly perfect but the one for the partial-checked checkbox ―― It's the same as the one for unchecked checkbox.

So I searched the internet and find this unicode character table. After checking symbols in it one by one, I found three symbols for the three status of checkbox, like this:

And here is the old style, for comparing:

I donno whether other ones think that these symbols are better, so I changed these characters through defadvice:

(defun unicode-for-org-html-checkbox (checkbox)
  "Format CHECKBOX into Unicode Characters."
  (case checkbox (on "&#x22A0;")
        (off "&#x25FB;")
        (trans "&#x22A1;")
        (t "")))
(defadvice org-html-checkbox (around unicode-checkbox activate)
  (setq ad-return-value (unicode-for-org-html-checkbox (ad-get-arg 0))))

Discuss and Comment

Have few questions or feedback? Feel free to send me(zhuoql📧zoho.com) an email!

Copyright © KDr2, SOME RIGHTS RESERVED UNDER CC BY-NC 4.0.

Built with Emacs 25.1.1 (Org mode 8.3.5).

Last updated: 2017-01-11 Wed 10:14.

Green Web Hosting! This site hosted by DreamHost.