Unicode Characters for Checkbox in Orgmode-Exported HTML
Now in orgmode we can set org-html-checkbox-type
to unicode
(by
code (setq org-html-checkbox-type 'unicode)
) to turn
[X]
into ☑ for checked checkbox[ ]
into ☐ for unchecked checkbox- and
[-]
into ☐ for partial-checked checkbox(in `Trans` status).
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:
- ⊠ checked one
- ◻ unchecked one
- ⊡ partial-checked one
- ◻ unchecked one
- ⊠ checked one
And here is the old style, for comparing:
- ☑ checked one
- ☐ unchecked one
- ☐ partial-checked one
- ☐ unchecked one
- ☑ checked one
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 "⊠") (off "◻") (trans "⊡") (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(killian.zhuo📧gmail.com) an email!