emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Getting checkboxes in HTML output?
@ 2013-11-27 15:45 Peter Davis
  2013-11-27 16:03 ` Nick Dokos
  2013-11-28 14:30 ` Waldemar Quevedo
  0 siblings, 2 replies; 26+ messages in thread
From: Peter Davis @ 2013-11-27 15:45 UTC (permalink / raw)
  To: emacs-orgmode

I noticed that HTML output contains "[ ]" and "[X]", just like the
mark-up. Wouldn't it make sense to use actual unchecked or checked
checkboxes in HTML?

Is there a simple way to do this that I've overlooked?

Thanks,
-pd

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

* Re: Getting checkboxes in HTML output?
  2013-11-27 15:45 Getting checkboxes in HTML output? Peter Davis
@ 2013-11-27 16:03 ` Nick Dokos
  2013-11-27 18:20   ` Peter Davis
  2013-11-28 14:30 ` Waldemar Quevedo
  1 sibling, 1 reply; 26+ messages in thread
From: Nick Dokos @ 2013-11-27 16:03 UTC (permalink / raw)
  To: emacs-orgmode

Peter Davis <pfd@pfdstudio.com> writes:

> I noticed that HTML output contains "[ ]" and "[X]", just like the
> mark-up. Wouldn't it make sense to use actual unchecked or checked
> checkboxes in HTML?
>
> Is there a simple way to do this that I've overlooked?
>

A cursory glance through ox-html.el uncovered this:

--8<---------------cut here---------------start------------->8---
(defun org-html-checkbox (checkbox)
  "Format CHECKBOX into HTML."
  (case checkbox (on "<code>[X]</code>")
	(off "<code>[&#xa0;]</code>")
	(trans "<code>[-]</code>")
	(t "")))
--8<---------------cut here---------------end--------------->8---

Maybe you can redefine this function to do what you want?

Nick

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

* Re: Getting checkboxes in HTML output?
  2013-11-27 16:03 ` Nick Dokos
@ 2013-11-27 18:20   ` Peter Davis
  2013-11-28 13:33     ` Rick Frankel
  0 siblings, 1 reply; 26+ messages in thread
From: Peter Davis @ 2013-11-27 18:20 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

On Wed, Nov 27, 2013 at 11:03:38AM -0500, Nick Dokos wrote:
> Peter Davis <pfd@pfdstudio.com> writes:
> 
> > I noticed that HTML output contains "[ ]" and "[X]", just like the
> > mark-up. Wouldn't it make sense to use actual unchecked or checked
> > checkboxes in HTML?
> >
> > Is there a simple way to do this that I've overlooked?
> >
> 
> A cursory glance through ox-html.el uncovered this:
> 
> --8<---------------cut here---------------start------------->8---
> (defun org-html-checkbox (checkbox)
>   "Format CHECKBOX into HTML."
>   (case checkbox (on "<code>[X]</code>")
> 	(off "<code>[&#xa0;]</code>")
> 	(trans "<code>[-]</code>")
> 	(t "")))
> --8<---------------cut here---------------end--------------->8---
> 
> Maybe you can redefine this function to do what you want?

Yes, this works:

--8<---------------cut here---------------start------------->8---
(defun org-html-checkbox (checkbox)
  "Format CHECKBOX into HTML."
  (case checkbox (on "<input type=\"checkbox\" checked />")
  (off "<input type=\"checkbox\" />")
  (trans "<code>[-]</code>")
  (t "")))
--8<---------------cut here---------------end--------------->8---


Thank you!

-pd

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

* Re: Getting checkboxes in HTML output?
  2013-11-27 18:20   ` Peter Davis
@ 2013-11-28 13:33     ` Rick Frankel
  2013-11-28 13:55       ` Peter Davis
                         ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Rick Frankel @ 2013-11-28 13:33 UTC (permalink / raw)
  To: Peter Davis; +Cc: Nick Dokos, emacs-orgmode

On Wed, Nov 27, 2013 at 01:20:59PM -0500, Peter Davis wrote:
> On Wed, Nov 27, 2013 at 11:03:38AM -0500, Nick Dokos wrote:
> > Peter Davis <pfd@pfdstudio.com> writes:
> >
> > > I noticed that HTML output contains "[ ]" and "[X]", just like
> the
> > > mark-up. Wouldn't it make sense to use actual unchecked or
> checked
> > > checkboxes in HTML?
> > >
> > > Is there a simple way to do this that I've overlooked?
> > >
> >
> > A cursory glance through ox-html.el uncovered this:
> >
> > --8<---------------cut here---------------start------------->8---
> > (defun org-html-checkbox (checkbox)
> >   "Format CHECKBOX into HTML."
> >   (case checkbox (on "<code>[X]</code>")
> >     (off "<code>[&#xa0;]</code>")
> >     (trans "<code>[-]</code>")
> >     (t "")))
> > --8<---------------cut here---------------end--------------->8---
> >
> > Maybe you can redefine this function to do what you want?
>
> Yes, this works:
>
> --8<---------------cut here---------------start------------->8---
> (defun org-html-checkbox (checkbox)
>   "Format CHECKBOX into HTML."
>   (case checkbox (on "<input type=\"checkbox\" checked />")
>   (off "<input type=\"checkbox\" />")
>   (trans "<code>[-]</code>")
>   (t "")))
> --8<---------------cut here---------------end--------------->8---

For xhtml compatibility, it would need to be 'checked="checked"'. I've
done a quick look at the html dtd, and i does look like input elements
are allowed outside of forms, but i would need to double
check... Also, the fallback to "[-]" for the partially checked state
is a bit inconsistent, perhaps changing background color or other
attributre of the checkbox would be better.

I would be willing to make this change (as an option?) to the html
exporter if others agree.

rick

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

* Re: Getting checkboxes in HTML output?
  2013-11-28 13:33     ` Rick Frankel
