emacs-orgmode
[Top][All Lists]
Advanced

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

Re: how to export checkboxes to odt?


From: Uwe Brauer
Subject: Re: how to export checkboxes to odt?
Date: Wed, 29 Sep 2021 08:29:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:

Hi Juan,

> Hi Uwe,
> Uwe Brauer writes:

>> Any idea how to export checkboxes to odt?
>> 
>> I mean not just simply having [ ] in the odt document but having them 
>> translated as actual boxes.

> You can try:

> (defun my/org-odt--checkbox (item)
>   "Return check-box string associated to ITEM."
>   (let ((checkbox (org-element-property :checkbox item)))
>     (if (not checkbox) ""
>       (format "<text:span text:style-name=\"%s\">%s</text:span>"
>             "OrgCode" (cl-case checkbox
>                         (on "\u2611 ") ; CHECK MARK
>                         (off "\u2610 ")
>                         (trans "[-] ")))))) ;; I don't know which character 
> to choose here...

> (advice-add 'org-odt--checkbox :override  #'my/org-odt--checkbox)

Thanks very much, I saw it too late to respond yesterday. A couple of remarks

    1. (on "\u2611 ") ; CHECK MARK: I rather prefer 2612 but this is a
       question of taste

    2. It seems not to work, I loaded the function and Executed the
       advice, but 

When I tried to export this minimal example

* Check the conversion of checkboxes


    1. Latex $\boxtimes$

    2. UTF8 ☒,   ▢ □

    3. Org   [ ] and   [X]

    4. Org [] [-]

I obtained a odt file in which 3 and 4 were *not* converted to UTF8. I
attach the file. What do I miss?

Regards

Uwe 

Attachment: checkbox.odt
Description: application/vnd.oasis.opendocument.text

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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