emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: how to export checkboxes to odt?
Date: Tue, 28 Sep 2021 20:47:27 +0000	[thread overview]
Message-ID: <87czosh1gg.fsf@posteo.net> (raw)
In-Reply-To: <8735po3awv.fsf@mat.ucm.es> (Uwe Brauer's message of "Tue, 28 Sep 2021 18:46:56 +0200")

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)

Best regards,

Juan Manuel 


  parent reply	other threads:[~2021-09-28 20:48 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 ` Juan Manuel Macías [this message]
2021-09-29  6:29   ` how to export checkboxes to odt? Uwe Brauer
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=87czosh1gg.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=oub@mat.ucm.es \
    --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).