emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* unattractive list spacing in ox-html export
@ 2014-06-23 20:11 Eric Schulte
  2014-06-23 20:29 ` Nicolas Goaziou
  2014-06-23 20:46 ` Achim Gratz
  0 siblings, 2 replies; 13+ messages in thread
From: Eric Schulte @ 2014-06-23 20:11 UTC (permalink / raw)
  To: Org Mode Mailing List

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

Hi,

When the lists with spaces in some (but not all) elements are exported
to HTML, they result in unattractive spacing.  This is due to the use of
paragraph tags in some list elements, which cause large spaces between
some list elements but no spaces between others.

I believe something should be done to ensure consistent spacing in the
HTML export of list elements.  I'd suggest that every list element
should be wrapped in a paragraph tag, but maybe a different solution is
more appropriate.

For example, the following Org-mode.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sample.org --]
[-- Type: text/x-org, Size: 1311 bytes --]

1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
   hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
   nisl, tincidunt et, mattis eget, convallis nec, purus
   
   Cum sociis natoque penatibus et magnis dis parturient montes,
   nascetur ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam
   tristique diam non turpis. Cras placerat accumsan nulla. Nullam
   rutrum. Nam vestibulum accumsan nisl.

2. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
   hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
   nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
   natoque penatibus et magnis dis parturient montes, nascetur
   ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam tristique
   diam non turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam
   vestibulum accumsan nisl.

3. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
   hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
   nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
   natoque penatibus et magnis dis parturient montes, nascetur
   ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam tristique
   diam non turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam
   vestibulum accumsan nisl.