@ 2013-11-28 13:55       ` Peter Davis
  2013-11-28 16:08       ` Bastien
  2013-11-28 20:51       ` Achim Gratz
  2 siblings, 0 replies; 26+ messages in thread
From: Peter Davis @ 2013-11-28 13:55 UTC (permalink / raw)
  To: emacs-orgmode


On 11/28/13, 8:33 AM, Rick Frankel wrote:
> On Wed, Nov 27, 2013 at 01:20:59PM -0500, Peter Davis wrote:
>> On Wed, Nov 27, 2013 at 11:03:38AM -0500, Nick Dokos wrote:
>>> Peter Davis <pfd@pfdstudio.com> writes:
>>>
>>>> I noticed that HTML output contains "[ ]" and "[X]", just like
>> the
>>>> mark-up. Wouldn't it make sense to use actual unchecked or
>> checked
>>>> checkboxes in HTML?
>>>>
>>>> Is there a simple way to do this that I've overlooked?
>>>>
>>> A cursory glance through ox-html.el uncovered this:
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> (defun org-html-checkbox (checkbox)
>>>    "Format CHECKBOX into HTML."
>>>    (case checkbox (on "<code>[X]</code>")
>>>      (off "<code>[&#xa0;]</code>")
>>>      (trans "<code>[-]</code>")
>>>      (t "")))
>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> Maybe you can redefine this function to do what you want?
>> Yes, this works:
>>
>> --8<---------------cut here---------------start------------->8---
>> (defun org-html-checkbox (checkbox)
>>    "Format CHECKBOX into HTML."
>>    (case checkbox (on "<input type=\"checkbox\" checked />")
>>    (off "<input type=\"checkbox\" />")
>>    (trans "<code>[-]</code>")
>>    (t "")))
>> --8<---------------cut here---------------end--------------->8---
> For xhtml compatibility, it would need to be 'checked="checked"'. I've
> done a quick look at the html dtd, and i does look like input elements
> are allowed outside of forms, but i would need to double
> check... Also, the fallback to "[-]" for the partially checked state
> is a bit inconsistent, perhaps changing background color or other
> attributre of the checkbox would be better.
>
> I would be willing to make this change (as an option?) to the html
> exporter if others agree.
Thanks, Rick. Adding a value for the checked attribute is no problem. I 
didn't have a good solution for the partially checked state. One 
possibility would be adding the 'disabled="disabled"' attribute, which 
would make it appear gray. However, I've considered adding that 
attribute in all cases, since the HTML output is really for display and 
not input.

I'd love to see this as an option in the main code, so I don't have to 
keep retrofitting it into succeeding versions.

-pd

-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Getting checkboxes in HTML output?
  2013-11-27 15:45 Getting checkboxes in HTML output? Peter Davis
  2013-11-27 16:03 ` Nick Dokos
@ 2013-11-28 14:30 ` Waldemar Quevedo
  2013-11-28 14:41   ` Waldemar Quevedo
  1 sibling, 1 reply; 26+ messages in thread
From: Waldemar Quevedo @ 2013-11-28 14:30 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

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

fyi, this feature is heavily requested in Github for their markup project:
https://github.com/github/markup/issues/208

So +1 on changing this behavior in Org mode markup itself, since there is
already user demand which would validate this usage.



On Thu, Nov 28, 2013 at 12:45 AM, Peter Davis <pfd@pfdstudio.com> wrote:

> I noticed that HTML output contains "[ ]" and "[X]", just like the
> mark-up. Wouldn't it make sense to use actual unchecked or checked
> checkboxes in HTML?
>
> Is there a simple way to do this that I've overlooked?
>
> Thanks,
> -pd
>
>
>

[-- Attachment #2: Type: text/html, Size: 1046 bytes --]

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

* Re: Getting checkboxes in HTML output?
  2013-11-28 14:30 ` Waldemar Quevedo
@ 2013-11-28 14:41   ` Waldemar Quevedo
  0 siblings, 0 replies; 26+ messages in thread
From: Waldemar Quevedo @ 2013-11-28 14:41 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

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

By the way TL;DR; from that Github thread:

It seems that Markdown by default does not support read only checkboxes,
and Github would not implement this behavior because they want to keep
compatibility with other implementations of Markdown:
https://github.com/github/markup/issues/208#issuecomment-24927799

I think that Org mode markup syntax is still in the stage where we can be
liberal enough to change this kind of behavior which would be gladly
received by many people (I hope!), specially since this would change only
the HTML output.

Some feedback on that thread on a feature like this:
- "+1 for readonly (checkboxes). It cannot be that hard..." =>
https://github.com/github/markup/issues/208#issuecomment-27712872
- "+1, i cannot live without checkboxes in readme!"  =>
https://github.com/github/markup/issues/208#issuecomment-27713464
- "I'll die; Please add checkboxes" =>
https://github.com/github/markup/issues/208#issuecomment-28001693

Cheers!

- Waldemar


On Thu, Nov 28, 2013 at 11:30 PM, Waldemar Quevedo <
waldemar.quevedo@gmail.com> wrote:

> fyi, this feature is heavily requested in Github for their markup project:
> https://github.com/github/markup/issues/208
>
> So +1 on changing this behavior in Org mode markup itself, since there is
> already user demand which would validate this usage.
>
>
>
> On Thu, Nov 28, 2013 at 12:45 AM, Peter Davis <pfd@pfdstudio.com> wrote:
>
>> I noticed that HTML output contains "[ ]" and "[X]", just like the
>> mark-up. Wouldn't it make sense to use actual unchecked or checked
>> checkboxes in HTML?
>>
>> Is there a simple way to do this that I've overlooked?
>>
>> Thanks,
>> -pd
>>
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 3771 bytes --]

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

* Re: Getting checkboxes in HTML output?
  2013-11-28 13:33     ` Rick Frankel
  2013-11-28 13:55       ` Peter Davis
@ 2013-11-28 16:08       ` Bastien
  2013-11-28 17:03         ` Matt Price
  2013-11-28 20:51       ` Achim Gratz
  2 siblings, 1 reply; 26+ messages in thread
From: Bastien @ 2013-11-28 16:08 UTC (permalink / raw)
  To: Rick Frankel; +Cc: Nick Dokos, emacs-orgmode, Peter Davis

Hi Rick,

Rick Frankel <rick@rickster.com> writes:

> I would be willing to make this change (as an option?) to the html
> exporter if others agree.

FWIW I do agree this is a good change.

-- 
 Bastien

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

* Re: Getting checkboxes in HTML output?
  2013-11-28 16:08       ` Bastien
@ 2013-11-28 17:03         ` Matt Price
  0 siblings, 0 replies; 26+ messages in thread
From: Matt Price @ 2013-11-28 17:03 UTC (permalink / raw)
  To: Bastien; +Cc: Nick Dokos, Rick Frankel, Org Mode, Peter Davis

On Thu, Nov 28, 2013 at 11:08 AM, Bastien <bzg@gnu.org> wrote:
> Hi Rick,
>
> Rick Frankel <rick@rickster.com> writes:
>
>> I would be willing to make this change (as an option?) to the html
>> exporter if others agree.
>
> FWIW I do agree this is a good change.

not that this opinion really matters, but I've been wanting this
option for a while, e.g. for exporting hoping lists and the like.


>
> --
>  Bastien
>

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

* Re: Getting checkboxes in HTML output?
  2013-11-28 13:33     ` Rick Frankel
  2013-11-28 13:55       ` Peter Davis
  2013-11-28 16:08       ` Bastien
@ 2013-11-28 20:51       ` Achim Gratz
  2013-11-28 21:26         ` Sebastien Vauban
  2 siblings, 1 reply; 26+ messages in thread
From: Achim Gratz @ 2013-11-28 20:51 UTC (permalink / raw)
  To: emacs-orgmode

Rick Frankel writes:
> For xhtml compatibility, it would need to be 'checked="checked"'. I've
> done a quick look at the html dtd, and i does look like input elements
> are allowed outside of forms, but i would need to double
> check... Also, the fallback to "[-]" for the partially checked state
> is a bit inconsistent, perhaps changing background color or other
> attributre of the checkbox would be better.

I'd much prefer if you'd be using character entities for that since you
can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
candidates).  That probably makes it UTF-8 only since I don't think
these symbols are defined for plain (X)HTML, so for other encodings
things should probably stay as they are.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

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

