emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: Re: how to export checkboxes to odt?
Date: Wed, 29 Sep 2021 08:29:42 +0200	[thread overview]
Message-ID: <87bl4bc2sp.fsf@mat.ucm.es> (raw)
In-Reply-To: <87czosh1gg.fsf@posteo.net>


[-- Attachment #1.1: Type: text/plain, Size: 1383 bytes --]

>>> "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 #1.2: checkbox.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 12057 bytes --]

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

  reply	other threads:[~2021-09-29  6:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 16:46 Uwe Brauer
2021-09-28 20:21 ` [SOLVED] (was: how to export checkboxes to odt?) Uwe Brauer
2021-09-29  4:07   ` Timothy
2021-09-29  6:30     ` [SOLVED] Uwe Brauer
2021-09-29 11:02     ` [SOLVED] (was: how to export checkboxes to odt?) Max Nikulin
2021-09-30 15:39       ` [checkbox in tables] (was: [SOLVED]) Uwe Brauer
2021-09-28 20:47 ` how to export checkboxes to odt? Juan Manuel Macías
2021-09-29  6:29   ` Uwe Brauer [this message]
2021-09-29  7:02     ` [misunderstanding] (was: how to export checkboxes to odt?) Uwe Brauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bl4bc2sp.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: how to export checkboxes to odt?' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).