[-- Attachment #3: Type: text/plain, Size: 1445 bytes --]


exports to the following html

<ol class="org-ol">
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus

<p>
Cum sociis natoque penatibus et magnis dis parturient montes,
nascetur ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam
tristique diam non turpis. Cras placerat accumsan nulla. Nullam
rutrum. Nam vestibulum accumsan nisl.
</p>
</li>

<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur
ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam tristique
diam non turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam
vestibulum accumsan nisl.
</li>

<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur
ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam tristique
diam non turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam
vestibulum accumsan nisl.
</li>
</ol>

Thanks,
Eric

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D (see https://u.fsf.org/yw)

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

* Re: unattractive list spacing in ox-html export
  2014-06-23 20:11 unattractive list spacing in ox-html export Eric Schulte
@ 2014-06-23 20:29 ` Nicolas Goaziou
  2014-06-23 21:36   ` Eric Schulte
  2014-06-23 20:46 ` Achim Gratz
  1 sibling, 1 reply; 13+ messages in thread
From: Nicolas Goaziou @ 2014-06-23 20:29 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode Mailing List

Hello,

Eric Schulte <schulte.eric@gmail.com> writes:

> When the lists with spaces in some (but not all) elements are exported
> to HTML, they result in unattractive spacing.  This is due to the use of
> paragraph tags in some list elements, which cause large spaces between
> some list elements but no spaces between others.
>
> I believe something should be done to ensure consistent spacing in the
> HTML export of list elements.  I'd suggest that every list element
> should be wrapped in a paragraph tag, but maybe a different solution is
> more appropriate.

Actually, there's a special case in ox-html.el (see line 2960) that
prevents the first paragraph in an item to get <p> tag. I guess that
this rule is meant for short lists, e.g.,

 - item 1
 - item 2

where you do not want a new paragraph for each item. So, the special
case could be extended to also check if there's another element in the
item before ignoring the tags.


Regards,

-- 
Nicolas Goaziou

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

* Re: unattractive list spacing in ox-html export
  2014-06-23 20:11 unattractive list spacing in ox-html export Eric Schulte
  2014-06-23 20:29 ` Nicolas Goaziou
@ 2014-06-23 20:46 ` Achim Gratz
  2014-06-23 21:20   ` Eric Schulte
  1 sibling, 1 reply; 13+ messages in thread
From: Achim Gratz @ 2014-06-23 20:46 UTC (permalink / raw)
  To: emacs-orgmode

Eric Schulte writes:
> I believe something should be done to ensure consistent spacing in the
> HTML export of list elements.  I'd suggest that every list element
> should be wrapped in a paragraph tag, but maybe a different solution is
> more appropriate.

Setting the spacing for paragraphs within a list in the CSS seems much
easier.  Besides, the content of a list item is conceptually a paragraph
(the first one if there are more), so it shouldn't need to be wrapped
anyway.


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

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

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

* Re: unattractive list spacing in ox-html export
  2014-06-23 20:46 ` Achim Gratz
@ 2014-06-23 21:20   ` Eric Schulte
  2014-06-24 12:46     ` Achim Gratz
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Schulte @ 2014-06-23 21:20 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> writes:

> Eric Schulte writes:
>> I believe something should be done to ensure consistent spacing in the
>> HTML export of list elements.  I'd suggest that every list element
>> should be wrapped in a paragraph tag, but maybe a different solution is
>> more appropriate.
>
> Setting the spacing for paragraphs within a list in the CSS seems much
> easier.

I disagree, editing CSS shouldn't be required for reasonable default
list spacing on HTML export.

Best,
Eric

> Besides, the content of a list item is conceptually a paragraph (the
> first one if there are more), so it shouldn't need to be wrapped
> anyway.
>
>
> Regards,
> Achim.

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D (see https://u.fsf.org/yw)

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

* Re: unattractive list spacing in ox-html export
  2014-06-23 20:29 ` Nicolas Goaziou
@ 2014-06-23 21:36   ` Eric Schulte
  2014-06-23 22:31     ` Nicolas Goaziou
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Schulte @ 2014-06-23 21:36 UTC (permalink / raw)
  To: Org Mode Mailing List

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

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Eric Schulte <schulte.eric@gmail.com> writes:
>
>> When the lists with spaces in some (but not all) elements are exported
>> to HTML, they result in unattractive spacing.  This is due to the use of
>> paragraph tags in some list elements, which cause large spaces between
>> some list elements but no spaces between others.
>>
>> I believe something should be done to ensure consistent spacing in the
>> HTML export of list elements.  I'd suggest that every list element
>> should be wrapped in a paragraph tag, but maybe a different solution is
>> more appropriate.
>
> Actually, there's a special case in ox-html.el (see line 2960) that
> prevents the first paragraph in an item to get <p> tag. I guess that
> this rule is meant for short lists, e.g.,
>
>  - item 1
>  - item 2
>
> where you do not want a new paragraph for each item. So, the special
> case could be extended to also check if there's another element in the
> item before ignoring the tags.
>

This sounds like the best approach.  The attached patch implements this
change, if it looks good I'll go ahead and apply it to master.

Thanks,
Eric


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-inhibit-p-wraps-in-list-for-all-or-none.patch --]
[-- Type: text/x-diff, Size: 1444 bytes --]

From 9af2b1c96e2062b1501cb930a1e1f95ab8c0882e Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Mon, 23 Jun 2014 17:33:18 -0400
Subject: [PATCH 1/2] inhibit <p> wraps in list for all or none

* lisp/ox-html.el (org-html-paragraph): Extend the special case of
  inhibiting <p> wrappers to only perform such inhibition when *every*
  element of the list is a single element long.  Otherwise unsightly
  spacing results.
---
 lisp/ox-html.el | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 762e1dc..d95ce79 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2956,7 +2956,17 @@ the plist used as a communication channel."
     (cond
      ((and (eq (org-element-type parent) 'item)
 	   (= (org-element-property :begin paragraph)
-	      (org-element-property :contents-begin parent)))
+	      (org-element-property :contents-begin parent))
+	   ;; every subsequent list element is a single element long
+	   (let ((gp (org-export-get-parent parent))
+		 (all-singles t))
+	     (org-element-map gp 'item
+	       (lambda (object)
+		 (let ((num-children (length (org-element-contents object))))
+		   (unless (= 1 num-children)
+		     (setq all-singles nil))))
+	       info nil 'item)
+	     all-singles))
       ;; Leading paragraph in a list item have no tags.
       contents)
      ((org-html-standalone-image-p paragraph info)
-- 
2.0.0


[-- Attachment #3: Type: text/plain, Size: 90 bytes --]


-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D (see https://u.fsf.org/yw)

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

* Re: unattractive list spacing in ox-html export
  2014-06-23 21:36   ` Eric Schulte
@ 2014-06-23 22:31     ` Nicolas Goaziou
  2014-06-24  0:09       ` Eric Schulte
  0 siblings, 1 reply; 13+ messages in thread
From: Nicolas Goaziou @ 2014-06-23 22:31 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode Mailing List

Eric Schulte <schulte.eric@gmail.com> writes:

> +	   ;; every subsequent list element is a single element long

You need to start with a capital and a final period.

Also, it could be merged with the comment below. E.g., "Paragraphs have
no tag when any item in current list is either empty or consist of
a single paragraph."

> +	   (let ((gp (org-export-get-parent parent))

Since you only use it once, you don't need to bind it. Just use it in
`org-element-map':

  (org-element-map (org-export-get-parent parent) 'item ...)

> +		 (all-singles t))
> +	     (org-element-map gp 'item
> +	       (lambda (object)
> +		 (let ((num-children (length (org-element-contents object))))
> +		   (unless (= 1 num-children)
> +		     (setq all-singles nil))))
> +	       info nil 'item)

This is not sufficient, as an item could contain a single center block
with many paragraphs within. IOW you also need to check the type of the
single element. We also need to accept empty items.

Moreover, the item could contain another element not exported (i.e.
a comment), but I guess that would go a bit too far.

Also, note that `org-element-map' has a mechanism to exit early
(argument FIRST-MATCH), so you can avoid mapping over all items if you
already know that one of them doesn't contain a single paragraph.

I think the following should do the job:

  (not (org-element-map (org-export-get-parent parent) 'item
         (lambda (item)
           (let ((contents (org-element-contents item)))
             (and contents
                  (or (cdr contents)
                      (not (eq (org-element-type (car contents)) 'paragraph))))))
         info 'first-match 'item))

>        ;; Leading paragraph in a list item have no tags.

See above.


Regards,

-- 
Nicolas Goaziou

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

* Re: unattractive list spacing in ox-html export
  2014-06-23 22:31     ` Nicolas Goaziou
@ 2014-06-24  0:09       ` Eric Schulte
  0 siblings, 0 replies; 13+ messages in thread
From: Eric Schulte @ 2014-06-24  0:09 UTC (permalink / raw)
  To: Org Mode Mailing List

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Eric Schulte <schulte.eric@gmail.com> writes:
>
>> +	   ;; every subsequent list element is a single element long
>
> You need to start with a capital and a final period.
>
> Also, it could be merged with the comment below. E.g., "Paragraphs have
> no tag when any item in current list is either empty or consist of
> a single paragraph."
>
>> +	   (let ((gp (org-export-get-parent parent))
>
> Since you only use it once, you don't need to bind it. Just use it in
> `org-element-map':
>
>   (org-element-map (org-export-get-parent parent) 'item ...)
>
>> +		 (all-singles t))
>> +	     (org-element-map gp 'item
>> +	       (lambda (object)
>> + (let ((num-children (length (org-element-contents object))))
>> +		   (unless (= 1 num-children)
>> +		     (setq all-singles nil))))
>> +	       info nil 'item)
>
> This is not sufficient, as an item could contain a single center block
> with many paragraphs within. IOW you also need to check the type of the
> single element. We also need to accept empty items.
>
> Moreover, the item could contain another element not exported (i.e.
> a comment), but I guess that would go a bit too far.
>
> Also, note that `org-element-map' has a mechanism to exit early
> (argument FIRST-MATCH), so you can avoid mapping over all items if you
> already know that one of them doesn't contain a single paragraph.
>
> I think the following should do the job:
>
>   (not (org-element-map (org-export-get-parent parent) 'item
>          (lambda (item)
>            (let ((contents (org-element-contents item)))
>              (and contents
>                   (or (cdr contents)
>                       (not (eq (org-element-type (car contents)) 'paragraph))))))
>          info 'first-match 'item))
>
>>        ;; Leading paragraph in a list item have no tags.
>
> See above.
>

Applied with your changes.  Thanks for initial pointer and the code
review.

Best,
Eric

>
>
> Regards,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D (see https://u.fsf.org/yw)

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

* Re: unattractive list spacing in ox-html export
  2014-06-23 21:20   ` Eric Schulte
@ 2014-06-24 12:46     ` Achim Gratz
  2014-06-24 13:24       ` Nicolas Goaziou
                         ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Achim Gratz @ 2014-06-24 12:46 UTC (permalink / raw)
  To: emacs-orgmode

Eric Schulte <schulte.eric <at> gmail.com> writes:
> I disagree, editing CSS shouldn't be required for reasonable default
> list spacing on HTML export.

You can disagree all you want, that doesn't make the underlying problem go
away.  The reason for the "unattractive spacing" is that list items, while
conceptually paragraphs, do not have additional spacing after them so the
list becomes more compact.  The W3C doesn't really encourage to use lists
with paragraphs, but if you do (like Org), an explicit paragraph inside a
list environment either should also not have that spacing or should have it
at the beginning (in which case the first paragraph must be implicit).  So
you'll have to modify the CSS anyway or the lists are still having ugly
spacing. Your patch only makes it consistently ugly as soon as there is a
single explicit paragraph needed.

Regards,
Achim.

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

* Re: unattractive list spacing in ox-html export
  2014-06-24 12:46     ` Achim Gratz
@ 2014-06-24 13:24       ` Nicolas Goaziou
  2014-06-25 14:43         ` Rick Frankel
  2014-06-24 13:34       ` Rick Frankel
  2014-06-24 13:34       ` Eric Schulte
  2 siblings, 1 reply; 13+ messages in thread
From: Nicolas Goaziou @ 2014-06-24 13:24 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Hello,

Achim Gratz <Stromeko@NexGo.DE> writes:

> You can disagree all you want, that doesn't make the underlying problem go
> away.  The reason for the "unattractive spacing" is that list items, while
> conceptually paragraphs, do not have additional spacing after them so the
> list becomes more compact.  The W3C doesn't really encourage to use lists
> with paragraphs, but if you do (like Org), an explicit paragraph inside a
> list environment either should also not have that spacing or should have it
> at the beginning (in which case the first paragraph must be implicit).  So
> you'll have to modify the CSS anyway or the lists are still having ugly
> spacing. Your patch only makes it consistently ugly as soon as there is a
> single explicit paragraph needed.

So, would a better solution be to remove the patch and tweak default CSS
so it provides better spacing for paragraphs in <li> tags?


Regards,

-- 
Nicolas Goaziou

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

* Re: unattractive list spacing in ox-html export
  2014-06-24 12:46     ` Achim Gratz
  2014-06-24 13:24       ` Nicolas Goaziou
@ 2014-06-24 13:34       ` Rick Frankel
  2014-06-24 13:34       ` Eric Schulte
  2 siblings, 0 replies; 13+ messages in thread
From: Rick Frankel @ 2014-06-24 13:34 UTC (permalink / raw)
  To: emacs-orgmode

On 2014-06-24 08:46, Achim Gratz wrote:
> Eric Schulte <schulte.eric <at> gmail.com> writes:
> I disagree, editing CSS shouldn't be required for reasonable default
> list spacing on HTML export.
> 
> You can disagree all you want, that doesn't make the underlying problem 
> go
> away.  The reason for the "unattractive spacing" is that list items, 
> while
> conceptually paragraphs, do not have additional spacing after them so 
> the
> list becomes more compact.  The W3C doesn't really encourage to use 
> lists
> with paragraphs, but if you do (like Org), an explicit paragraph inside 
> a
> list environment either should also not have that spacing or should 
> have it
> at the beginning (in which case the first paragraph must be implicit).  
> So
> you'll have to modify the CSS anyway or the lists are still having ugly
> spacing. Your patch only makes it consistently ugly as soon as there is 
> a
> single explicit paragraph needed.


I pretty much agree w/ Achim. Lists are in general meant to be compact
and have short content. But given that  lists are often "abused" to
contain paragraph text, perhaps a better approach would be to wrap
anything in a list element longer than <X> (2 lines, ~160 characters?)
in a paragraph (or multiple if required) and change the default css to
only paragraph space _between_ paragraphs in list elements (i.e., after
all but the last paragraph, or before all but the first.)

rick

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

* Re: unattractive list spacing in ox-html export
  2014-06-24 12:46     ` Achim Gratz
  2014-06-24 13:24       ` Nicolas Goaziou
  2014-06-24 13:34       ` Rick Frankel
@ 2014-06-24 13:34       ` Eric Schulte
  2014-06-24 17:10         ` Achim Gratz
  2 siblings, 1 reply; 13+ messages in thread
From: Eric Schulte @ 2014-06-24 13:34 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Achim Gratz <Stromeko@NexGo.DE> writes:

> Eric Schulte <schulte.eric <at> gmail.com> writes:
>> I disagree, editing CSS shouldn't be required for reasonable default
>> list spacing on HTML export.
>
> You can disagree all you want, that doesn't make the underlying problem go
> away.  The reason for the "unattractive spacing" is that list items, while
> conceptually paragraphs, do not have additional spacing after them so the
> list becomes more compact.  The W3C doesn't really encourage to use lists
> with paragraphs, but if you do (like Org), an explicit paragraph inside a
> list environment either should also not have that spacing or should have it
> at the beginning (in which case the first paragraph must be implicit).

My browser (recent Firefox) *does* place extra spacing around list
elements with paragraphs (with no CSS).  I assume this is standard.  So
regardless of what browsers should do, Org-mode should handle what they
actually do.

> So you'll have to modify the CSS anyway or the lists are still having
> ugly spacing. Your patch only makes it consistently ugly as soon as
> there is a single explicit paragraph needed.
>

I think consistency here is a win.  Maybe adding another rule to the
Org-mode default CSS would make the situation even better, but
personally I'm happy with the current look.

Thanks,
Eric

>
> Regards,
> Achim.
>
>
>

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D (see https://u.fsf.org/yw)

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

* Re: unattractive list spacing in ox-html export
  2014-06-24 13:34       ` Eric Schulte
@ 2014-06-24 17:10         ` Achim Gratz
  0 siblings, 0 replies; 13+ messages in thread
From: Achim Gratz @ 2014-06-24 17:10 UTC (permalink / raw)
  To: emacs-orgmode

Eric Schulte writes:
> My browser (recent Firefox) *does* place extra spacing around list
> elements with paragraphs (with no CSS).  I assume this is standard.  So
> regardless of what browsers should do, Org-mode should handle what they
> actually do.

That's what I was saying, or at least trying to.  Let's look at the
following document:

--8<---------------cut here---------------start------------->8---
* Lists w/ parapraphs
** without paragraphs
   - some
   - short
   - list
   - entries
   This is after the list.
** with paragraphs
   - some
   - short
   - list
   - and a long entry

     with an extra paragraph.

     Plus a second one.
   - short entry
   This is after the list.
--8<---------------cut here---------------end--------------->8---

So, the standard CSS in the browser (which you can totally change at
least in Firefox) keeps list items together.  If it finds a paragraph in
the item, it adds paragraph spacing at the top and bottom.  If you put
an explicit first paragraph, then spacing will be added both above and
below that list item.  Begin and end of list seems to be handled
specially, but that is only a result of the margins applied to the list
element itself having the same (or larger) value as the ones for the
paragraph collapsing into the largest of these.

> I think consistency here is a win.  Maybe adding another rule to the
> Org-mode default CSS would make the situation even better, but
> personally I'm happy with the current look.

If you have truly long paragraphs that may be the case.  If there's only
one or two list items that don't fit on a single line, then this looks
horrible.  I still think you'd want to keep the list items separated
without extra margin and just add some extra space before explicit
paragraphs in a list (typographically an indentation would be
preferrable, but that doesn't look nice if there are consecutive
paragraphs that only span a single line).

That means the first paragraph should preferrably be implicit and
there should be an extra CSS rule

li>p { margin: .3em 0em 0em 0em /* or 1em for indent */; } 

If your patch is kept, the CSS actually gets more complicated and needs
an extra

li>p:first-child {margin: 0em; }

which is probably not recognized by older browsers.


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

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

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

* Re: unattractive list spacing in ox-html export
  2014-06-24 13:24       ` Nicolas Goaziou
@ 2014-06-25 14:43         ` Rick Frankel
  0 siblings, 0 replies; 13+ messages in thread
From: Rick Frankel @ 2014-06-25 14:43 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Achim Gratz

On 2014-06-24 09:24, Nicolas Goaziou wrote:
> Hello,
> 
> Achim Gratz <Stromeko@NexGo.DE> writes:
> 
> You can disagree all you want, that doesn't make the underlying problem 
> go
> away.  The reason for the "unattractive spacing" is that list items, 
> while
> conceptually paragraphs, do not have additional spacing after them so 
> the
> list becomes more compact.  The W3C doesn't really encourage to use 
> lists
> with paragraphs, but if you do (like Org), an explicit paragraph inside 
> a
> list environment either should also not have that spacing or should 
> have it
> at the beginning (in which case the first paragraph must be implicit).  
> So
> you'll have to modify the CSS anyway or the lists are still having ugly
> spacing. Your patch only makes it consistently ugly as soon as there is 
> a
> single explicit paragraph needed.
> 
> So, would a better solution be to remove the patch and tweak default 
> CSS
> so it provides better spacing for paragraphs in <li> tags?

Yes. But arguably, in a multi-paragraph list item, the first paragraph
should be explicit and not implicit --- hence my previous suggestion to
wrap all list items longer that [X] in an explicit paragraph.

rick

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

end of thread, other threads:[~2014-06-25 14:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-23 20:11 unattractive list spacing in ox-html export Eric Schulte
2014-06-23 20:29 ` Nicolas Goaziou
2014-06-23 21:36   ` Eric Schulte
2014-06-23 22:31     ` Nicolas Goaziou
2014-06-24  0:09       ` Eric Schulte
2014-06-23 20:46 ` Achim Gratz
2014-06-23 21:20   ` Eric Schulte
2014-06-24 12:46     ` Achim Gratz
2014-06-24 13:24       ` Nicolas Goaziou
2014-06-25 14:43         ` Rick Frankel
2014-06-24 13:34       ` Rick Frankel
2014-06-24 13:34       ` Eric Schulte
2014-06-24 17:10         ` Achim Gratz

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