all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* how to export checkboxes to odt?
@ 2021-09-28 16:46 Uwe Brauer
  2021-09-28 20:21 ` [SOLVED] (was: how to export checkboxes to odt?) Uwe Brauer
  2021-09-28 20:47 ` how to export checkboxes to odt? Juan Manuel Macías
  0 siblings, 2 replies; 9+ messages in thread
From: Uwe Brauer @ 2021-09-28 16:46 UTC (permalink / raw)
  To: emacs-orgmode


Hi

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.

Thanks and regards

Uwe Brauer 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [SOLVED] (was: how to export checkboxes to odt?)
  2021-09-28 16:46 how to export checkboxes to odt? Uwe Brauer
@ 2021-09-28 20:21 ` Uwe Brauer
  2021-09-29  4:07   ` Timothy
  2021-09-28 20:47 ` how to export checkboxes to odt? Juan Manuel Macías
  1 sibling, 1 reply; 9+ messages in thread
From: Uwe Brauer @ 2021-09-28 20:21 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 260 bytes --]

>>> "UB" == Uwe Brauer <oub@mat.ucm.es> writes:

> Hi

> 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.

Either using latex $\boxtimes$
or   UTF8 ☒



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how to export checkboxes to odt?
  2021-09-28 16:46 how to export checkboxes to odt? Uwe Brauer
  2021-09-28 20:21 ` [SOLVED] (was: how to export checkboxes to odt?) Uwe Brauer
@ 2021-09-28 20:47 ` Juan Manuel Macías
  2021-09-29  6:29   ` Uwe Brauer
  1 sibling, 1 reply; 9+ messages in thread
From: Juan Manuel Macías @ 2021-09-28 20:47 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: orgmode

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 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [SOLVED] (was: how to export checkboxes to odt?)
  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
  0 siblings, 2 replies; 9+ messages in thread
From: Timothy @ 2021-09-29  4:07 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

Hello,

>> 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.
>
> Either using latex ⊠
> or   UTF8 ☒

I’m wondering, would this be worth adding to ox-odt?

All the best,
Timothy

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how to export checkboxes to odt?
  2021-09-28 20:47 ` how to export checkboxes to odt? Juan Manuel Macías
@ 2021-09-29  6:29   ` Uwe Brauer
  2021-09-29  7:02     ` [misunderstanding] (was: how to export checkboxes to odt?) Uwe Brauer
  0 siblings, 1 reply; 9+ messages in thread
From: Uwe Brauer @ 2021-09-29  6:29 UTC (permalink / raw)
  To: emacs-orgmode


[-- 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 --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [SOLVED]
  2021-09-29  4:07   ` Timothy
@ 2021-09-29  6:30     ` Uwe Brauer
  2021-09-29 11:02     ` [SOLVED] (was: how to export checkboxes to odt?) Max Nikulin
  1 sibling, 0 replies; 9+ messages in thread
From: Uwe Brauer @ 2021-09-29  6:30 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 447 bytes --]

>>> "T" == Timothy  <tecosaur@gmail.com> writes:

> Hello,
>>> 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.
>> 
>> Either using latex ⊠
>> or   UTF8 ☒

> I’m wondering, would this be worth adding to ox-odt?

I think Juan's solution would be nice, however it does not work for me write now, so I have to see what is wrong with it.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [misunderstanding] (was: how to export checkboxes to odt?)
  2021-09-29  6:29   ` Uwe Brauer
@ 2021-09-29  7:02     ` Uwe Brauer
  0 siblings, 0 replies; 9+ messages in thread
From: Uwe Brauer @ 2021-09-29  7:02 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 479 bytes --]



> Hi Juan,




> 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 

I just want to clarify, that your code works.
I realized that I used the word checkbox not a the strict org mode sense.
Sorry for the confusion!

Thanks for your code

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [SOLVED] (was: how to export checkboxes to odt?)
  2021-09-29  4:07   ` Timothy
  2021-09-29  6:30     ` [SOLVED] Uwe Brauer
@ 2021-09-29 11:02     ` Max Nikulin
  2021-09-30 15:39       ` [checkbox in tables] (was: [SOLVED]) Uwe Brauer
  1 sibling, 1 reply; 9+ messages in thread
From: Max Nikulin @ 2021-09-29 11:02 UTC (permalink / raw)
  To: emacs-orgmode

On 29/09/2021 11:07, Timothy wrote:
> 
>>> 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.
>>
>> Either using latex ⊠
>> or   UTF8 ☒
> 
> I’m wondering, would this be worth adding to ox-odt?

LibreOffice has some object called "checkbox" that could be inserted 
using "Form Controls" toolbar. I have never used this feature, so unsure 
whether it is a proper representation for Org checkboxes.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [checkbox in tables] (was: [SOLVED])
  2021-09-29 11:02     ` [SOLVED] (was: how to export checkboxes to odt?) Max Nikulin
@ 2021-09-30 15:39       ` Uwe Brauer
  0 siblings, 0 replies; 9+ messages in thread
From: Uwe Brauer @ 2021-09-30 15:39 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

>>> "MN" == Max Nikulin <manikulin@gmail.com> writes:

> On 29/09/2021 11:07, Timothy wrote:
>> 
>>> 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.
>>> 
>>> Either using latex ⊠
>>> or   UTF8 ☒
>> I’m wondering, would this be worth adding to ox-odt?

> LibreOffice has some object called "checkbox" that could be inserted
> using "Form Controls" toolbar. I have never used this feature, so
> unsure whether it is a proper representation for Org checkboxes.

I should add, that I need to generate an odt document, in which checkboxes are placed in tables, a feature that is not supported by org mode as of today, unfortunately.


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-09-30 16:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-28 16:46 how to export checkboxes to odt? 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
2021-09-29  7:02     ` [misunderstanding] (was: how to export checkboxes to odt?) Uwe Brauer

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.