* Re: Getting checkboxes in HTML output?
  2013-11-28 20:51       ` Achim Gratz
@ 2013-11-28 21:26         ` Sebastien Vauban
       [not found]           ` <CAN_Dec9a5v2rqQSvAKpvgLWKsTY8YLoMSvKbtkgak77Bb=nbAg@mail.gmail.com>
  2013-11-29  1:47           ` Eric Abrahamsen
  0 siblings, 2 replies; 26+ messages in thread
From: Sebastien Vauban @ 2013-11-28 21:26 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Achim Gratz wrote:
> Rick Frankel writes:
>> For xhtml compatibility, it would need to be 'checked="checked"'. I've
>> done a quick look at the html dtd, and i does look like input elements
>> are allowed outside of forms, but i would need to double
>> check... Also, the fallback to "[-]" for the partially checked state
>> is a bit inconsistent, perhaps changing background color or other
>> attributre of the checkbox would be better.
>
> I'd much prefer if you'd be using character entities for that since you
> can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
> LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
> candidates).  That probably makes it UTF-8 only since I don't think
> these symbols are defined for plain (X)HTML, so for other encodings
> things should probably stay as they are.

FWIW, here's what I do for the HTML export:

In JS:

#+begin_src js
  $(function () {
      $('li > code:contains("[X]")')
          .parent()
              .addClass('checked')
          .end()
          .remove();
      $('li > code:contains("[-]")')
          .parent()
              .addClass('halfchecked')
          .end()
          .remove();
      $('li > code:contains("[ ]")')
          .parent()
              .addClass('unchecked')
          .end()
          .remove();
  });
#+end_src

In CSS:

#+begin_src css
  li.checked {
      list-style-image: url('../images/checked.png');
  }

  li.halfchecked {
      list-style-image: url('../images/halfchecked.png');
  }

  li.unchecked {
      list-style-image: url('../images/unchecked.png');
  }
#+end_src

with 3 nice pictures of green V, red X, and blue || (line "pause" on
recorders).

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Getting checkboxes in HTML output?
       [not found]           ` <CAN_Dec9a5v2rqQSvAKpvgLWKsTY8YLoMSvKbtkgak77Bb=nbAg@mail.gmail.com>
@ 2013-11-28 21:58             ` Matt Price
  2013-11-29 16:11               ` Rick Frankel
  0 siblings, 1 reply; 26+ messages in thread
From: Matt Price @ 2013-11-28 21:58 UTC (permalink / raw)
  To: Org Mode

On Thu, Nov 28, 2013 at 4:26 PM, Sebastien Vauban
<sva-news@mygooglest.com> wrote:
> Achim Gratz wrote:
>> Rick Frankel writes:
>>> For xhtml compatibility, it would need to be 'checked="checked"'. I've
>>> done a quick look at the html dtd, and i does look like input elements
>>> are allowed outside of forms, but i would need to double
>>> check... Also, the fallback to "[-]" for the partially checked state
>>> is a bit inconsistent, perhaps changing background color or other
>>> attributre of the checkbox would be better.
>>
>> I'd much prefer if you'd be using character entities for that since you
>> can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
>> LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
>> candidates).  That probably makes it UTF-8 only since I don't think
>> these symbols are defined for plain (X)HTML, so for other encodings
>> things should probably stay as they are.
>
> FWIW, here's what I do for the HTML export:
>
> In JS:
>
> #+begin_src js
>   $(function () {
>       $('li > code:contains("[X]")')
>           .parent()
>               .addClass('checked')
>           .end()
>           .remove();
>       $('li > code:contains("[-]")')
>           .parent()
>               .addClass('halfchecked')
>           .end()
>           .remove();
>       $('li > code:contains("[ ]")')
>           .parent()
>               .addClass('unchecked')
>           .end()
>           .remove();
>   });
> #+end_src
>
> In CSS:
>
> #+begin_src css
>   li.checked {
>       list-style-image: url('../images/checked.png');
>   }
>
>   li.halfchecked {
>       list-style-image: url('../images/halfchecked.png');
>   }
>
>   li.unchecked {
>       list-style-image: url('../images/unchecked.png');
>   }
> #+end_src
>
> with 3 nice pictures of green V, red X, and blue || (line "pause" on
> recorders).
>


so, I don't know if I'm the only one here who feels this way, but I
would like to be able to export to an HTML file with ACTUAL HECKBOXES
that I cna check off, say on a phone, when I put the milk in the
shopping art, or pack the swim goggles in the vacation bag, or
whatever.  Maybe though I should be thinking in terms of some other
export application, remember the milk or something.  Am I describing a
different use case than other users here, perhaps?

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

* Re: Getting checkboxes in HTML output?
  2013-11-28 21:26         ` Sebastien Vauban
       [not found]           ` <CAN_Dec9a5v2rqQSvAKpvgLWKsTY8YLoMSvKbtkgak77Bb=nbAg@mail.gmail.com>
@ 2013-11-29  1:47           ` Eric Abrahamsen
  1 sibling, 0 replies; 26+ messages in thread
From: Eric Abrahamsen @ 2013-11-29  1:47 UTC (permalink / raw)
  To: emacs-orgmode

"Sebastien Vauban" <sva-news@mygooglest.com>
writes:

> Achim Gratz wrote:
>> Rick Frankel writes:
>>> For xhtml compatibility, it would need to be 'checked="checked"'. I've
>>> done a quick look at the html dtd, and i does look like input elements
>>> are allowed outside of forms, but i would need to double
>>> check... Also, the fallback to "[-]" for the partially checked state
>>> is a bit inconsistent, perhaps changing background color or other
>>> attributre of the checkbox would be better.
>>
>> I'd much prefer if you'd be using character entities for that since you
>> can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
>> LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
>> candidates).  That probably makes it UTF-8 only since I don't think
>> these symbols are defined for plain (X)HTML, so for other encodings
>> things should probably stay as they are.
>
> FWIW, here's what I do for the HTML export:
>
> In JS:
>
> #+begin_src js
>   $(function () {
>       $('li > code:contains("[X]")')
>           .parent()
>               .addClass('checked')
>           .end()
>           .remove();
>       $('li > code:contains("[-]")')
>           .parent()
>               .addClass('halfchecked')
>           .end()
>           .remove();
>       $('li > code:contains("[]")')
>           .parent()
>               .addClass('unchecked')
>           .end()
>           .remove();
>   });
> #+end_src
>
> In CSS:
>
> #+begin_src css
>   li.checked {
>       list-style-image: url('../images/checked.png');
>   }
>
>   li.halfchecked {
>       list-style-image: url('../images/halfchecked.png');
>   }
>
>   li.unchecked {
>       list-style-image: url('../images/unchecked.png');
>   }
> #+end_src
>
> with 3 nice pictures of green V, red X, and blue || (line "pause" on
> recorders).

This seems like a much nicer solution -- JS seems semantically more
"right", since what you're doing is toggling display state, not actually
preparing content to input to a form...

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

