emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Export Org checkboxes in ox-html using UTF-8 symbols


From: Rick Frankel
Subject: Re: [O] Export Org checkboxes in ox-html using UTF-8 symbols
Date: Fri, 28 Mar 2014 09:55:00 -0400
User-agent: Roundcube Webmail/0.9.0

On 2014-03-27 04:43, Nicolas Goaziou wrote:
Hello,

Grant Rettke <address@hidden> writes:

Sacha Chua made a nice hack to export checkboxes as unicode symbols to
HTML here:

http://sachachua.com/blog/2014/03/emacs-tweaks-export-org-checkboxes-using-utf-8-symbols/?shareadraft=baba27119_533313c944f64

(defun sacha/org-html-checkbox (checkbox)
"Format CHECKBOX into HTML."
(case checkbox (on "<span class=\"check\">&#x2611;</span>") ;
checkbox (checked)
(off "<span class=\"checkbox\">&#x2610;</span>")
(trans "<code>[-]</code>")
(t "")))
(defadvice org-html-checkbox (around sacha activate)
(setq ad-return-value (sacha/org-html-checkbox (ad-get-arg 0))))

Thanks Sacha.

There is also:

(setq org-html-checkbox-type 'unicode)


You need a recent Org, though (maybe development version, I didn't check).

I didn't apply it in maint, so it's only in master.

BTW, i used "[&nbsp;]" for the unchecked box (we use the same for checked and trans)... I think i'll change the unchecked box to &#x2610; to match the checked box (same as sachua).

rick



reply via email to

[Prev in Thread] Current Thread [Next in Thread]