* Re: Getting checkboxes in HTML output?
  2013-11-28 21:58             ` Matt Price
@ 2013-11-29 16:11               ` Rick Frankel
  2013-11-29 18:59                 ` Peter Davis
  2013-11-30  6:54                 ` Carsten Dominik
  0 siblings, 2 replies; 26+ messages in thread
From: Rick Frankel @ 2013-11-29 16:11 UTC (permalink / raw)
  To: emacs-orgmode

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

On 2013-11-28 16:58, Matt Price wrote:
> On Thu, Nov 28, 2013 at 4:26 PM, Sebastien Vauban
> <sva-news@mygooglest.com> wrote:
> Achim Gratz wrote:
> Rick Frankel writes:
> For xhtml compatibility, it would need to be 'checked="checked"'. I've
> done a quick look at the html dtd, and i does look like input elements
> are allowed outside of forms, but i would need to double
> check... Also, the fallback to "[-]" for the partially checked state
> is a bit inconsistent, perhaps changing background color or other
> attributre of the checkbox would be better.
> 
> I'd much prefer if you'd be using character entities for that since you
> can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
> LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
> candidates).  That probably makes it UTF-8 only since I don't think
> these symbols are defined for plain (X)HTML, so for other encodings
> things should probably stay as they are.
> 
> FWIW, here's what I do for the HTML export:
> 
> In JS:
> 
> #+begin_src js
> $(function () {
> $('li > code:contains("[X]")')
> .parent()
> .addClass('checked')
> .end()
> .remove();
> $('li > code:contains("[-]")')
> .parent()
> .addClass('halfchecked')
> .end()
> .remove();
> $('li > code:contains("[ ]")')
> .parent()
> .addClass('unchecked')
> .end()
> .remove();
> });
> #+end_src
> 
> In CSS:
> 
> #+begin_src css
> li.checked {
> list-style-image: url('../images/checked.png');
> }
> 
> li.halfchecked {
> list-style-image: url('../images/halfchecked.png');
> }
> 
> li.unchecked {
> list-style-image: url('../images/unchecked.png');
> }
> #+end_src
> 
> with 3 nice pictures of green V, red X, and blue || (line "pause" on
> recorders).
> 
> 
> 
> so, I don't know if I'm the only one here who feels this way, but I
> would like to be able to export to an HTML file with ACTUAL HECKBOXES
> that I cna check off, say on a phone, when I put the milk in the
> shopping art, or pack the swim goggles in the vacation bag, or
> whatever.  Maybe though I should be thinking in terms of some other
> export application, remember the milk or something.  Am I describing a
> different use case than other users here, perhaps?

My 3 cents:

I don't see that active checkboxes would help since i don't see a use
case where you can save the html back with the modified input. The
github usecase mentioned in anothre thread requires a bunch of
javascript to work (and write-out the modified file).

While Sebastien's solution is visually appealing, i don't think
requiring image assets is viable for the core exporter (note that it
could be done w/o javascript, another dependency i would like to
avoid).

I've attached an html file which shows the various possible options. My
comments:

1. As mentioned above, I don't see active checkboxes as useful
since the modified state is transient.
2. I don't really like the disabled checkboxes visually.
3. Either of the other two approaches (the list item style, which
parallels Sebastien's approach w/o using images) works for me.
Visually I like the list item style solution, but doesn't really
make the intent clear.

So, my vote is to change the exporter to use the BALLOT BOX and BALLOT
BOX WITH CHECK instead of the ascii character currently used and
indicate partially checked boxes ([-]) with greyed text.

Opinions?

rick


[-- Attachment #2: checkbox.html --]
[-- Type: text/html, Size: 1234 bytes --]

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

* Re: Getting checkboxes in HTML output?
  2013-11-29 16:11               ` Rick Frankel
@ 2013-11-29 18:59                 ` Peter Davis
  2013-11-30  6:54                 ` Carsten Dominik
  1 sibling, 0 replies; 26+ messages in thread
From: Peter Davis @ 2013-11-29 18:59 UTC (permalink / raw)
  To: emacs-orgmode


On 11/29/13, 11:11 AM, Rick Frankel wrote:
> On 2013-11-28 16:58, Matt Price wrote:
>> On Thu, Nov 28, 2013 at 4:26 PM, Sebastien Vauban
>> <sva-news@mygooglest.com> wrote:
>> Achim Gratz wrote:
>> Rick Frankel writes:
>> For xhtml compatibility, it would need to be 'checked="checked"'. I've
>> done a quick look at the html dtd, and i does look like input elements
>> are allowed outside of forms, but i would need to double
>> check... Also, the fallback to "[-]" for the partially checked state
>> is a bit inconsistent, perhaps changing background color or other
>> attributre of the checkbox would be better.
>>
>> I'd much prefer if you'd be using character entities for that since you
>> can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
>> LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
>> candidates).  That probably makes it UTF-8 only since I don't think
>> these symbols are defined for plain (X)HTML, so for other encodings
>> things should probably stay as they are.
>>
>> FWIW, here's what I do for the HTML export:
>>
>> In JS:
>>
>> #+begin_src js
>> $(function () {
>> $('li > code:contains("[X]")')
>> .parent()
>> .addClass('checked')
>> .end()
>> .remove();
>> $('li > code:contains("[-]")')
>> .parent()
>> .addClass('halfchecked')
>> .end()
>> .remove();
>> $('li > code:contains("[ ]")')
>> .parent()
>> .addClass('unchecked')
>> .end()
>> .remove();
>> });
>> #+end_src
>>
>> In CSS:
>>
>> #+begin_src css
>> li.checked {
>> list-style-image: url('../images/checked.png');
>> }
>>
>> li.halfchecked {
>> list-style-image: url('../images/halfchecked.png');
>> }
>>
>> li.unchecked {
>> list-style-image: url('../images/unchecked.png');
>> }
>> #+end_src
>>
>> with 3 nice pictures of green V, red X, and blue || (line "pause" on
>> recorders).
>>
>>
>>
>> so, I don't know if I'm the only one here who feels this way, but I
>> would like to be able to export to an HTML file with ACTUAL HECKBOXES
>> that I cna check off, say on a phone, when I put the milk in the
>> shopping art, or pack the swim goggles in the vacation bag, or
>> whatever.  Maybe though I should be thinking in terms of some other
>> export application, remember the milk or something.  Am I describing a
>> different use case than other users here, perhaps?
>
> My 3 cents:
>
> I don't see that active checkboxes would help since i don't see a use
> case where you can save the html back with the modified input. The
> github usecase mentioned in anothre thread requires a bunch of
> javascript to work (and write-out the modified file).
>
> While Sebastien's solution is visually appealing, i don't think
> requiring image assets is viable for the core exporter (note that it
> could be done w/o javascript, another dependency i would like to
> avoid).
>
> I've attached an html file which shows the various possible options. My
> comments:
>
> 1. As mentioned above, I don't see active checkboxes as useful
> since the modified state is transient.
> 2. I don't really like the disabled checkboxes visually.
> 3. Either of the other two approaches (the list item style, which
> parallels Sebastien's approach w/o using images) works for me.
> Visually I like the list item style solution, but doesn't really
> make the intent clear.
>
> So, my vote is to change the exporter to use the BALLOT BOX and BALLOT
> BOX WITH CHECK instead of the ascii character currently used and
> indicate partially checked boxes ([-]) with greyed text.
>
> Opinions?
>
> rick
>

Thanks for the handy comparison page, Rick. Visually, I'm happy with 
either actual HTML <input ...> checkbox elements or the Unicode BALLOT 
BOX and BALLOT BOX WITH CHECK characters. Semantically, I suppose it's 
better to avoid having active input elements, since, as you point out, 
they're completely transient, and so potentially misleading.

Unfortunately, I don't think any of the "partial" options is very clear. 
They graying out is not particularly clear. But I could live with it if 
no better alternatives are found.

-pd

-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Getting checkboxes in HTML output?
  2013-11-29 16:11               ` Rick Frankel
  2013-11-29 18:59                 ` Peter Davis
@ 2013-11-30  6:54                 ` Carsten Dominik
  2013-11-30 14:07                   ` Rick Frankel
  1 sibling, 1 reply; 26+ messages in thread
From: Carsten Dominik @ 2013-11-30  6:54 UTC (permalink / raw)
  To: Rick Frankel; +Cc: emacs-orgmode

Dear Rick,

this is a very useful comparison, thank you!

I don't thing the partial ones work - we should just make then unchecked in export if there is nothing better.  the grey dos not convey the right information.

I like the last option (unicode characters) best. The inactive checkboxes are visually appealing, but not consistent with function, I think.

My vote:
- Unicode characters as default
- Both active and inactive checkboxes as option for people who want them, via a customize variable.
- Partial checkboxes should be shown as unchecked.

Cheers

- Carsten


On 29.11.2013, at 17:11, Rick Frankel <rick@rickster.com> wrote:

> On 2013-11-28 16:58, Matt Price wrote:
>> On Thu, Nov 28, 2013 at 4:26 PM, Sebastien Vauban
>> <sva-news@mygooglest.com> wrote:
>> Achim Gratz wrote:
>> Rick Frankel writes:
>> For xhtml compatibility, it would need to be 'checked="checked"'. I've
>> done a quick look at the html dtd, and i does look like input elements
>> are allowed outside of forms, but i would need to double
>> check... Also, the fallback to "[-]" for the partially checked state
>> is a bit inconsistent, perhaps changing background color or other
>> attributre of the checkbox would be better.
>> I'd much prefer if you'd be using character entities for that since you
>> can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
>> LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
>> candidates).  That probably makes it UTF-8 only since I don't think
>> these symbols are defined for plain (X)HTML, so for other encodings
>> things should probably stay as they are.
>> FWIW, here's what I do for the HTML export:
>> In JS:
>> #+begin_src js
>> $(function () {
>> $('li > code:contains("[X]")')
>> .parent()
>> .addClass('checked')
>> .end()
>> .remove();
>> $('li > code:contains("[-]")')
>> .parent()
>> .addClass('halfchecked')
>> .end()
>> .remove();
>> $('li > code:contains("[ ]")')
>> .parent()
>> .addClass('unchecked')
>> .end()
>> .remove();
>> });
>> #+end_src
>> In CSS:
>> #+begin_src css
>> li.checked {
>> list-style-image: url('../images/checked.png');
>> }
>> li.halfchecked {
>> list-style-image: url('../images/halfchecked.png');
>> }
>> li.unchecked {
>> list-style-image: url('../images/unchecked.png');
>> }
>> #+end_src
>> with 3 nice pictures of green V, red X, and blue || (line "pause" on
>> recorders).
>> so, I don't know if I'm the only one here who feels this way, but I
>> would like to be able to export to an HTML file with ACTUAL HECKBOXES
>> that I cna check off, say on a phone, when I put the milk in the
>> shopping art, or pack the swim goggles in the vacation bag, or
>> whatever.  Maybe though I should be thinking in terms of some other
>> export application, remember the milk or something.  Am I describing a
>> different use case than other users here, perhaps?
> 
> My 3 cents:
> 
> I don't see that active checkboxes would help since i don't see a use
> case where you can save the html back with the modified input. The
> github usecase mentioned in anothre thread requires a bunch of
> javascript to work (and write-out the modified file).
> 
> While Sebastien's solution is visually appealing, i don't think
> requiring image assets is viable for the core exporter (note that it
> could be done w/o javascript, another dependency i would like to
> avoid).
> 
> I've attached an html file which shows the various possible options. My
> comments:
> 
> 1. As mentioned above, I don't see active checkboxes as useful
> since the modified state is transient.
> 2. I don't really like the disabled checkboxes visually.
> 3. Either of the other two approaches (the list item style, which
> parallels Sebastien's approach w/o using images) works for me.
> Visually I like the list item style solution, but doesn't really
> make the intent clear.
> 
> So, my vote is to change the exporter to use the BALLOT BOX and BALLOT
> BOX WITH CHECK instead of the ascii character currently used and
> indicate partially checked boxes ([-]) with greyed text.
> 
> Opinions?
> 
> rick
> 
> <checkbox.html>

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

* Re: Getting checkboxes in HTML output?
  2013-11-30  6:54                 ` Carsten Dominik
@ 2013-11-30 14:07                   ` Rick Frankel
  2013-12-01  6:46                     ` Carsten Dominik
  0 siblings, 1 reply; 26+ messages in thread
From: Rick Frankel @ 2013-11-30 14:07 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

On Sat, Nov 30, 2013 at 07:54:42AM +0100, Carsten Dominik wrote:

> I don't thing the partial ones work - we should just make then
> unchecked in export if there is nothing better.  the grey dos not
> convey the right information.

I agree, but couldn't think of any other way. There are 3 other
unicode options:

	1. A box with an X  (☒ U+2612 BALLOT BOX WITH X)
	2. A bare (unboxed) X (✗ U+2717 BALLOT X)
	3 A bare checkmark (✓ U+2713 CHECK MARK)

I  also found this character:

   U+237B ⍻ not check mark

If you think one of those would work we could use it instead.


> My vote:
> - Unicode characters as default
> - Both active and inactive checkboxes as option for people who want
> them, via a customize variable.
> - Partial checkboxes should be shown as unchecked.

I will implement the replacement of the ascii characters with the
unicode and the look at the html checkbox options.

FWIW, there are other issues w/ the active version besides the changes
not being saved -- If you are using hierarchical list or rollups
indicators ([x/y], [x%]), they will not be updated w/o some
javascript.

rick
> 
> 
> On 29.11.2013, at 17:11, Rick Frankel <rick@rickster.com> wrote:
> 
> > On 2013-11-28 16:58, Matt Price wrote:
> >> On Thu, Nov 28, 2013 at 4:26 PM, Sebastien Vauban
> >> <sva-news@mygooglest.com> wrote:
> >> Achim Gratz wrote:
> >> Rick Frankel writes:
> >> For xhtml compatibility, it would need to be 'checked="checked"'. I've
> >> done a quick look at the html dtd, and i does look like input elements
> >> are allowed outside of forms, but i would need to double
> >> check... Also, the fallback to "[-]" for the partially checked state
> >> is a bit inconsistent, perhaps changing background color or other
> >> attributre of the checkbox would be better.
> >> I'd much prefer if you'd be using character entities for that since you
> >> can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
> >> LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
> >> candidates).  That probably makes it UTF-8 only since I don't think
> >> these symbols are defined for plain (X)HTML, so for other encodings
> >> things should probably stay as they are.
> >> FWIW, here's what I do for the HTML export:
> >> In JS:
> >> #+begin_src js
> >> $(function () {
> >> $('li > code:contains("[X]")')
> >> .parent()
> >> .addClass('checked')
> >> .end()
> >> .remove();
> >> $('li > code:contains("[-]")')
> >> .parent()
> >> .addClass('halfchecked')
> >> .end()
> >> .remove();
> >> $('li > code:contains("[ ]")')
> >> .parent()
> >> .addClass('unchecked')
> >> .end()
> >> .remove();
> >> });
> >> #+end_src
> >> In CSS:
> >> #+begin_src css
> >> li.checked {
> >> list-style-image: url('../images/checked.png');
> >> }
> >> li.halfchecked {
> >> list-style-image: url('../images/halfchecked.png');
> >> }
> >> li.unchecked {
> >> list-style-image: url('../images/unchecked.png');
> >> }
> >> #+end_src
> >> with 3 nice pictures of green V, red X, and blue || (line "pause" on
> >> recorders).
> >> so, I don't know if I'm the only one here who feels this way, but I
> >> would like to be able to export to an HTML file with ACTUAL HECKBOXES
> >> that I cna check off, say on a phone, when I put the milk in the
> >> shopping art, or pack the swim goggles in the vacation bag, or
> >> whatever.  Maybe though I should be thinking in terms of some other
> >> export application, remember the milk or something.  Am I describing a
> >> different use case than other users here, perhaps?
> > 
> > My 3 cents:
> > 
> > I don't see that active checkboxes would help since i don't see a use
> > case where you can save the html back with the modified input. The
> > github usecase mentioned in anothre thread requires a bunch of
> > javascript to work (and write-out the modified file).
> > 
> > While Sebastien's solution is visually appealing, i don't think
> > requiring image assets is viable for the core exporter (note that it
> > could be done w/o javascript, another dependency i would like to
> > avoid).
> > 
> > I've attached an html file which shows the various possible options. My
> > comments:
> > 
> > 1. As mentioned above, I don't see active checkboxes as useful
> > since the modified state is transient.
> > 2. I don't really like the disabled checkboxes visually.
> > 3. Either of the other two approaches (the list item style, which
> > parallels Sebastien's approach w/o using images) works for me.
> > Visually I like the list item style solution, but doesn't really
> > make the intent clear.
> > 
> > So, my vote is to change the exporter to use the BALLOT BOX and BALLOT
> > BOX WITH CHECK instead of the ascii character currently used and
> > indicate partially checked boxes ([-]) with greyed text.
> > 
> > Opinions?
> > 
> > rick
> > 
> > <checkbox.html>

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

* Re: Getting checkboxes in HTML output?
  2013-11-30 14:07                   ` Rick Frankel
@ 2013-12-01  6:46                     ` Carsten Dominik
  2013-12-02  8:44                       ` Sebastien Vauban
  0 siblings, 1 reply; 26+ messages in thread
From: Carsten Dominik @ 2013-12-01  6:46 UTC (permalink / raw)
  To: Rick Frankel; +Cc: emacs-orgmode

Hi Rick,

On 30.11.2013, at 15:07, Rick Frankel <rick@rickster.com> wrote:

> On Sat, Nov 30, 2013 at 07:54:42AM +0100, Carsten Dominik wrote:
> 
>> I don't thing the partial ones work - we should just make then
>> unchecked in export if there is nothing better.  the grey dos not
>> convey the right information.
> 
> I agree, but couldn't think of any other way. There are 3 other
> unicode options:
> 
> 	1. A box with an X  (☒ U+2612 BALLOT BOX WITH X)
> 	2. A bare (unboxed) X (✗ U+2717 BALLOT X)
> 	3 A bare checkmark (✓ U+2713 CHECK MARK)
> 
> I  also found this character:
> 
>   U+237B ⍻ not check mark
> 
> If you think one of those would work we could use it instead.

No, I don't think any of them does it.

> 
> 
>> My vote:
>> - Unicode characters as default
>> - Both active and inactive checkboxes as option for people who want
>> them, via a customize variable.
>> - Partial checkboxes should be shown as unchecked.
> 
> I will implement the replacement of the ascii characters with the
> unicode and the look at the html checkbox options.
> 
> FWIW, there are other issues w/ the active version besides the changes
> not being saved -- If you are using hierarchical list or rollups
> indicators ([x/y], [x%]), they will not be updated w/o some
> javascript.

Thank you Rick!

- Carsten

> 
> rick
>> 
>> 
>> On 29.11.2013, at 17:11, Rick Frankel <rick@rickster.com> wrote:
>> 
>>> On 2013-11-28 16:58, Matt Price wrote:
>>>> On Thu, Nov 28, 2013 at 4:26 PM, Sebastien Vauban
>>>> <sva-news@mygooglest.com> wrote:
>>>> Achim Gratz wrote:
>>>> Rick Frankel writes:
>>>> For xhtml compatibility, it would need to be 'checked="checked"'. I've
>>>> done a quick look at the html dtd, and i does look like input elements
>>>> are allowed outside of forms, but i would need to double
>>>> check... Also, the fallback to "[-]" for the partially checked state
>>>> is a bit inconsistent, perhaps changing background color or other
>>>> attributre of the checkbox would be better.
>>>> I'd much prefer if you'd be using character entities for that since you
>>>> can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
>>>> LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
>>>> candidates).  That probably makes it UTF-8 only since I don't think
>>>> these symbols are defined for plain (X)HTML, so for other encodings
>>>> things should probably stay as they are.
>>>> FWIW, here's what I do for the HTML export:
>>>> In JS:
>>>> #+begin_src js
>>>> $(function () {
>>>> $('li > code:contains("[X]")')
>>>> .parent()
>>>> .addClass('checked')
>>>> .end()
>>>> .remove();
>>>> $('li > code:contains("[-]")')
>>>> .parent()
>>>> .addClass('halfchecked')
>>>> .end()
>>>> .remove();
>>>> $('li > code:contains("[ ]")')
>>>> .parent()
>>>> .addClass('unchecked')
>>>> .end()
>>>> .remove();
>>>> });
>>>> #+end_src
>>>> In CSS:
>>>> #+begin_src css
>>>> li.checked {
>>>> list-style-image: url('../images/checked.png');
>>>> }
>>>> li.halfchecked {
>>>> list-style-image: url('../images/halfchecked.png');
>>>> }
>>>> li.unchecked {
>>>> list-style-image: url('../images/unchecked.png');
>>>> }
>>>> #+end_src
>>>> with 3 nice pictures of green V, red X, and blue || (line "pause" on
>>>> recorders).
>>>> so, I don't know if I'm the only one here who feels this way, but I
>>>> would like to be able to export to an HTML file with ACTUAL HECKBOXES
>>>> that I cna check off, say on a phone, when I put the milk in the
>>>> shopping art, or pack the swim goggles in the vacation bag, or
>>>> whatever.  Maybe though I should be thinking in terms of some other
>>>> export application, remember the milk or something.  Am I describing a
>>>> different use case than other users here, perhaps?
>>> 
>>> My 3 cents:
>>> 
>>> I don't see that active checkboxes would help since i don't see a use
>>> case where you can save the html back with the modified input. The
>>> github usecase mentioned in anothre thread requires a bunch of
>>> javascript to work (and write-out the modified file).
>>> 
>>> While Sebastien's solution is visually appealing, i don't think
>>> requiring image assets is viable for the core exporter (note that it
>>> could be done w/o javascript, another dependency i would like to
>>> avoid).
>>> 
>>> I've attached an html file which shows the various possible options. My
>>> comments:
>>> 
>>> 1. As mentioned above, I don't see active checkboxes as useful
>>> since the modified state is transient.
>>> 2. I don't really like the disabled checkboxes visually.
>>> 3. Either of the other two approaches (the list item style, which
>>> parallels Sebastien's approach w/o using images) works for me.
>>> Visually I like the list item style solution, but doesn't really
>>> make the intent clear.
>>> 
>>> So, my vote is to change the exporter to use the BALLOT BOX and BALLOT
>>> BOX WITH CHECK instead of the ascii character currently used and
>>> indicate partially checked boxes ([-]) with greyed text.
>>> 
>>> Opinions?
>>> 
>>> rick
>>> 
>>> <checkbox.html>

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

* Re: Getting checkboxes in HTML output?
  2013-12-01  6:46                     ` Carsten Dominik
@ 2013-12-02  8:44                       ` Sebastien Vauban
  2013-12-02 16:38                         ` Peter Davis
  2013-12-03 15:14                         ` Rick Frankel
  0 siblings, 2 replies; 26+ messages in thread
From: Sebastien Vauban @ 2013-12-02  8:44 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

Carsten Dominik wrote:
>> I agree, but couldn't think of any other way. There are 3 other
>> unicode options:
>> 
>> 	1. A box with an X  (☒ U+2612 BALLOT BOX WITH X)
>> 	2. A bare (unboxed) X (✗ U+2717 BALLOT X)
>> 	3 A bare checkmark (✓ U+2713 CHECK MARK)
>> 
>> I  also found this character:
>> 
>>   U+237B ⍻ not check mark
>> 
>> If you think one of those would work we could use it instead.
>
> No, I don't think any of them does it.

From http://en.wikipedia.org/wiki/Checkbox:

  ╭──── Tri-state checkbox
  │
  │ Some applications use checkboxes that allow an indeterminate state in
  │ addition to the two provided by a normal checkbox. This third state is
  │ shown as a square or dash in the checkbox, and indicates that its state
  │ is neither checked nor unchecked. This is most often used when the
  │ checkbox is tied to a collection of items in mixed states.
  ╰────

Something like [-] could be nice, then, as corresponds to the Org look
and feel.

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Getting checkboxes in HTML output?
  2013-12-02  8:44                       ` Sebastien Vauban
@ 2013-12-02 16:38                         ` Peter Davis
  2013-12-03  1:11                           ` Nick Dokos
  2013-12-03 15:03                           ` Rick Frankel
  2013-12-03 15:14                         ` Rick Frankel
  1 sibling, 2 replies; 26+ messages in thread
From: Peter Davis @ 2013-12-02 16:38 UTC (permalink / raw)
  To: emacs-orgmode

I've now changed ox-html.el to include this:

(defun org-html-checkbox (checkbox)
   "Format CHECKBOX into HTML."
   (case checkbox (on "&#9746;")
     (off "&#9744;")
     (trans "&#9745;")
     (t "")))


This is sort of close to using
  [ ] for unchecked
  [/] for partially checked
  [X] for checked

To my aging eyes, the check in U#9745 looks almost like a forward slash. 
Certainly, though, this would be potentially confusing, especially if no 
[X] boxes were present, so that only [ ] or [/] were visible.

-pd

-- 
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Getting checkboxes in HTML output?
  2013-12-02 16:38                         ` Peter Davis
@ 2013-12-03  1:11                           ` Nick Dokos
  2013-12-03 12:29                             ` Peter Davis
  2013-12-03 15:03                           ` Rick Frankel
  1 sibling, 1 reply; 26+ messages in thread
From: Nick Dokos @ 2013-12-03  1:11 UTC (permalink / raw)
  To: emacs-orgmode

Peter Davis <pfd@pfdstudio.com> writes:

> I've now changed ox-html.el to include this:
>

As an FYI: you don't need to change ox-html.el. You can just load a file
containing the redefinition *after* you've loaded ox-html. Something
like this (untested):

(eval-after-load "ox-html"
      (defun org-html-checkbox (checkbox)
        ....))

That way, you have pristine sources *and* you get the redefined
function.

> (defun org-html-checkbox (checkbox)
>   "Format CHECKBOX into HTML."
>   (case checkbox (on "&#9746;")
>     (off "&#9744;")
>     (trans "&#9745;")
>     (t "")))
>
>
> This is sort of close to using
>  [ ] for unchecked
>  [/] for partially checked
>  [X] for checked
>
> To my aging eyes, the check in U#9745 looks almost like a forward
> slash. Certainly, though, this would be potentially confusing,
> especially if no [X] boxes were present, so that only [ ] or [/] were
> visible.
>
> -pd

-- 
Nick

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

* Re: Getting checkboxes in HTML output?
  2013-12-03  1:11                           ` Nick Dokos
@ 2013-12-03 12:29                             ` Peter Davis
  0 siblings, 0 replies; 26+ messages in thread
From: Peter Davis @ 2013-12-03 12:29 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

On Mon, Dec 02, 2013 at 08:11:25PM -0500, Nick Dokos wrote:
> Peter Davis <pfd@pfdstudio.com> writes:
> 
> > I've now changed ox-html.el to include this:
> >
> 
> As an FYI: you don't need to change ox-html.el. You can just load a file
> containing the redefinition *after* you've loaded ox-html. Something
> like this (untested):
> 
> (eval-after-load "ox-html"
>       (defun org-html-checkbox (checkbox)
>         ....))
> 
> That way, you have pristine sources *and* you get the redefined
> function.
> 

Thanks, Nick. That's definitely cleaner!

-pd

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

* Re: Getting checkboxes in HTML output?
  2013-12-02 16:38                         ` Peter Davis
  2013-12-03  1:11                           ` Nick Dokos
@ 2013-12-03 15:03                           ` Rick Frankel
  2013-12-03 15:24                             ` Sebastien Vauban
  1 sibling, 1 reply; 26+ messages in thread
From: Rick Frankel @ 2013-12-03 15:03 UTC (permalink / raw)
  To: emacs-orgmode

On 2013-12-02 11:38, Peter Davis wrote:
> I've now changed ox-html.el to include this:
> 
> (defun org-html-checkbox (checkbox)
> "Format CHECKBOX into HTML."
> (case checkbox (on "&#9746;")
> (off "&#9744;")
> (trans "&#9745;")
> (t "")))
> 
> 
> This is sort of close to using
> [ ] for unchecked
> [/] for partially checked
> [X] for checked
> 
> To my aging eyes, the check in U#9745 looks almost like a forward
> slash. Certainly, though, this would be potentially confusing,
> especially if no [X] boxes were present, so that only [ ] or [/] were
> visible.

Right. I am going to make this a configurable option in ox-html,
although consensus is that trying to emulate the partial checkbox
([-]) w/ other unicode symbols is too confusing, so we will simply use
an empty ballot box.

rick

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

* Re: Getting checkboxes in HTML output?
  2013-12-02  8:44                       ` Sebastien Vauban
  2013-12-02 16:38                         ` Peter Davis
@ 2013-12-03 15:14                         ` Rick Frankel
  1 sibling, 0 replies; 26+ messages in thread
From: Rick Frankel @ 2013-12-03 15:14 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

On 2013-12-02 03:44, Sebastien Vauban wrote:
> Hello,
> 
> Carsten Dominik wrote:
> I agree, but couldn't think of any other way. There are 3 other
> unicode options:
> 
> 	1. A box with an X  (☒ U+2612 BALLOT BOX WITH X)
> 	2. A bare (unboxed) X (✗ U+2717 BALLOT X)
> 	3 A bare checkmark (✓ U+2713 CHECK MARK)
> 
> I  also found this character:
> 
> U+237B ⍻ not check mark
> 
> If you think one of those would work we could use it instead.
> 
> No, I don't think any of them does it.
> 
> From http://en.wikipedia.org/wiki/Checkbox:
> 
> ╭──── Tri-state checkbox
> │
> │ Some applications use checkboxes that allow an indeterminate state in
> │ addition to the two provided by a normal checkbox. This third state 
> is
> │ shown as a square or dash in the checkbox, and indicates that its 
> state
> │ is neither checked nor unchecked. This is most often used when the
> │ checkbox is tied to a collection of items in mixed states.
> ╰────
> 
> Something like [-] could be nice, then, as corresponds to the Org look
> and feel.

Unfortunately, a symbol like this is unavailable in unicode and the
html checkbox is only two state. The only HTML solutions i've found
involve javascript and images rather than html checkbox (input)
elements.


rick

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

* Re: Getting checkboxes in HTML output?
  2013-12-03 15:03                           ` Rick Frankel
@ 2013-12-03 15:24                             ` Sebastien Vauban
  2013-12-03 16:56                               ` Peter Davis
  0 siblings, 1 reply; 26+ messages in thread
From: Sebastien Vauban @ 2013-12-03 15:24 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Rick Frankel,

Rick Frankel wrote:
>> This is sort of close to using
>> [ ] for unchecked
>> [/] for partially checked
>> [X] for checked
>>
>> To my aging eyes, the check in U#9745 looks almost like a forward
>> slash. Certainly, though, this would be potentially confusing,
>> especially if no [X] boxes were present, so that only [ ] or [/] were
>> visible.
>
> Right. I am going to make this a configurable option in ox-html,
> although consensus is that trying to emulate the partial checkbox
> ([-]) w/ other unicode symbols is too confusing, so we will simply use
> an empty ballot box.

You mean no difference between unchecked and partially checked?  If yes, this
is wrong IMO.

I did not search for long, but there should be usable unicode characters. To
name a few:

- U+25EB White square with vertical bisecting line
- U+25F1 White square with lower left quadrant

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Getting checkboxes in HTML output?
  2013-12-03 15:24                             ` Sebastien Vauban
@ 2013-12-03 16:56                               ` Peter Davis
  0 siblings, 0 replies; 26+ messages in thread
From: Peter Davis @ 2013-12-03 16:56 UTC (permalink / raw)
  To: emacs-orgmode


On 12/3/13, 10:24 AM, Sebastien Vauban wrote:
> Rick Frankel,
>
> Rick Frankel wrote:
>>> This is sort of close to using
>>> [ ] for unchecked
>>> [/] for partially checked
>>> [X] for checked
>>>
>>> To my aging eyes, the check in U#9745 looks almost like a forward
>>> slash. Certainly, though, this would be potentially confusing,
>>> especially if no [X] boxes were present, so that only [ ] or [/] were
>>> visible.
>> Right. I am going to make this a configurable option in ox-html,
>> although consensus is that trying to emulate the partial checkbox
>> ([-]) w/ other unicode symbols is too confusing, so we will simply use
>> an empty ballot box.
> You mean no difference between unchecked and partially checked?  If yes, this
> is wrong IMO.
>
> I did not search for long, but there should be usable unicode characters. To
> name a few:
>
> - U+25EB White square with vertical bisecting line
> - U+25F1 White square with lower left quadrant

I think Rick's proposal of treating partially completed checkboxes as 
empty is appropriate. It's kind of the graphical equivalent of the 
"floor" function.

The problem is that we really need three symbols which clearly and 
unambiguously represent three states of completion: none, partial and 
full. Unicode doesn't seem to give us any triplets like that, and trying 
to kludge otherwise unrelated symbols is not going to be satisfactory.

That said, one possibility that strikes me would be:
U+25A1 White square
U+25E7 Square with left half black
U+25A0 Black square

The drawback, as I see it, is that if only white squares or only black 
squares appear, they would simply look like some kind of stylish bullet 
characters.

-pd


-- 
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

end of thread, other threads:[~2013-12-03 17:04 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-27 15:45 Getting checkboxes in HTML output? Peter Davis
2013-11-27 16:03 ` Nick Dokos
2013-11-27 18:20   ` Peter Davis
2013-11-28 13:33     ` Rick Frankel
2013-11-28 13:55       ` Peter Davis
2013-11-28 16:08       ` Bastien
2013-11-28 17:03         ` Matt Price
2013-11-28 20:51       ` Achim Gratz
2013-11-28 21:26         ` Sebastien Vauban
     [not found]           ` <CAN_Dec9a5v2rqQSvAKpvgLWKsTY8YLoMSvKbtkgak77Bb=nbAg@mail.gmail.com>
2013-11-28 21:58             ` Matt Price
2013-11-29 16:11               ` Rick Frankel
2013-11-29 18:59                 ` Peter Davis
2013-11-30  6:54                 ` Carsten Dominik
2013-11-30 14:07                   ` Rick Frankel
2013-12-01  6:46                     ` Carsten Dominik
2013-12-02  8:44                       ` Sebastien Vauban
2013-12-02 16:38                         ` Peter Davis
2013-12-03  1:11                           ` Nick Dokos
2013-12-03 12:29                             ` Peter Davis
2013-12-03 15:03                           ` Rick Frankel
2013-12-03 15:24                             ` Sebastien Vauban
2013-12-03 16:56                               ` Peter Davis
2013-12-03 15:14                         ` Rick Frankel
2013-11-29  1:47           ` Eric Abrahamsen
2013-11-28 14:30 ` Waldemar Quevedo
2013-11-28 14:41   ` Waldemar Quevedo

Code repositories for project(s) associated with this public 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).